Search prompting method, search system, computer equipment and readable storage medium

By combining search logs and resource information, building a candidate word library and using artificial intelligence models to calculate scores, the problem of insufficient quality of prompt words in the existing search prompt mechanism is solved, and efficient and intelligent search prompts are achieved, which is particularly suitable for internal corporate knowledge bases and office systems.

CN120653814APending Publication Date: 2025-09-16QI AN XIN TECHNOLOGY GROUP INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510798230.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

The existing search prompt mechanism cannot effectively meet user needs, especially when a new system is cold-started, it cannot provide high-quality prompt words, and traditional methods are prone to problems such as hot word crowding and insufficient coverage.

Method used

By combining search logs and resource information, a candidate word library is constructed, the search statistical features and resource association features of the candidate words are calculated, the candidate scores are calculated using a pre-trained artificial intelligence model, and prompt words are dynamically output when the user enters, achieving efficient and intelligent search guidance.

Benefits of technology

It significantly improves the accuracy and coverage of search prompts, supports new word discovery, suppresses interference from hot words, and is suitable for search guidance tasks in high-density resource environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653814A_ABST
    Figure CN120653814A_ABST
Patent Text Reader

Abstract

The invention provides a search prompting method, a search system, computer equipment and a readable storage medium. The method comprises the steps of obtaining a search log of a resource library and resource information of the resource library; constructing candidate words according to the search log and the resource information to obtain a candidate word library; calculating search statistical characteristics of the candidate words; calculating association features of the candidate words and resources in a resource library; constructing input features according to the search statistical features and the associated features, inputting the input features to a pre-trained artificial intelligence model, and calculating candidate scores of the candidate words; responding to search input operation, and outputting cue words according to the candidate word bank and the candidate scores. According to the method and the device, the better search prompt word can be provided when the user searches, so that the search requirement can be better met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a search prompt method, a search system, a computer device and a readable storage medium. Background Art

[0002] Internal searches are used in office systems or search engines within an enterprise, such as internal personnel searches, document searches, installation package searches, image searches, and resource searches. To improve user search efficiency and experience, a search prompt mechanism is often introduced to proactively provide prompts when users enter search terms.

[0003] The inventors discovered that current search prompt mechanisms typically use a user's search history as a candidate set of prompt words, rank these prompt words based on technical indicators such as search count, and then output the prompt words based on the ranking results. This method often generates search results that don't match existing resources in the library, causing the results of the prompted search terms to fail to meet the search requirements. Furthermore, it's not suitable for cold-start systems that have just been launched.

[0004] Therefore, how to provide search prompt words to better meet search needs has become a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0005] The purpose of the present invention is to provide a search prompt method, a search system, a computer device and a readable storage medium to solve the above-mentioned technical problems in the prior art.

[0006] On the one hand, to achieve the above-mentioned purpose, the present invention provides a search prompt method.

[0007] The search prompt method includes: obtaining a search log and resource information of a resource library; constructing candidate words according to the search log and resource information to obtain a candidate word library; calculating search statistical features of the candidate words; Calculate the association features between candidate words and resources in the resource library; construct input features based on search statistical features and association features, input them into the pre-trained artificial intelligence model, and calculate the candidate score of the candidate words; and in response to the search input operation, output prompt words based on the candidate word library and candidate score.

[0008] Furthermore, the steps of calculating the search statistical features of the candidate word include: counting the number of times the candidate word is searched in the first unit time; counting the number of times the candidate word is searched and the search results are clicked in the second unit time; obtaining the time when the candidate word is first searched; counting the length of time the candidate word's search results stay on the resource after being clicked; and counting the secondary query rate triggered by the candidate word.

[0009] Furthermore, the step of calculating the association features between the candidate word and the resources in the resource library includes: calculating the matching coefficient between the candidate word and the resources in the resource library; when the matching coefficient meets the preset conditions, determining that the resource matches the candidate word; counting the total number of resources matched by the candidate word; and calculating the weighted sum of the matching coefficients of each resource matching the candidate word.

[0010] Furthermore, the steps of constructing a candidate vocabulary based on search logs and resource information include: obtaining historical search logs; parsing the original search text in the historical search logs; obtaining the title, tag, keyword, path and summary description of the resource; extracting semantic units in the original search text, title, tag, keyword, path and summary description; merging all semantic units with the same semantics; and using the merged semantic units to construct a candidate vocabulary.

[0011] Furthermore, before outputting prompt words according to the candidate vocabulary and candidate scores in response to a search input operation, the method also includes: constructing the candidate vocabulary into a finite state transition diagram; the step of outputting prompt words according to the candidate vocabulary and candidate scores in response to the search input operation includes: obtaining real-time input information in response to the search input operation; determining a candidate word set that matches the input information from the candidate vocabulary according to the finite state transition diagram; sorting the candidate words in the candidate word set according to the candidate scores to generate a sorted prompt word list; and outputting the prompt word list for front-end association display.

[0012] Furthermore, the step of constructing the candidate vocabulary into a finite state transition graph includes: sorting the words in the candidate vocabulary according to lexicographical order; decomposing the candidate words into character sequences, and using each character as a state transition edge to construct a state transition path corresponding to the candidate words; setting the terminal node of the state transition path to an accepting state, and using the candidate score of the corresponding candidate word as the output value of the accepting state; and performing prefix sharing and graph structure compression on all state transition paths, and merging them to form a finite state transition graph.

[0013] Furthermore, according to the finite state transition diagram, the step of determining a candidate word set that matches the input information from the candidate word library includes: starting from the initial state in the finite state transition diagram, performing state jumps in sequence according to the character order of the input information, and searching for a prefix path that is consistent with the input information; starting from the terminal node of the prefix path, traversing its successor state, and obtaining all complete state paths starting with the prefix path; and obtaining candidate words corresponding to all complete state paths, and extracting the output values ​​of their acceptance states to construct a candidate word set.

[0014] On the other hand, to achieve the above object, the present invention provides a search system.

[0015] The search system includes: a database server for storing a resource library; a resource information processing server for obtaining resource information of the resource library; a search log processing server for obtaining search logs of the resource library; a message queue server for collecting resource information and search logs and outputting them to a data collation server; a data collation server for constructing candidate words based on search logs and resource information to obtain a candidate word library; a candidate score calculation server for calculating search statistical features of candidate words, calculating association features between candidate words and resources in the resource library, constructing input features based on search statistical features and association features, inputting them into a pre-trained artificial intelligence model, and calculating candidate scores of candidate words; a data push server for pushing candidate words and candidate scores to a search server; and a search server for outputting prompt words based on the candidate word library and candidate scores in response to a search input operation.

[0016] On the other hand, to achieve the above objectives, the present invention also provides a computer 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 above method when executing the computer program.

[0017] On the other hand, to achieve the above object, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when executed by a processor.

[0018] The search prompt method, search system, computer device, and readable storage medium provided by the present invention first obtain resource information from historical search logs and resource libraries, extracting information from both user behavior and content perspectives. A set of prompt candidate terms is then constructed based on these two types of information. Multidimensional features of the prompt terms are calculated based on search behavior characteristics and resource association features. These features are then fed into a pre-trained artificial intelligence model to derive a score for each candidate term, reflecting its priority within the prompt system. Finally, during user input, the system dynamically outputs prompt terms in real time based on the input prefix, candidate word library, and candidate scores, achieving efficient and intelligent search guidance. Through the present invention, candidate words are constructed by combining search logs and resource information, covering the two-dimensional semantic entrances of user behavior and content structure, no longer limited to historical words, and supporting new word discovery and business word coverage; the introduction of search statistical features reflects the use value of candidate words in real scenarios, which can suppress hot but useless prompt words, and the introduction of association features to measure the semantic association between candidate words and content libraries, which can activate high-quality prompts with strong content but cold start, and automatically learn the characteristic patterns of high-quality prompt words based on the integration of multi-dimensional features based on artificial intelligence scoring models, which is more intelligent and adjustable than traditional manual rules or frequency sorting. The search prompt method proposed in the present invention constructs a complete closed-loop process from user behavior to content structure, from candidate word mining to scoring and sorting, from offline modeling to online associative display, which significantly improves the accuracy, coverage and intelligence level of search prompts, and is particularly suitable for search guidance tasks in high-density resource environments such as internal knowledge bases and office systems of enterprises. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings: Figure 1 A flowchart of the search prompt method provided in Example 1 of the present invention; Figure 2 A schematic diagram of the structure of a multi-layer perceptron model provided in the first embodiment of the present invention; Figure 3 A schematic diagram of the composition of a search system provided in Embodiment 2 of the present invention; Figure 4 This is a hardware structure diagram of the computer device provided in Example 3 of the present invention. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0021] Example 1 The embodiment of the present invention provides a search prompt method, through which search records and resource information are combined to provide search prompt words, which can better meet search needs. Specifically, Figure 1 This is a flowchart of the search prompt method provided in the first embodiment of the present invention, such as Figure 1 As shown, the search prompt method provided by this embodiment includes the following steps S101 to S106.

[0022] Step S101: Acquire the search log and resource information of the resource library.

[0023] Specifically, with the resource library as the search scope, a search log is generated every time a user searches. This log records the user's behavioral trajectory when performing search operations within the search system, including information such as the user's search term, search time, user ID, search source, whether or not a result was clicked after the search, the ID and type of the resource clicked, the order of clicks, the duration of the search, and whether or not a prompt term was used. By analyzing the search log, we can extract statistical features such as high-frequency search terms, user behavioral preferences, and prompt term conversion rates, providing a data foundation for prompt term construction and subsequent scoring calculations.

[0024] Resource information serves as a key source of semantic entry for the content side of prompts, complementing the behavioral entry provided by search logs. Resource information refers to the structured or semi-structured description of the entity content that can be retrieved in the system. It serves as an important foundation for constructing prompts and includes fields such as resource title, keywords, abstract, category, tags, resource type, creator, number of visits, and file path. As the foundation for constructing prompts, resource information can be used to extract semantic prompt candidate terms from a content perspective, providing the data foundation for constructing prompts and subsequent scoring calculations.

[0025] Step S102: Construct candidate words according to the search log and resource information to obtain a candidate word library.

[0026] When constructing candidate words, we combine the content layer (resource information) and the behavior layer (search logs) to merge the existing resource information with the search terms that users have actually searched for, and establish a candidate word library that covers both system-side and user-side words.

[0027] Specifically, we extract actual user search terms from search logs and high-frequency phrases from resource titles, keywords, tags, and other fields from resource information. We then perform deduplication and normalization on these extracted terms to construct a candidate word library. For each candidate word, we calculate search statistics and correlation features with resources in the library.

[0028] Step S103: Calculate the search statistical features of the candidate words.

[0029] Query the search logs with candidate words as search words. Based on the queried search logs, count the number of searches, number of clicks, click-through rate, usage frequency, conversion rate, recent usage time and other behavioral data of each candidate word within a preset time range to reflect the popularity and effectiveness of the candidate word in user-side behavior.

[0030] Step S104: Calculate the association features between the candidate words and the resources in the resource library.

[0031] Specifically, the association features between candidate terms and resources in the resource library are used to represent a set of quantitative indicators that characterize the semantic or textual matching relationship between the candidate terms and each resource in the resource library. These association features may include the number of resources where the candidate term appears in the resource title, keyword, tag, or summary field; the sum or average frequency of the candidate term's occurrence in matching resources; the strength score of the candidate term's match with the resource; and the weighted sum of importance indicators for matching resources (such as resource weight and access popularity). These association features between candidate terms and resources in the resource library reflect the semantic coverage of the candidate term's content.

[0032] Step S105: Input the search statistical features and associated features into the pre-trained artificial intelligence model to calculate the candidate score of the candidate word.

[0033] Search statistical features measure the user's activity and genuine value creation of candidate terms, while relevance features measure the candidate's coverage and content relevance within the current resource library. However, the former poses challenges with cold start issues for new terms and over-recommendations for high-frequency, noisy terms. The latter may recommend semantically related but unpopular prompts, failing to reflect actual usage preferences. Combining search statistical and relevance features into the scoring model allows the final calculated candidate score to take into account both user behavior and resource characteristics, taking into account the frequent use and semantic accuracy of the prompt. Furthermore, even if a prompt is new, strong relevance to the content can lead to its recommendation as a prompt, thus supporting system cold start. Prompts that are frequently searched for but have no matching resources can be downgraded to suppress spam, eliminating the need for separate filtering. Furthermore, for words with strong resource matches, their ranking can be modestly improved, even with low activity.

[0034] In this step, an artificial intelligence model acts as a scoring engine. The model's input is a set of feature vectors corresponding to the prompt word (constructed from search statistics and associated features), and its output is a candidate score, which is used to measure the quality of the prompt word as a search suggestion. This artificial intelligence model can be a gradient boosting tree model, an ensemble learning model, a deep learning multi-layer perceptron model, or a ranking learning model. Used prompt words are extracted from historical search logs and resource information to construct a training sample set for training the artificial intelligence model. Each training sample is assigned a target score as a supervised training label. For example, an initial score is provided through manual annotation and manual sorting rules to supervise the model's learning of the mapping relationship between candidate word features and actual usage effects. The training samples are input into the artificial intelligence model for supervised learning training. The model's objective is to minimize the loss function between the predicted score and the actual score. After training is complete, a set of model parameters is obtained, i.e., the trained artificial intelligence model, which is used to perform scoring inference on any candidate word in actual use.

[0035] When calculating the candidate score of the current candidate word, the system generates a feature vector based on its search statistical features and associated features, and inputs it into the trained artificial intelligence model for forward reasoning to obtain the candidate score result.

[0036] For example, Figure 2 This is a schematic diagram of the structure of the multi-layer perceptron model provided in the first embodiment of the present invention. Figure 2 As shown in Figure 1, the layer perceptron model consists of at least three layers of nodes: an input layer, a hidden layer, and an output layer. Except for the input node, each node is a neuron with a nonlinear activation function. This multi-layer nonlinearity improves the model's ability to express candidate scores, enabling it to integrate a wider range of data features. The input layer represents the raw features, and the output layer represents the candidate scores.

[0037] Step S106: In response to the search input operation, output prompt words according to the candidate word library and the candidate scores.

[0038] Specifically, the prefix content entered by the user in the search box is obtained in real time as the query input, and candidate words matching the prefix are found in the candidate word library to form a candidate word set. In the candidate word set, the candidate words are sorted in descending order according to the candidate score, and a sorted prompt word list is generated. The prompt word list is returned to the front-end interface for associative display to assist the user in completing the search input.

[0039] The resource library-oriented search prompt method provided in this embodiment is used to intelligently provide highly relevant and high-value prompt words in the process of user inputting search content, so as to guide users to quickly complete searches and improve search efficiency and accuracy. In this method, historical search logs and resource information in the resource library are first obtained, and information is extracted from the two perspectives of user behavior and content respectively. Then, a set of prompt candidate words is constructed based on these two types of information, and the multi-dimensional features of the prompt words are calculated based on the search behavior features and resource association features. These features are then used as input and input into the pre-trained artificial intelligence model to obtain a score for each candidate word, reflecting its priority in the prompt system. Finally, during the user input process, the system dynamically outputs prompt words in real time based on the input prefix, candidate word library and candidate score to achieve efficient and intelligent search guidance.

[0040] Traditional search prompt methods usually only provide prompts based on historical search terms in search logs, which may contain typos, non-standard expressions, and low-quality vocabulary. The professionalism and coverage of prompt terms cannot be guaranteed, and complex filtering steps are required. Furthermore, prompt terms constructed purely based on search behavior can easily lead to popular terms crowding out prompt positions, making long-tail keywords difficult to discover. Newly launched resources cannot be promptly associated with prompt terms, making them unfriendly to cold starts and new resources. The method provided in this embodiment combines search logs with resource information to construct candidate terms, covering the dual-dimensional semantic entry points of user behavior and content structure. It is no longer limited to historical terms and supports new word discovery and business term coverage. It introduces search statistical features to reflect the use value of candidate terms in real scenarios, which can suppress popular but useless prompt terms. It introduces association features to measure the semantic relevance of candidate terms to the content library, which can activate high-quality prompts with strong content but cold starts. The method automatically learns the characteristic patterns of high-quality prompt terms based on the integration of multi-dimensional features based on an artificial intelligence scoring model, making it more intelligent and adjustable than traditional manual rules or frequency ranking. The search prompt method proposed in the present invention constructs a complete closed-loop process from user behavior to content structure, from candidate word mining to scoring and ranking, and from offline modeling to online associative display, which significantly improves the accuracy, coverage and intelligence level of search prompts. It is particularly suitable for search guidance tasks in high-density resource environments such as internal enterprise knowledge bases and office systems.

[0041] Optionally, in one embodiment, the step of calculating the search statistical features of the candidate word includes: counting the number of times the candidate word is searched in a first unit time; counting the number of times the candidate word is searched and the search results are clicked in a second unit time; obtaining the time when the candidate word is first searched; counting the length of time the search results of the candidate word stay on the resource after being clicked; and counting the secondary query rate triggered by the candidate word.

[0042] In this embodiment, multi-dimensional behavioral features are extracted for each candidate word based on historical search logs. Specifically, the number of times the candidate word is searched by users as a search input within the first unit time is counted to reflect the recent popularity of the prompt word, specifically including the number of searches in the last hour, the last six hours, the last day, the last week, and the last month. The number of times the candidate word is searched and the corresponding search results are clicked within the second unit time is counted to reflect the click-through conversion ability of the prompt word, specifically including the number of searches and clicks on the corresponding search results within the last day, and the number of searches and clicks on the corresponding search results within the last month. The time when the candidate word first appears in search behavior is obtained to analyze the prompt word's life cycle or recency. Furthermore, click tracking is performed on the search results hit by the candidate word, recording the length of time users stay on the resource after clicking on it, which serves as an indirect evaluation indicator of the prompt word's guidance effect. In addition, statistics are also collected to determine whether users immediately initiate new search requests after searching using the candidate word, and the secondary query rate triggered by the candidate word is calculated to reflect the completeness and accuracy of the prompt word in meeting user intent.

[0043] By using the search prompt method provided in this embodiment, the performance of candidate prompt words at the user behavior level can be more comprehensively evaluated through the combination of the above statistical features, providing structured input for subsequent prompt word scoring.

[0044] Optionally, in one embodiment, the step of calculating the association features between the candidate word and the resources in the resource library includes: calculating the matching coefficient between the candidate word and the resources in the resource library; when the matching coefficient meets a preset condition, determining that the resource matches the candidate word; counting the total number of resources matched by the candidate word; and calculating the weighted sum of the matching coefficients of each resource matching the candidate word.

[0045] Specifically, a matching algorithm based on keywords, tags, titles, or summary fields is used to calculate the matching coefficient between the candidate term and each resource. The matching coefficient can be determined based on string similarity, keyword overlap, embedding vector similarity, and other methods. For example, if the candidate term is "reimbursement process," resource titles containing "Business trip reimbursement process specifications" or "Expense reimbursement approval process" will receive a higher matching coefficient; resources containing "Contract approval process" will receive a lower matching coefficient. When a resource's matching coefficient exceeds a set threshold, it is considered a match for the candidate term. The total number of resources matching the candidate term is further counted to measure its content coverage. The matching coefficients of all matching resources are weighted and summed to reflect the overall strength of the association between the candidate term and the content semantics. This association feature is then used as input to the subsequent scoring model to determine the representativeness of the candidate term within the content structure.

[0046] The search prompt method provided by this embodiment introduces a multi-dimensional resource matching method, which can not only identify resources where prompt words appear explicitly, but also capture related resources that are semantically similar but expressed differently. Compared with traditional methods based only on historical search records, the content association ability of prompt words is improved, especially in cold start or business terminology-rich environments.

[0047] Optionally, in one embodiment, the step of constructing a candidate vocabulary based on search logs and resource information includes: obtaining historical search logs; parsing the original search text in the historical search logs; obtaining the title, tags, keywords, path and summary description of the resource; extracting semantic units in the original search text, title, tags, keywords, path and summary description; performing the same semantic merging on all semantic units; and using the merged semantic units to construct a candidate vocabulary.

[0048] Specifically, historical search logs are first obtained and the original user search text, including the user-entered search terms and suggested terms, is extracted. The context associated with each log record (such as user role and timestamp) is analyzed to filter out invalid terms. The structured fields of all resources in the repository are then obtained, including resource titles, tags, keywords, path information, and summary content. These text fields are segmented using a word segmentation algorithm to extract semantic units, such as words, phrases, or fragments. For example, for the title "Business Trip Reimbursement Process Specifications," semantic units such as "business trip," "reimbursement," "process," and "specifications" can be extracted, while for the path "Project Management / Contract Approval / Flowchart," business terms such as "contract approval" and "flowchart" can be extracted. All extracted semantic units are then synonymized and semantically merged, for example, "expense reimbursement process" and "reimbursement process" are merged into "reimbursement process." Normalization can be performed using semantic dictionaries, embedding clustering, or rule templates. Finally, the processed set of semantic units serves as a candidate vocabulary for subsequent scoring and prompting logic.

[0049] The search prompt method provided in this embodiment integrates the user's actual search intent and the retrievable content entries in the system when constructing prompt words. This not only retains the real search expression, but also covers the semantic supplement on the content side, thereby improving the coverage and accuracy of candidate words, and solving the problem of insufficient coverage or excessive noise when constructing prompt words based only on hot words in the traditional way.

[0050] Optionally, in one embodiment, before outputting prompt words based on the candidate word library and candidate scores in response to a search input operation, the method further includes: constructing the candidate word library as a finite state transition graph. The step of outputting prompt words based on the candidate word library and candidate scores in response to the search input operation includes: acquiring real-time input information in response to the search input operation; determining a set of candidate words matching the input information from the candidate word library based on the finite state transition graph; sorting the candidate words in the candidate word set based on the candidate scores to generate a sorted prompt word list; and outputting the prompt word list for front-end association display.

[0051] Specifically, before responding to user input, the candidate word library is first constructed as a finite state transition graph (FST). An FST is a compressed automaton structure used to organize and index candidate words, enabling efficient matching and associative search of user input. The FST consists of multiple state transition paths, each corresponding to a candidate word. Once constructed, the FST is loaded into memory. During user input, the system monitors changes in the search box in real time, extracts the input characters as prefixes, and triggers a Suggest request. This suggests a request for automatic search, guiding users to relevant results as they enter, thereby improving search accuracy. The request is sent to the Suggest module, which searches the FST for matching candidate words based on the prefix to generate a candidate word set. For example, when a user searches for "reimbursement process" and enters "reimbursement" in the search box, the system receives the prefix as input and searches the FST for all paths beginning with "reimbursement," such as "reimbursement process," "reimbursement form," and "reimbursement template." The candidate words are then sorted by their scores, generating a list of prompt words sorted in descending order by score, for example: Reimbursement Process - 9.1; Reimbursement Form - 8.2; Reimbursement Template - 6.9. This list is then returned to the front-end for presentation, helping users quickly complete their search input. The FST structure is introduced to enable efficient indexing and real-time response of prompt words, ensuring a seamless interactive experience.

[0052] The search prompt method provided in this embodiment combines the real-time and efficient matching capability of FST with the semantic ranking mechanism of the scoring model, thereby ensuring both response speed and prompt word quality, thereby improving the accuracy of system prompts, user satisfaction, and association guidance capabilities.

[0053] Optionally, in one embodiment, the step of constructing the candidate vocabulary into a finite state transition graph includes: sorting the words in the candidate vocabulary in lexicographical order; decomposing the candidate words into character sequences, and using each character as a state transition edge to construct a state transition path corresponding to the candidate words; setting the terminal node of the state transition path to an accepting state, and using the candidate score corresponding to the candidate word as the output value of the accepting state; and performing prefix sharing and graph structure compression on all state transition paths, and merging them to form a finite state transition graph.

[0054] Specifically, when constructing the candidate word library as a finite state transition graph, the candidate word list is first sorted in lexicographical order to maximize prefix sharing during the construction process. Optionally, the candidate words are sorted in Unicode lexicographical order, such as: copy, edit, reimbursement form, reimbursement process, reimbursement template, and report download. Each candidate word is then split into a character sequence, and a state transition path is constructed character by character. Each character serves as a state transition edge, such as "reimbursement process" is split into "reimbursement → reimbursement → process → process", and state transition edges are constructed in sequence to construct the state transition path corresponding to the candidate word. An accepting state is set at the end of the state transition path of each candidate word, and the candidate score is bound to this state as its output; after all paths are constructed, the system performs compression optimization on the state graph, identifies common prefix paths, merges graph structure nodes, and finally forms a compressed and efficient finite state transition graph structure, which is suitable for high-frequency associative word prefix matching scenarios.

[0055] The search prompt method provided in this embodiment uses a state graph structure to organize a large number of candidate words into a data structure that can be prefix-retrieved and compressed for storage, supporting higher compression ratios, lower memory usage, and faster prefix lookup speeds, thereby improving system performance and scalability.

[0056] Optionally, in one embodiment, according to the finite state transition diagram, the step of determining a candidate word set that matches the input information from the candidate word library includes: starting from the initial state in the finite state transition diagram, performing state jumps in sequence according to the character order of the input information, and searching for a prefix path consistent with the input information; starting from the terminal node of the prefix path, traversing its successor state, and obtaining all complete state paths starting with the prefix path; and obtaining candidate words corresponding to all complete state paths, and extracting the output values ​​of their acceptance states to construct a candidate word set.

[0057] Specifically, after receiving the prefix input by the user, the system starts from the initial state of the FST and performs state transitions according to the sequence of the input characters. It attempts to find a path within the FST structure that matches the prefix. If a complete prefix path is successfully matched, the system starts from the end node of the path and traverses its subsequent state paths to obtain all possible complete state paths that can be led from the prefix. For example, if the user enters the prefix "baoxiao", the system starts from the initial state of the FST and searches for the path "bao→xiao" character by character. Once found, the system locates the end state node of the path as "xiao". From this state, the system then traverses all reachable complete paths, collecting all complete prompt words, such as "baoxiaowu", "baoxiaoshou", and "baoxiaoshout". For each complete state path, the system extracts the output value (i.e., candidate score) of the corresponding accepting state. These candidate words and their candidate scores are then combined into a candidate word set for subsequent sorting and display.

[0058] The search prompt method provided in this embodiment implements an efficient and scalable prefix matching mechanism, supports prompt candidate generation in the early stage of user input, and can effectively control the prompt quality and sorting priority in combination with the scoring results, thereby improving the accuracy of search prompts and user experience.

[0059] Example 2 Corresponding to the above-mentioned embodiment 1, embodiment 2 of the present invention provides a search system. The corresponding technical feature details and corresponding technical effects can be referred to the above-mentioned embodiment 1. Figure 3 This is a schematic diagram of the search system provided in the second embodiment of the present invention, as shown in FIG. Figure 3 As shown, the system includes a database server, a resource information processing server, a search log processing server, a message queue server, a data sorting server, a candidate score calculation server, a data push server and a search server.

[0060] Among them, the database server is used to store the resource library; the resource information processing server is used to obtain the resource information of the resource library; the search log processing server is used to obtain the search log of the resource library; the message queue server is used to collect resource information and search logs, and output them to the data sorting server; the data sorting server is used to construct candidate words based on the search logs and resource information to obtain a candidate word library; the candidate score calculation server is used to calculate the search statistical features of the candidate words, calculate the association features between the candidate words and the resources in the resource library, construct input features based on the search statistical features and the association features, input them into the pre-trained artificial intelligence model, and calculate the candidate score of the candidate word; the data push server is used to push the candidate words and candidate scores to the search server; the search server is used to respond to the search input operation and output prompt words based on the candidate word library and candidate scores.

[0061] In this embodiment, the search system includes an offline data processing part and an online data response service part: 1. The offline data processing part is responsible for collecting, processing, weighting, and pushing the original data; 2. The online data response service part is responsible for loading the prompt data, providing a service framework, and processing requests.

[0062] The data collection component uses message queue producers to collect data from search engine search logs and resource repositories. Message consumers push this data to the data processing component. The data processing component integrates search logs and resource information, filters data not suitable for display based on business requests, and pushes this data to the weight calculation component. The weight calculation component also performs featurization on relevant vocabulary data. The data push component, through the data pipeline, pushes the calculated data using two mechanisms: incremental data is pushed hourly, and full data is pushed daily.

[0063] Optionally, in one embodiment, when the candidate rating calculation server calculates the search statistical features of the candidate word, the specific steps performed include: counting the number of times the candidate word is searched in a first unit time; counting the number of times the candidate word is searched and the search results are clicked in a second unit time; obtaining the time when the candidate word is first searched; counting the length of time the candidate word's search results stay on the resource after being clicked; and counting the secondary query rate triggered by the candidate word.

[0064] Optionally, in one embodiment, when the candidate scoring calculation server calculates the association features between the candidate word and the resources in the resource library, the specific steps performed include: calculating the matching coefficient between the candidate word and the resources in the resource library; when the matching coefficient meets the preset conditions, determining that the resource matches the candidate word; counting the total number of resources matched by the candidate word; and calculating the weighted sum of the matching coefficients of each resource that matches the candidate word.

[0065] Optionally, in one embodiment, when the data sorting server constructs a candidate vocabulary based on search logs and resource information, the specific steps performed include: obtaining historical search logs; parsing the original search text in the historical search logs; obtaining the title, tags, keywords, path and summary description of the resource; extracting semantic units in the original search text, title, tags, keywords, path and summary description; performing the same semantic merging on all semantic units; and using the merged semantic units to construct a candidate vocabulary.

[0066] Optionally, in one embodiment, the candidate score calculation server is further used to construct the candidate word library as a finite state transition diagram; when the search server outputs prompt words according to the candidate word library and the candidate scores in response to the search input operation, the specific steps performed include: obtaining real-time input information in response to the search input operation; determining a candidate word set that matches the input information from the candidate word library according to the finite state transition diagram; sorting the candidate words in the candidate word set according to the candidate scores to generate a sorted prompt word list; and outputting the prompt word list for front-end association display.

[0067] Optionally, in one embodiment, the step of constructing the candidate vocabulary into a finite state transition graph includes: sorting the words in the candidate vocabulary in lexicographical order; decomposing the candidate words into character sequences, and using each character as a state transition edge to construct a state transition path corresponding to the candidate words; setting the terminal node of the state transition path to an accepting state, and using the candidate score corresponding to the candidate word as the output value of the accepting state; and performing prefix sharing and graph structure compression on all state transition paths, and merging them to form a finite state transition graph.

[0068] Optionally, in one embodiment, according to the finite state transition diagram, the step of determining a candidate word set that matches the input information from the candidate word library includes: starting from the initial state in the finite state transition diagram, performing state jumps in sequence according to the character order of the input information, and searching for a prefix path consistent with the input information; starting from the terminal node of the prefix path, traversing its successor state, and obtaining all complete state paths starting with the prefix path; and obtaining candidate words corresponding to all complete state paths, and extracting the output values ​​of their acceptance states to construct a candidate word set.

[0069] Example 3 This embodiment also provides a computer device, such as a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including an independent server or a server cluster composed of multiple servers) that can execute programs. Figure 4 As shown, the computer device 01 of this embodiment includes at least but not limited to: a memory 012 and a processor 011 which can be interconnected via a system bus. Figure 4 It should be pointed out that Figure 3 The computer device 01 is shown only with components memory 012 and processor 011 , but it should be understood that implementation of all of the components shown is not a requirement and more or fewer components may alternatively be implemented.

[0070] In this embodiment, memory 012 (i.e., readable storage medium) includes flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, a magnetic disk, an optical disk, etc. In some embodiments, memory 012 may be an internal storage unit of computer device 01, such as the hard disk or internal memory of computer device 01. In other embodiments, memory 012 may also be an external storage device of computer device 01, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash memory card, etc. equipped on computer device 01. Of course, memory 012 may also include both internal storage units and external storage devices of computer device 01. In this embodiment, memory 012 is typically used to store the operating system installed on computer device 01 and various reference software, such as the program code of the device module of the search prompt method. In addition, the memory 012 can also be used to temporarily store various types of data that have been output or are to be output.

[0071] In some embodiments, processor 011 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. Processor 011 is typically used to control the overall operation of computer device 01. In this embodiment, processor 011 is used to execute program code stored in memory 012 or process data, such as a device module for a search prompt method.

[0072] Example 4 This embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App reference store, etc., on which a computer program is stored. When the program is executed by a processor, the corresponding function is implemented. The computer-readable storage medium of this embodiment is used to store a device module of the search prompt method, which, when executed by the processor, implements the device module of the search prompt method of Example 1.

[0073] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0074] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0075] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method.

[0076] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A search prompt method, characterized in that: include: Obtaining a search log of a resource library and resource information of the resource library; Construct candidate words according to the search log and the resource information to obtain a candidate word library; Calculating search statistical features of the candidate words; Calculating association features between the candidate words and resources in the resource library; Constructing input features based on the search statistical features and the associated features, inputting the features into a pre-trained artificial intelligence model, and calculating the candidate scores of the candidate words; as well as In response to a search input operation, a prompt word is output according to the candidate word library and the candidate score.

2. The search prompt method according to claim 1, wherein: The step of calculating the search statistical features of the candidate words includes: Counting the number of times the candidate word is searched in the first unit time; Counting the number of times the candidate word is searched and the search result is clicked within the second unit time; Obtain the time when the candidate word is first searched; Counting the length of time the search result of the candidate word stays on the resource after being clicked; and The secondary query rate caused by the candidate word is counted.

3. The search prompt method according to claim 1, wherein: The step of calculating the association features between the candidate words and the resources in the resource library includes: Calculating the matching coefficient between the candidate word and the resources in the resource library; When the matching coefficient meets a preset condition, determining that the resource matches the candidate word; Counting the total number of resources matched by the candidate word; and Calculate the weighted sum of the matching coefficients of the resources that match the candidate word.

4. The search prompt method according to claim 1, wherein: The step of constructing a candidate word library according to the search log and the resource information includes: Get historical search logs; Parsing the original search text in the historical search log; Get the title, tags, keywords, path and summary description of the resource; Extracting semantic units from the original search text, the title, the tags, the keywords, the path, and the abstract description; Merging all the semantic units with the same semantics; and The merged semantic units are used to construct a candidate word library.

5. The search prompt method according to claim 1, wherein: Before outputting a prompt word according to the candidate word library and the candidate score in response to a search input operation, the method further includes: constructing the candidate word library into a finite state transition graph; In response to a search input operation, the step of outputting a prompt word according to the candidate word library and the candidate score includes: Responding to a search input operation, obtaining real-time input information; Determining, from the candidate word library, a candidate word set that matches the input information according to the finite state transition diagram; Sorting the candidate words in the candidate word set according to the candidate scores to generate a sorted prompt word list; and Output the prompt word list for front-end association display.

6. The search prompt method according to claim 5, characterized in that: The step of constructing the candidate vocabulary into a finite state transition graph comprises: Sorting the words in the candidate word library in lexicographic order; Decompose the candidate word into a character sequence, and use each character as a state transition edge to construct a state transition path corresponding to the candidate word; Setting the terminal node of the state transition path to an accepting state, and using the candidate score corresponding to the candidate word as the output value of the accepting state; and Prefix sharing and graph structure compression are performed on all the state transition paths, and they are merged to form the finite state transition graph.

7. The search prompt method according to claim 6, characterized in that: The step of determining a candidate word set matching the input information from the candidate word library according to the finite state transition diagram includes: In the finite state transition diagram, starting from the initial state, the state jumps in sequence according to the character sequence of the input information, and searches for a prefix path consistent with the input information; Starting from the end node of the prefix path, traverse its successor states to obtain all complete state paths starting from the prefix path; and The candidate words corresponding to all the complete state paths are obtained, and the output values ​​of the acceptance states are extracted to construct the candidate word set.

8. A search system, characterized in that: include: Database server, used to store resource libraries; A resource information processing server, configured to obtain resource information of the resource library; A search log processing server, configured to obtain the search log of the resource library; A message queue server is used to collect the resource information and the search log and output them to a data collating server; The data collating server is used to construct candidate words based on the search log and the resource information to obtain a candidate word library; A candidate score calculation server is used to calculate the search statistical features of the candidate word, calculate the association features between the candidate word and the resources in the resource library, construct input features based on the search statistical features and the association features, input them into a pre-trained artificial intelligence model, and calculate the candidate score of the candidate word; A data push server, configured to push the candidate words and the candidate scores to a search server; The search server is configured to output prompt words according to the candidate word library and the candidate scores in response to a search input operation.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.