Method for searching content creation object

Through the methods of splitting and logical framework construction, the problems of logical relationship conversion and database adaptation in natural language search are solved, and high-precision content creation object search is achieved.

CN119782578AActive Publication Date: 2025-04-08GUANGZHOU TAIDONG TECH CO LTD

Patent Information

Application Number
CN202510101726.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-04-08
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

The prior art is difficult to accurately understand the complex logical relationships in natural language expressions in natural language searches for content creation objects, and it is difficult to convert these logical relationships into filtering conditions that adapt to database structures, resulting in inaccurate search results.

Method used

By obtaining the search request expression of natural language, split it into a single word or phrase, and constructing a logical framework of multi-dimensional filtering conditions based on the logical relationship between these words or phrases. Convert the logical framework into structural expressions to match in the content authoring object database. At the same time, the search request expression is converted into a question vector, and the matching degree is evaluated with the context statement vector of the content creation object description information.

Benefits of technology

It realizes accurate analysis of user's natural language search intentions and adapts to the database structure, improving the accuracy and user experience of search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782578A_ABST
    Figure CN119782578A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a content creation object searching method, which comprises the following steps of: acquiring an input search request expression which is expressed by using a natural language; splitting the search request expression into a single word or a single phrase based on an inner word code allocated for the content authoring object; based on the logical relationship between single words or single phrases, constructing a logical framework comprising multi-dimensional screening conditions; the logic framework is converted into a structure expression, and database table fields are matched in a content creation object database on the basis of the structure expression; searching content creation objects in a content creation object database based on the matched database table fields to obtain a plurality of pieces of content creation object description information; and converting the search request expression into a question vector, converting each piece of content creation object description information into a context statement vector to calculate a matching degree evaluation score of the two pieces of content creation object description information, and returning the content creation object according to the matching degree evaluation score.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of artificial intelligence technology, and in particular, to a method for searching content creation objects. Background Art

[0002] With the rapid development of the Internet, a large amount of data related to Internet celebrities or anchors has been accumulated in the long-term overseas operation process, and a huge database has been built for internal free use and external paid use. When retrieving information from the database, traditional search technologies are widely used to meet different search needs. Common conventional search technologies are mainly based on logical operators, such as using logical relationships such as "and", "or" and "not" for logical search, and filtering out data that meets the requirements by accurately setting these logical conditions. In addition, full-text search technology also plays a role to a certain extent. It can search text content more comprehensively and is more effective when searching for specific keywords. These traditional search technologies can indeed provide good support when dealing with some established and relatively clear search needs, helping users obtain the corresponding content creation object information from the database. However, in recent years, generative AI technology has flourished and has shown great application potential in many fields. In the field of content creation object search, users expect to express their search intentions more naturally and conveniently, and the traditional search method that relies on fixed logical operators and keyword settings has gradually shown its limitations. Natural language is the most commonly used expression method in daily communication. If it can be applied to the search process of content creation objects such as Internet celebrities or anchors, it will undoubtedly greatly enhance the user's search experience, so that users no longer need to carefully conceive keywords and logical relationships that conform to specific search grammar rules. Just enter the content you want to find like a daily conversation to initiate a search request. At present, although some search technologies have tried to develop in the direction of natural language search, there are still many problems that need to be solved. For example, how to accurately understand the complex logical relationship between the various parts of the search request expressed in natural language, how to reasonably convert this logical relationship into a screening condition that can be adapted to the database structure, and how to accurately find the object that best matches the natural language search request among the numerous content creation object description information. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a method for searching content creation objects to at least partially solve the above problems.

[0004] According to a first aspect of an embodiment of the present invention, a method for searching for content creation objects is provided, which includes: obtaining an input search request expression, wherein the search request expression is expressed in natural language; splitting the search request expression into single words or single phrases based on an internal word segmentation code assigned to the content creation object; constructing a logical framework including multi-dimensional screening conditions based on the logical relationship between the single words or the single phrases; converting the logical framework into a structural expression to match database table fields in a content creation object database based on the structural expression; searching for content creation objects in the content creation object database based on the matched database table fields to obtain a number of content creation object description information; converting the search request expression into a question vector, and converting each content creation object description information into a context statement vector; calculating a matching evaluation score between the question vector and the context statement vector; screening out and returning the content creation object pointed to by the corresponding content creation object description information when the matching evaluation score is greater than a set matching evaluation score threshold.

[0005] The solution of the embodiment of the present invention has the following technical advantages:

[0006] 1. Improve user search experience

[0007] This method first obtains the search request expression in natural language, which is in line with people's daily communication habits and is in contrast to the traditional search method that relies on fixed logical operators and keyword settings. Users do not need to spend energy to conceive keywords and logical relationships according to specific search grammar rules. They can initiate a search request by simply entering the content they want to find like a normal conversation, which greatly reduces the user threshold and makes user operation more convenient and natural.

[0008] 2. Accurately analyze search intent and adapt database structure

[0009] Based on the internal word segmentation code assigned to the content creation object, the search request expression in natural language is split into individual words or phrases, and the logical relationship between them is further analyzed to build a logical framework including multi-dimensional screening conditions. This transformation from natural language to logical framework can deeply explore the complex logical relationships implied in the search request, no longer limited to simple keyword matching, making the understanding of user search intent more accurate and comprehensive.

[0010] The constructed logical framework is converted into a structural expression so that it can be matched with the table fields of the content creation object database, thereby conducting a search in the database. This link realizes the connection from understanding the user's natural language intention to adapting the database structure, ensuring that the data in the database can be used to accurately find the content creation objects that meet the requirements, overcoming the previous problem of difficulty in properly connecting natural language logic with database structure.

[0011] 3. Accurately match search results

[0012] The search request expression is converted into a question vector, each content creation object description information is converted into a context sentence vector, and the matching evaluation score of the two is calculated. The vector representation can capture the deep semantic information of words and sentences, and the similarity between the two is measured by the matching evaluation score. Compared with the traditional method based only on keyword matching, it can more accurately judge the fit between the content creation object and the search request, and dig out the objects that truly meet the user's needs at the semantic level.

[0013] Finally, the content creation objects pointed to by the corresponding content creation object description information when the matching evaluation score is greater than the set matching evaluation score threshold are filtered out and returned. By setting a reasonable threshold, the accuracy of the search results can be further controlled to avoid returning too many content creation objects with weak relevance, ensuring that the results presented to users are of high quality and highly matched with the search request. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0015] Figure 1 A flowchart of a method for searching content creation objects provided in an embodiment of the present invention.

[0016] Figure 2 A schematic diagram of a content creation object search device provided in an embodiment of the present invention.

[0017] Figure 3 A structural schematic diagram of an electronic device is provided for an embodiment of the present invention. DETAILED DESCRIPTION

[0018] Figure 1 A flowchart of a method for searching content creation objects provided by an embodiment of the present invention is shown below. Figure 1 As shown, including:

[0019] Obtaining an input search request expression, where the search request expression is expressed in a natural language;

[0020] Splitting the search request expression into individual words or individual phrases based on the internal word segmentation codes assigned to the content creation object;

[0021] Based on the logical relationship between the single words or the single phrases, a logical framework including multi-dimensional screening conditions is constructed;

[0022] Converting the logical framework into a structural expression to match database table fields in a content creation object database based on the structural expression;

[0023] Based on the matched database table fields, searching for content creation objects in the content creation object database to obtain a plurality of content creation object description information;

[0024] Convert the search request expression into a question vector, and convert each content creation object description information into a context sentence vector;

[0025] Calculating a matching evaluation score between the question vector and the context sentence vector;

[0026] The content creation object pointed to by the corresponding content creation object description information when the matching evaluation score is greater than the set matching evaluation score threshold is filtered out and returned.

[0027] To this end, the search method for the content creation object provided in this embodiment optimizes and innovates multiple links from user input, intent understanding, database adaptation to result matching, effectively overcoming many problems existing in the existing natural language search technology in the search for content creation objects such as internet celebrities or anchors, and improving the accuracy, convenience and practicality of the search.

[0028] Optionally, the input search request expression is obtained, and the search request expression is expressed in natural language: a front-end-based multimodal event listener listens to input events, captures user input in real time, and converts the captured input into a character stream through a set conversion function, wherein the input event includes at least one of a keyboard input event, a voice input event, and a handwriting input event; the character stream is added to a configured buffer in the order of input to form a character stream sequence; according to the set grammar rules, a preliminary grammar check and automatic completion are performed on the character stream sequence to generate a search request expression.

[0029] To this end, the specific processing method of obtaining the input search request expression has the following technical benefits:

[0030] 1. Convenience and inclusiveness of multimodal input

[0031] The front-end-based multimodal event listener can listen to input events corresponding to various input methods, including keyboard input events, voice input events, handwriting input events, etc. This design fully considers the usage habits and actual needs of different users in different scenarios. Whether it is a user who is accustomed to traditional keyboard typing, a user who prefers voice input in mobile scenarios, or a user who inputs content by handwriting, they can all easily initiate search requests, greatly improving the applicability of the system to different user groups.

[0032] For example, when users are walking or driving in situations where typing is inconvenient, they can directly use voice input to initiate a search by saying "Find funny pet bloggers"; and for some users who are not good at typing but are more comfortable with writing, handwriting input can also meet their needs, broadening the ways in which users interact with the search system.

[0033] 2. Accuracy and Completeness of Input Processing

[0034] Through the set conversion function, the captured input in various forms is converted into a character stream, unifying the format of the input data. The data collected by different input methods are in different forms. Voice input is an audio signal, handwriting input is a graphic track, etc. After converting it into a character stream, it is convenient to process it according to unified rules and processes, avoiding the processing difficulties caused by mixed data formats, and laying the foundation for accurate analysis of user input.

[0035] For example, the content of voice input is converted into text through speech recognition technology and then further converted into a character stream, so that subsequent grammar checking and other processing steps can be performed like regular text input, ensuring the standardization of the entire processing flow.

[0036] Adding character streams to the configured buffer in the order of input to form a character stream sequence can completely preserve the order and content of user input. In the actual input process, users may input content multiple times and intermittently. The buffer mechanism can integrate these scattered inputs to ensure that the final character stream sequence accurately reflects the complete search request that the user wants to express, avoid information loss or confusion, and improve the integrity and processability of the input content.

[0037] For example, the user first enters "search", pauses for a few seconds and then enters "can dance", and finally enters "fitness anchor". The buffer can be used to orderly combine these sequentially entered character streams into a complete character stream sequence such as "search for a fitness anchor who can dance", which facilitates the subsequent generation of accurate search request expressions.

[0038] 3. Syntax optimization improves search efficiency and accuracy

[0039] Performing a preliminary grammar check on the character stream sequence according to the set grammar rules can detect possible grammatical errors in user input in advance, such as missing necessary conjunctions, improper word collocation, etc. Timely identifying these errors and giving corresponding prompts or automatic corrections (within a certain range) can avoid the situation where search requests cannot be accurately parsed or search results are greatly biased due to grammatical errors, which helps improve search accuracy.

[0040] For example, if the user enters "dancing fitness anchor" (lacking conjunctions and other components, and the grammar is not very accurate), the grammar checker can prompt the user to supplement it with "find a fitness anchor who can dance", so that the search request expression is more in line with normal language logic, allowing the system to better understand the user's intention and perform subsequent processing.

[0041] The auto-complete function supplements and improves the incomplete content input by users based on grammatical rules and common language expression habits, which not only facilitates user input and reduces their input workload, but also further standardizes the expression of search requests to make them more in line with the format that the system can accurately process. This helps to speed up user input and improve overall search efficiency. At the same time, it also makes the generated search request expression more conducive to accurate conversion into effective screening conditions for search operations in subsequent links.

[0042] For example, after the user enters "find funny", the system automatically completes it as "find funny pet bloggers" based on past popular searches and grammatical rules. This not only conforms to common expression habits, but also makes the search request more clear and specific, making it easier for the system to accurately find the corresponding content creation objects, thereby improving the efficiency and accuracy of the entire search process.

[0043] Optionally, the front-end-based multimodal event listener listens to input events and captures user input in real time, including:

[0044] For the keyboard input event, use the addEventListener component of JavaScript to bind the multimodal event listener to the keydown, keyup and keypress events of the search input box to trigger keyboard input event capture when the user inputs characters on the keyboard;

[0045] For the voice input event, the multimodal event listener is bound to a click event or a voice wake-up event of the voice input button through a voice recognition interface provided by the browser, so as to trigger the capture of the voice input event when the user inputs characters by voice;

[0046] For the handwriting input event, the multimodal event listener is bound to the handwriting input area through the interface of the handwriting recognition library to trigger the capture of the handwriting input event when the user inputs characters by handwriting.

[0047] To this end, by performing corresponding precise binding operations for different input events, the following technical benefits are achieved:

[0048] 1. Accurately capture keyboard input to ensure comprehensive monitoring of text input

[0049] 1. Comprehensive coverage of keyboard operations

[0050] Use JavaScript's addEventListener component to bind the multimodal event listener to the keydown, keyup, and keypress events of the search input box, so that the input corresponding to the different operations performed by the user on the keyboard can be captured in all directions. The keydown event can capture the operation when the key is pressed, the keyup event corresponds to the situation when the key is released, and the keypress event focuses on the input of printable characters. By monitoring these three key keyboard events, it is ensured that any action of the user entering characters through the keyboard will not be missed, so that the user's text input content can be completely and accurately obtained.

[0051] For example, when a user quickly and continuously inputs a string of characters, the keydown event will respond to each key press in turn, the keypress event will process printable characters, and the keyup event will respond to key releases. The system can record the characters corresponding to these operations in sequence. For example, when a user inputs "find funny anchor", regardless of the input speed, the complete input text can be accurately obtained through the joint monitoring of these three events, providing reliable raw data for the subsequent generation of accurate search request expressions.

[0052] 2. Closely integrate with the input box to improve input relevance

[0053] Bind the listener to the keyboard event corresponding to the search input box, so that the input capture is closely related to the specific search input scenario. The user performs keyboard operations in this specific input box to initiate a search request. This binding method can directly focus on the user's input content in search-related operations, avoiding interference with other irrelevant keyboard operations, improving the pertinence and effectiveness of captured input, and ensuring that only valid character information for search purposes is obtained.

[0054] For example, there may be multiple input areas on a web page, but by accurately binding the listener to the relevant keyboard events of the search input box, only the keyboard input performed by the user in this input box specifically used for search will be processed as the content of the search request. For example, text editing operations performed by the user in other text boxes on the page will not be mistaken for search input, making input capture more accurately serve the search function.

[0055] 2. Effectively capture voice input and adapt to various voice interaction scenarios

[0056] 1. Use browser interface to simplify development and integration

[0057] By binding the multimodal event listener to the click event or voice wake-up event of the voice input button through the voice recognition interface provided by the browser, developers do not need to build a complex underlying voice recognition architecture by themselves with the help of the existing voice function module of the browser, which reduces the difficulty and cost of development while ensuring the accuracy and stability of voice recognition. Because the browser's voice recognition interface is usually a lot of optimization and testing, it can better adapt to different devices, network environments, etc., and can quickly and easily integrate the voice input function into the search system.

[0058] For example, common modern browsers (such as Chrome, Firefox, etc.) have relatively mature voice recognition functions built in. Developers only need to bind the multimodal event listener to it according to the specifications. When the user clicks the voice input button (such as the microphone icon next to the web search bar) or wakes up the voice input function through the voice wake-up word, the voice input event capture can be successfully triggered, and the user's voice can be quickly converted into text content that can be used for search, so that the voice input function can be easily implemented in the search system.

[0059] 2. Flexible trigger mechanism to meet diverse usage habits

[0060] Supports two triggering methods: click events bound to the voice input button and voice wake-up events, taking into full consideration the different usage scenarios and operating habits of users. Some users may be more accustomed to actively clicking buttons to start voice input, while others hope to start voice input in a more convenient and natural way through voice wake-up (similar to the wake-up method of smart speakers). Providing multiple triggering mechanisms can meet the personalized needs of different user groups and improve the ease of use and user acceptance of the voice input function.

[0061] For example, when using the search function on a mobile device, the user may directly click the voice input button to perform a voice search if the handheld device is convenient to operate; when the device is placed aside or the user's hands are inconvenient to operate, voice input can be used to initiate a search request through voice wake-up (such as saying a wake-up word such as "Hi, search assistant"). The diverse triggering methods provide users with a more flexible voice interaction experience.

[0062] 3. Reliably capture handwriting input and expand the diversity of input methods

[0063] 1. Functional integration with the handwriting recognition library interface

[0064] Through the interface of the handwriting recognition library, the multimodal event listener is bound to the handwriting input area, and the powerful recognition ability of the professional handwriting recognition library is used to convert the handwriting graphic trajectory into the corresponding character information, thereby realizing the effective capture of handwriting input. The handwriting recognition library is usually trained with a large number of handwriting samples and can accurately recognize handwriting content of different writing styles and fonts. Integrating it into the search system provides a convenient input method for users who are accustomed to handwriting input or are more suitable for handwriting in specific scenarios, enriching the input method of the search system.

[0065] For example, on some devices with touch screens, such as tablet computers or laptops that support stylus pens, users can directly write the content they want to search for (such as "find a painting tutorial host") in the designated handwriting input area. The handwriting recognition library will convert the handwritten text into character information, and the multimodal event listener will be able to capture the handwriting input event and pass the corresponding character content to subsequent links for processing, so that the search system can be compatible with handwriting, an intuitive and personalized input method.

[0066] 2. Specific area binding enhances input targeting

[0067] Binding the listener to the handwriting input area clarifies the scope of the handwriting input. Only handwriting operations within this specific area will be processed as search input content, avoiding interference caused by other possible handwriting operations on the screen (such as handwritten annotations, drawings, and other non-search related operations), ensuring the accuracy and specificity of handwriting input capture, and ensuring that the handwriting information received by the system is valid content for initiating search requests.

[0068] For example, in a web application with handwriting function, a special handwriting input box is set up for search input. The user's handwritten text in this box will be accurately captured as content related to the search request, while handwriting drawings and other operations performed elsewhere on the page will not be mistakenly recognized as search input, thereby improving the effectiveness of handwriting input for search.

[0069] Optionally, the character stream sequence is subjected to preliminary grammar checking and automatic completion according to the set grammar rules to generate a search request expression, including: parsing the grammar rules based on the set grammar rule parser to create keyword object phrases and connector object phrases, wherein the grammar rules include keyword rules, connector rules, and numerical range rules, wherein the keyword rules list various attribute keywords related to the anchor and their possible variants; the connector rules define how to use the connectors "and", "or", "greater than", and "less than" in search requests; the numerical range rules specify how to express numerical search conditions; based on the grammar detection state transition mechanism defined by the set finite state machine, from the beginning of the character stream sequence, Initially, the analysis is performed character by character, wherein for each character, the category to which it belongs is first determined, whether it is a letter, number, punctuation mark or special character; if it is a letter, the current character is determined to be part of a keyword based on the context of the character, and a match is performed with the keyword object array to check whether there is a matching keyword; if it is a punctuation mark or a conjunction, its use is checked to see if it complies with the grammatical structure defined in the conjunction rule to generate a grammar detection result; based on the grammar detection result, possible subsequent keywords or search conditions are determined to generate automatic completion suggestions; and, based on the user's historical search records, the user's frequently used search patterns and keyword combinations are analyzed, and incorporated into the automatic completion suggestions to generate a search request expression.

[0070] To this end, the above series of operations from grammar rule parsing, finite state machine-based grammar detection to automatic completion suggestion generation has the following technical benefits:

[0071] 1. Grammatical rule analysis and phrase creation

[0072] The grammar rule parser performs parsing operations based on pre-set grammar rules. For keyword rules, it will sort out various attribute keywords related to the anchor and their possible variant forms. For example, "number of fans" may also have variant expressions such as "number of fans" and "number of followers". These are sorted and classified into keyword object phrases to facilitate the subsequent accurate identification of related content in the character stream sequence. For the conjunction rules, the specific use of conjunctions such as "and", "or", "greater than" and "less than" in search requests is clearly specified, and they are parsed and constructed into conjunction object phrases, so that the system can clearly determine whether the use of conjunctions in sentences complies with grammatical specifications. The numerical range rules carefully regulate how numerical search conditions should be expressed, such as specifying the combination of numbers and units, the format of range representation (such as "greater than 100,000", "between 5 and 10", etc.), and by parsing this set of grammar rules, the foundation for subsequent grammar detection and completion is laid.

[0073] The created keyword object phrases and conjunction object phrases are equivalent to building a grammatical knowledge base. They clarify which words are valid and comply with the rules in the specific language environment of the search request expression, and what connection methods are reasonable between these words, providing a standardized reference basis for the system to accurately understand the user input content.

[0074] To this end, by clearly defining keyword object phrases and conjunction object phrases, the system can more accurately understand the semantics of the character stream sequence entered by the user. For example, when the user enters "the number of fans exceeds 100,000", the system can accurately determine that the user wants to express the condition of the number of fans of the anchor by relying on the record of "number of fans" and its variants in the keyword object phrase, avoiding misunderstanding of the user's intention due to slight differences in expression, and improving the accuracy of semantic analysis of natural language search requests.

[0075] In addition, the conjunction object phrases and the grammatical framework constructed under each rule provide clear standards for judging whether the search request expression meets the grammatical requirements. Based on these standards, the system can accurately identify whether the conjunctions in the user input are used properly, whether the numerical range is expressed accurately, and other grammatical situations, which helps to timely discover and correct grammatical errors, ensure the standardization of search requests, and provide correct input content for subsequent effective execution of search operations.

[0076] 2. Syntax Detection Based on Finite State Machine

[0077] The finite state machine defines the state transition mechanism for syntax detection, which starts from the beginning of the character stream sequence and analyzes and processes each character one by one. In this process, the category to which each character belongs (such as letters, numbers, punctuation marks or special characters) is determined, and then different analysis strategies are adopted according to the category and the context of the current character. For alphabetic characters, the context is combined to determine whether they are part of a keyword, and this is confirmed by matching with the constructed keyword object array; for punctuation marks or conjunctions, it is checked whether their use follows the grammatical structure defined in the conjunction rules. As each character is analyzed, the finite state machine switches between different syntax detection states according to the pre-set state transition rules, such as from the starting state of identifying a keyword, to the intermediate state of gradually matching the complete keyword, to the associated state of judging whether the subsequent conjunctions are used correctly, etc., and finally generates a comprehensive syntax detection result, reflecting the compliance of the entire character stream sequence at the grammatical level.

[0078] This method of analyzing each character one by one and making judgments based on the context and established rules can go deep into the most granular level of the input content and not miss any possible grammatical problems. Whether it is a spelling error of a single keyword, inappropriate use of conjunctions, or the overall sentence structure not conforming to grammatical norms, it can be detected through the rigorous state transition process of the finite state machine to ensure that the grammar check of user input is comprehensive and detailed.

[0079] Therefore, since the finite state machine can analyze each character and its context in detail, it can find many hidden and complex grammatical errors. For example, when a user inputs "find anchors with more than and 100,000 fans", the finite state machine can detect each character one by one and accurately determine the grammatical structure error that does not conform to the conjunction rule definition such as "greater than and", and promptly prompt the user to make corrections, avoiding deviations in subsequent searches caused by such grammatical errors, thus improving the quality of search request expression.

[0080] No matter how complex the character stream sequence input by the user is or how irregular the format is, the finite state machine can perform effective syntax detection based on its flexible state transition mechanism. It is not limited to fixed sentence templates and can handle search request input in various natural language expressions, enhancing the system's adaptability to different user input styles and habits and improving the robustness of the overall system.

[0081] 3. Autocomplete suggestion generation

[0082] The possible subsequent keywords or search conditions are determined based on the grammar detection results to generate automatic completion suggestions. For example, if the grammar detection finds that the user has entered "find funny" but has not yet entered a complete description object, the system determines that it may be necessary to supplement keywords related to the anchor type, such as "pet anchor", based on keyword rules and common search sentence structures, and then gives corresponding automatic completion suggestions. This type of completion is based on the current status of the sentence analyzed by the previous grammar detection and the reasonable expression methods defined by the grammar rules. It aims to make the content entered by the user more grammatically correct and more complete and clear, so as to facilitate accurate conversion into effective search requests.

[0083] At the same time, the system will also deeply analyze the user's historical search records to discover the search patterns and keyword combinations that users frequently use. For example, if it is found that users have searched for "funny pet anchor" and "funny food anchor" many times in the past, and the content contains the keyword "funny", when it is detected that the user inputs "funny" related expressions again, these high-frequency related keyword combinations will be incorporated into the automatic completion suggestions, making the completion content more in line with the user's personalized search preferences, and improving the pertinence and practicality of the automatic completion.

[0084] To this end, automatic completion suggestions can help users reduce the workload of input and quickly generate complete and standardized search request expressions. Users do not need to manually enter complete long sentences, but only need to select or modify them slightly based on the reasonable completion suggestions given by the system, which saves input time. This convenience is more obvious, especially for some longer and more complex search requests, and improves the efficiency of user interaction with the search system.

[0085] By integrating the user's historical search history to optimize the auto-complete suggestions, the system can better adapt to each user's unique search habits and preferences, and provide personalized input assistance for different users. The completion suggestions that each user sees are more likely to be in line with their past search needs and common expressions, making the search process more in line with the user's personal expectations, enhancing the user's favorability and loyalty to the search system, and improving the overall user experience.

[0086] Optionally, the search request expression is split into single words or single phrases based on the internal word segmentation code assigned to the content creation object, which includes: collecting attribute features of the content creation object, defining different word segmentation codes with different attributes and setting multiple matching modes for each word segmentation code, the matching modes including synonyms, near-synonyms and colloquial expression matching, wherein the attribute features include: basic information, business-related information, style characteristics and social influence-related information; all word segmentation codes and their corresponding matching modes are converted into a hash table for storage, and when a hash conflict occurs, a free storage location is found according to a predefined detection sequence to store the conflicting elements, or the conflicting elements are stored in a linked list structure in the same hash bucket to access the conflicting elements through a linked list traversal operation.

[0087] To this end, the above-mentioned processing of the attribute characteristics of content creation objects and the hash table storage and conflict handling mechanism have the following technical benefits for subsequent search request splitting and the entire search process in terms of semantic understanding, data management and retrieval efficiency:

[0088] 1. Collect attribute features and set word segmentation codes and matching patterns

[0089] First, we comprehensively collect the attribute characteristics of content creation objects (such as Internet celebrities, anchors, etc.) and classify them according to different attribute dimensions, covering basic information (such as name, gender, age, etc.), business-related information (such as broadcast categories, live broadcast time, partner brands, etc.), style characteristics (such as humorous, serious and professional, lively and cute, etc.) and social influence-related information (such as the number of fans, the number of likes, the interaction of comments, etc.). For these different categories of attributes, we define unique word segmentation codes for them to establish a mapping relationship from attributes to codes. For example, for the attribute "broadcast category", a specific word segmentation code is assigned to facilitate the subsequent use of the code to uniformly refer to and process related information.

[0090] Multiple matching modes are set for each word segmentation code, taking full account of the diversity of natural language expressions. Synonyms, near-synonyms, and colloquial expression matching modes are included because when users actually enter search requests, they may not use standard, unified vocabulary to describe relevant attributes. For example, for the attribute feature of "large number of fans", users may use different expressions such as "super many fans" (colloquial expression) and "many followers" (synonyms). By setting these matching modes, the system can associate these semantically similar but differently expressed words with the corresponding word segmentation codes, thereby more comprehensively and accurately understanding the specific attribute content involved in the search request entered by the user.

[0091] To this end, by defining word segmentation codes based on different attributes and setting a rich matching mode, the system can accurately map the diverse expressions in natural language to the corresponding attribute concepts. No matter what vocabulary the user uses to describe a certain attribute of the content creation object, the system has a greater probability of accurately understanding its intention, avoiding omissions or misunderstandings of key attribute information that the user wants to find due to differences in expressions, and improving the accuracy of semantic analysis of search requests. For example, when a user searches for "looking for the kind of host who is particularly funny", relying on the matching modes such as synonyms and colloquial expressions set for the "humorous and witty" style under the "style characteristics" attribute, the system can accurately identify that the user wants to find a host with a humorous style, and then accurately filter out objects that meet the requirements.

[0092] The definition of word segmentation codes realizes the unified management and standardized identification of different attribute features. In the subsequent search process, whether it is the splitting of search request expressions or the matching with database fields, operations can be performed based on these standardized word segmentation codes, avoiding processing confusion caused by the complexity and diversity of attribute descriptions, making the various links of the entire search system more smoothly connected, and improving the overall maintainability and processing efficiency of the system.

[0093] 2. Hash table storage and conflict handling mechanism

[0094] All the segmentation codes and their corresponding matching patterns are converted and stored in a hash table. The segmentation codes (or their associated key information) are calculated using a hash function to obtain a corresponding hash value, which determines the storage location of the element in the hash table. For example, for a segmentation code representing the attribute "number of fans", after being calculated by a hash function, it will be mapped to a specific location in the hash table for storage, and its corresponding multiple matching patterns (such as "many fans" and "many followers" and other vocabulary sets) are also stored in this location or in a structure associated with it. In this way, when searching for a matching pattern related to a segmentation code in the future, the corresponding storage location can be quickly located by calculating the hash value again, realizing efficient search operations, and the time complexity can usually reach a level close to O(1), greatly improving the data retrieval speed.

[0095] However, different word segmentation codes may get the same hash value after being calculated by the hash function, resulting in hash conflicts. To solve this problem, an open addressing method is used to find free storage locations using a pre-defined detection sequence. That is, when a conflict occurs, subsequent storage locations are checked one by one according to a predetermined detection sequence (such as linear detection, quadratic detection, etc.) until a free location is found to store the conflicting elements. Another common processing method is to use a linked list structure to store the conflicting elements on a linked list in the same hash bucket (that is, the storage location corresponding to the conflicting hash value), and then access these conflicting elements by traversing the linked list. In this way, even if there is a hash conflict, it can ensure that all elements can be properly stored and accurately obtained when needed.

[0096] To this end, the hash table storage structure itself provides extremely fast search speed, which is crucial for operations that frequently need to find matching patterns based on word segmentation codes during the search process. Whether it is to quickly determine the matching pattern corresponding to a word when splitting the search request expression, or to verify whether a certain attribute-related word meets the set matching range in other links, it can be quickly completed through the hash table, significantly reducing data search time and improving the execution efficiency of the entire search process. The advantages are even more obvious when processing large-scale word segmentation codes and matching pattern data.

[0097] Through a reasonable hash conflict handling mechanism, it is ensured that all data can still be stored and accessed completely even if different word segmentation codes are mapped to the same location. The detection sequence of the open addressing method can effectively utilize the free space of the hash table, and the linked list structure solves conflicts in a simple and intuitive way, making the system have good adaptability and stability when facing complex and diverse data storage requirements and inevitable hash conflicts. Data will not be lost or processed incorrectly due to conflicts, ensuring the reliability of the entire data storage and retrieval mechanism.

[0098] Optionally, splitting the search request expression into individual words or phrases based on the internal word segmentation code assigned to the content creation object includes: standardizing the search request expression and removing stop words to obtain the search request expression to be split;

[0099] Starting from the beginning of the search request expression to be split, according to the longest phrase matching mode defined in the internal word segmentation code library, try to match words or phrases in turn and identify words and phrases according to the context relationship, and the context relationship is obtained by analyzing the co-occurrence probability of the previous and next words and phrases through a set context window; determine whether the identified words and phrases have matching word segmentation codes in the internal word segmentation code library, if so, determine the words and phrases as the words or phrases obtained by splitting; if not, calculate the similarity between the identified words and phrases and the word segmentation codes of the internal word segmentation code library, if the similarity is greater than the set similarity threshold, supplement the words and phrases as the words or phrases obtained by splitting.

[0100] To this end, the above series of operations from preprocessing of search request expressions to word and phrase splitting and judgment based on the word segmentation code library has the following technical benefits:

[0101] 1. Standardization of search request expressions and removal of stop words

[0102] Standardization of search request expressions aims to unify the format, encoding, and some common text specifications of input text, such as converting full-width characters to half-width characters, unifying uppercase and lowercase characters, etc. This can reduce the complexity of subsequent processing caused by inconsistent text formats, allowing the system to treat the search request expressions entered by users in a relatively unified and standardized format, avoiding recognition errors or processing difficulties caused by format differences.

[0103] Stop words refer to words that frequently appear in natural language but are not very helpful in expressing the essential semantic content, such as "的" (de), "是" (shi), "在" (zai), etc. By removing these stop words from the search request expression through a specific stop word list or rules set based on statistical information such as word frequency and part of speech, it can effectively streamline the text content, highlight the key content words, enable the subsequent word and phrase recognition to focus on the parts with more semantic value, reduce unnecessary processing burdens, and also help improve the accuracy of capturing the core semantics.

[0104] Therefore, the standardization operation enables search request expressions in various formats input by different users to be converted into a unified format that meets the system processing requirements, facilitating the subsequent links to use unified rules and algorithms for processing, reducing the probability of errors caused by format differences, and improving the consistency and accuracy of the entire system in processing search requests. For example, whether the user inputs "FIND FUNNY HOST" in uppercase or "find funny host" in lowercase, after standardization processing, they can enter the subsequent analysis process in a unified format (such as the lowercase form), avoiding recognition problems due to different cases.

[0105] Removing stop words can enable the system to quickly focus on the core words and phrases that truly reflect the search intent and avoid being interfered by a large number of words without essential semantics. For example, when the user inputs "我想要找一个很搞笑的主播" (I want to find a very funny host), after removing the stop words "我" (I), "想要" (want), "一个" (a), "很" (very), the remaining "找搞笑主播" (find funny host) more clearly highlights the key search content, helping to more accurately split and identify words and phrases related to the search intent in the subsequent process, and improving the efficiency and effect of semantic understanding.

[0106] II. Longest Phrase Matching Mode and Context Relationship Analysis

[0107] Matching according to the longest phrase matching mode defined in the internal word segmentation code library is based on the following idea: In natural language, there are many phrase structures composed of multiple words with specific semantics, such as "美食分享主播" (food sharing host), "户外探险博主" (outdoor adventure blogger), etc. Starting from the beginning of the search request expression to be segmented, first try to match the longest possible phrases instead of simply splitting by single words. This can better preserve semantic integrity, avoid wrongly splitting words with internal semantic connections, and improve the accuracy of semantic understanding of the user input content. Because in many cases, the meaning expressed by a complete phrase is not simply the sum of its component words but has a unique overall semantics, and the longest phrase matching mode can better capture this semantics.

[0108] The co-occurrence probability of the previous and next words and phrases is analyzed through the set context window to determine the contextual relationship. The context window is like an observation range. For example, if the window size is set to 3, then for a certain middle word or phrase, the frequency of the three words or phrases before and after it co-occuring with it will be checked. Based on a large amount of text data statistics or pre-trained language models and other means, the co-occurrence probability distribution of different words and phrases in a specific context can be obtained. Based on this probability information, the relevance and semantic role of the currently identified words and phrases in the specific context can be judged, which helps to more accurately identify words and phrases and further improve the semantic understanding of the entire search request expression.

[0109] To this end, the longest phrase matching mode can preserve the semantic integrity of phrases in natural language to the greatest extent possible, avoiding the loss of semantic information due to excessive splitting. For example, for a search request expression such as "find anchors who like to share travel stories", splitting it into individual words may destroy the complete semantic structure of "sharing travel stories", while the longest phrase matching mode can identify it as a whole, which is more in line with the actual meaning of the user, thereby providing a more accurate semantic basis for subsequent precise matching of content creation objects.

[0110] Contextual relationship analysis considers contextual information such as the co-occurrence probability of words and phrases, allowing the system to more accurately grasp the semantic role of each identified part in the entire search request expression. For example, in "Find an interesting outdoor food anchor", by analyzing the context, it can clarify the relationship between "outdoor" and "food" in the subject-related attributes of "anchor", avoiding viewing each word in isolation, helping to accurately split words and phrases that meet actual intentions based on the complete semantic context, and improving the accuracy and effectiveness of subsequent searches based on these split results.

[0111] 3. Matching and similarity judgment based on word segmentation code library

[0112] The internal word segmentation code library is searched for word segmentation codes that match the identified words and phrases. This is based on the standard mapping relationship established by the previously constructed word segmentation code library. The word segmentation code library organizes and encodes the words and phrases related to the various attributes of the content creation object. When a word or phrase is identified, the corresponding code is directly searched in this library. If a matching code can be found, it means that the word or phrase meets the standard expression related to the content creation object attributes pre-set by the system, so it can be judged as a valid word or phrase obtained by splitting, and used for subsequent search process operations.

[0113] When there is no directly matching word segmentation code in the word segmentation code library, further judgment is made by calculating the similarity between the identified words and phrases and the word segmentation codes in the library. There are many methods for similarity calculation, such as cosine similarity based on word vectors, edit distance, etc. Taking cosine similarity as an example, the word or phrase will be converted into a vector representation (usually using a pre-trained word vector model), and then the cosine value of the angle between it and the vector corresponding to the word segmentation code is calculated. The closer the value is to 1, the higher the similarity. If the calculated similarity is greater than the set similarity threshold, it means that although the expression is not completely consistent, it is semantically close. It can be supplemented with the split words or phrases to accommodate some reasonable variant expressions in natural language and expand the effective understanding of user search requests.

[0114] To this end, through matching and judging with the word segmentation code library, effective words and phrases can be screened out strictly in accordance with the system's preset standard expressions related to the attributes of the content creation object, ensuring that the elements entering the subsequent search process are in line with the established specifications and can accurately correspond to the corresponding attribute concepts. The accuracy of the basis for the search operation is guaranteed, and the problem of large deviations in search results caused by arbitrarily accepting words and phrases that do not meet the standards is avoided.

[0115] The similarity judgment mechanism fully considers the flexibility and diversity of natural language, and recognizes words and phrases that are semantically similar but do not have an exact match in the word segmentation code base, so that they can participate in the subsequent search process. This enables the system to better adapt to the diverse expression habits and expressions of different users, improves compatibility with various natural language search requests, further improves the user search experience and the recall rate of search results, and finds content creation objects that meet user intentions as comprehensively as possible.

[0116] Optionally, the constructing of a logical framework including multi-dimensional filtering conditions based on the logical relationship between the single words or the single phrases includes: performing grammatical structure analysis on the single words or the single phrases to obtain the hierarchical structure and logical relationship between the single words or the single phrases; performing semantic relationship recognition on the single words or the single phrases to obtain the semantic association relationship between the single words or the single phrases; constructing multi-dimensional filtering conditions based on the hierarchical structure and logical relationship and semantic association relationship between the single words or the single phrases; marking the importance weight of each filtering condition in grammar and semantics to construct a logical framework including multi-dimensional filtering conditions.

[0117] Optionally, when performing grammatical structure analysis on a single word or a single phrase, grammatical analysis tools or algorithms in natural language processing are usually used, such as rule-based grammar analyzers, statistical grammar analysis models (such as probabilistic context-free grammar, PCFG), etc. Taking a rule-based grammar analyzer as an example, it analyzes how the input single words and phrases are combined according to grammatical rules based on a predefined set of grammatical rules, such as part-of-speech collocation rules (nouns and adjectives can often form a modifier-predicate structure, such as "funny anchor"), phrase formation rules (verb-object structure such as "share interesting things"), etc., to determine the hierarchical structure between them. For example, for "find an anchor with many fans and who often shares food", grammatical analysis can identify that "many fans" and "often share food" are two components that modify "anchor" in parallel, and they also have different grammatical structures inside each of them, which sorts out the hierarchical relationship between words and phrases.

[0118] The logical relationship is further deduced based on the analysis results of the grammatical structure. For example, by identifying the conjunction "and", it can be made clear that the two phrases "many fans" and "frequently share food" are in a logical "and" relationship, indicating that the anchor who meets both conditions is to be found. For another example, if a conjunction such as "or" appears, it indicates that the different components are in a logical "or" relationship. At the same time, there is also a logical relationship of limitation and being limited between modifiers and central words (such as adjectives modifying nouns). By analyzing the structural characteristics presented at these grammatical levels, the complex logical relationship between the various components can be fully sorted out.

[0119] To this end, grammatical structure analysis can convert the search requests entered by users that seem to be expressed in natural language into a structure with clear levels and logical relationships, so that the system can accurately grasp the query intentions that users want to express. For example, for a complex sentence "Find anchors with more than 100,000 fans, good at dancing or singing, and from Europe and the United States", after sorting out the logical relationships such as "and" and "or" and the modifying and limiting relationships between the various parts through grammatical analysis, the system clearly knows that it needs to screen out anchors who meet the fan number conditions, meet specific "or" relationships in terms of talent, and meet regional conditions, avoiding the problem of inaccurate search results due to confusion in the understanding of sentence logic.

[0120] The clear grammatical hierarchy and logical relationships provide a basic framework for the subsequent construction of filtering conditions and the entire search process. Subsequent operations can formulate database query strategies and set filtering conditions in a targeted manner based on these well-organized relationships, ensuring the orderliness and accuracy of the entire search process and making a reasonable transition from natural language requests to actual database operations.

[0121] Optionally, semantic relationship identification often uses tools such as semantic role labeling (SRL) technology and knowledge graphs. Semantic role labeling can determine the semantic role played by each word or phrase in a sentence, such as the executor or recipient of an action, or the time and place of an event. For example, in "The anchor shares food in the live broadcast room", "anchor" is the executor of the action of "sharing", and "food" is the object being shared. Such annotations can clearly present the semantic association between words. The knowledge graph contains a large amount of knowledge about entities and the semantic relationships between them. By matching the words and phrases in the search request with the nodes and edges in the knowledge graph, deeper semantic associations can be mined. For example, if the knowledge graph shows that "food" is closely related to "cooking", when the user searches for "anchor sharing food", the system can use the knowledge of the knowledge graph to identify concepts such as "cooking" that are semantically related to "food", and expand the understanding of the semantic association relationship of the search request.

[0122] We also use semantic similarity calculation methods (such as cosine similarity based on word vectors) to determine the semantic similarity between different words and phrases, and to mine semantic associations by analyzing the hierarchical structure of concepts (for example, in the classification system, "pet" is a subcategory of "animal", and they have a hierarchical semantic relationship). For example, for "find a cute little animal anchor", through semantic similarity calculation, we find that "little animal" and "pet" have a high degree of similarity and are related at the conceptual level. We can identify the semantic association between them and know that users may be interested in anchors who show various little animals, and may also have a potential need to find anchors with pet-related content.

[0123] To this end, semantic relationship recognition can go beyond the superficial understanding of grammar, dig deep into the semantic connections behind words and phrases, and more comprehensively and accurately grasp the true meaning of user search requests. For example, if we only look at "find anchors who like outdoor sports" from a grammatical point of view, we may simply understand the relationship between the various parts according to the structure, but through semantic relationship recognition, we can connect "outdoor sports" to a variety of specific activities such as mountaineering, hiking, and cycling, and then understand that users may have the intention to search for anchors involved in these specific outdoor sports-related content, which enriches the understanding dimension of search requests and improves the depth and accuracy of semantic understanding.

[0124] Based on semantic associations, on the one hand, the search scope can be appropriately expanded to take into account content creation objects that have different expressions but are semantically related, thereby improving the recall rate; on the other hand, by accurately grasping semantic associations, objects that truly meet user intentions can be more accurately screened out, avoiding the omission of some anchors who meet the requirements from a semantic perspective due to relying solely on grammatical structure, thereby improving the quality and accuracy of search results.

[0125] Optionally, when constructing multi-dimensional screening conditions and tag importance weights, the screening conditions are constructed from different dimensions according to the hierarchical structure, logical relationship and semantic association relationship between the individual words or phrases obtained from the previous analysis. For example, from the perspective of grammatical structure, if there is an adjective phrase that modifies a noun, a one-dimensional screening condition can be constructed for the attribute represented by the adjective (such as "funny" corresponds to the screening condition of the "style characteristics" dimension); from the perspective of logical relationship, for multiple phrases connected by "and", the attributes corresponding to each phrase become independent and must be satisfied at the same time. The screening dimensions (such as "large number of fans" and "frequent sharing of food" correspond to the screening conditions of two different dimensions of "social influence" and "business-related information"); from the perspective of semantic association, if semantically related extended concepts are identified, they are also included in the screening conditions of the corresponding dimensions (such as "cooking" associated with "food" is included in the "business-related information" dimension). The screening conditions constructed by integrating multiple dimensions in this way can fully cover all aspects involved in the user's search request and form a three-dimensional screening framework.

[0126] When marking the importance weight of each filter condition in syntax and semantics, multiple factors are usually considered. In terms of syntax, the filter conditions corresponding to the core subject, predicate and other key components are often given higher weights because they directly determine the key elements such as the subject and core behavior of the search object. For example, in "the anchor shares interesting stories", "anchor" as the subject will have a higher weight, and "sharing" as the core behavior will also have a corresponding weight. In terms of semantics, the filter condition weights corresponding to words or phrases that better reflect the user's core intentions and play a key role in distinguishing search results will be higher. For example, if the user mainly wants to find an anchor with "many fans", then this condition is more semantically important than other secondary descriptive conditions, so it is given a higher weight. By combining grammatical and semantic factors to reasonably allocate weights, the subsequent screening process can be more focused, and important screening requirements can be met first according to the weight.

[0127] To this end, building multi-dimensional screening conditions can fully consider all kinds of information from syntax to semantics in user search requests, avoid missing content creation objects that meet the requirements by screening from only a single angle, ensure that the screening process is comprehensive and meticulous, and maximize the user's real search intent, and improve the completeness and accuracy of search results. For example, for a search request with a comprehensive description, multi-dimensional screening can accurately find the corresponding anchor from different attribute directions, and can effectively screen from basic information, business content, style characteristics, etc.

[0128] Importance weight marking enables the system to flexibly adjust the focus of screening when facing search requests of different complexity and emphasis. For some requests that emphasize a key attribute, it can give priority to ensuring that the screening conditions corresponding to the important attribute are met, and for relatively broad and relatively balanced requests, it can also reasonably allocate screening resources based on the weight, which improves the system's adaptability and processing effect for various types of search requests, making the search results more able to meet the diverse expectations of users.

[0129] Optionally, the method further includes: vectorizing the single word or the single phrase to obtain a vector sequence; based on the set time step, inputting the vector sequence into a grammatical attention head and a semantic attention head; by calling the grammatical attention head, based on the learned part-of-speech information, grammatical patterns and grammatical rules of the word, extracting grammatical features of the vector sequence to perform a grammatical structure analysis on the single word or the single phrase to obtain the hierarchical structure and logical relationship between the single words or the single phrases; by calling the semantic attention head, extracting semantic features of the vector sequence to identify semantic relationships between the single words or the single phrases to obtain semantic associations between the single words or the single phrases.

[0130] Optionally, when implementing the vectorization of a single word or phrase, a pre-trained word vector model (such as Word2Vec, GloVe, BERT, etc.) is used to vectorize a single word or phrase. These models are trained based on a large-scale corpus, and can learn rich information about words at the semantic and grammatical levels and map them to a low-dimensional vector space. Taking Word2Vec as an example, it learns word vectors through the context information of the word, and words with similar contexts will be close in the vector space. For example, "happy" and "happy" often appear in similar contexts, so their vector representations are very close. For phrase vectorization, some models will learn the phrase as a whole, or obtain the phrase vector by combining the vectors of each word in the phrase (such as simple weighted average, splicing, etc.). In this way, each word or phrase is converted into a vector with a specific numerical representation, which together constitutes a vector sequence, which can be used in subsequent processing to mine the grammatical and semantic information contained therein in the form of vector operations.

[0131] To this end, vectorization converts words and phrases in natural language into numerical vector forms that can be easily processed by computers, so that different words and phrases can be analyzed and compared in a unified vector space. No matter how complex and diverse the original text form is, subsequent calculations and operations can be performed based on vectors, providing a standardized data foundation for grammatical and semantic analysis using technologies such as deep learning, facilitating subsequent model processing, and improving the operability and compatibility of the entire process.

[0132] The vector representation learned by the pre-trained word vector model itself contains rich semantic and grammatical information, which enables subsequent vector-based analysis to better explore the intrinsic connections between words and phrases with the help of this potential information. For example, the semantic similarity of words can be preliminarily judged through the distance relationship in the vector space, which provides valuable clues for more in-depth semantic relationship recognition and other operations, helping to improve the accuracy and effectiveness of the overall analysis.

[0133] Optionally, when inputting the vector sequence into the grammatical attention head and the semantic attention head based on the time step, considering that when processing natural language, due to the sequential nature of the text, the grammatical and semantic roles and associations of words or phrases at different positions are different, the time step is a mechanism for processing such sequential information. In a recurrent neural network (RNN) and its variants (such as long short-term memory network, LSTM; gated recurrent unit, GRU) or a model based on the Transformer architecture, the corresponding vectors are input into the network in different time steps in accordance with the order of words or phrases in the sentence. For example, for the sentence "The anchor shares interesting stories", the vector corresponding to "anchor" is first input in the first time step, the vector corresponding to "share" is input in the second time step, and so on. In this way, the model can capture the sequential dependency between words and phrases based on the sequential information of the time step, and then better analyze their grammatical structure and semantic association, which is crucial for understanding the dynamic changes and contextual relevance of natural language.

[0134] Setting up grammatical attention heads and semantic attention heads is an application of a multi-head attention mechanism (Multi-HeadAttention). Different attention heads can focus on different aspects of feature extraction. The grammatical attention head focuses on information related to grammar, such as the part of speech of words, the grammatical structure pattern of sentences, etc.; the semantic attention head focuses on mining semantic-level associations and features, such as the semantic similarity between words, the semantic hierarchical relationship between concepts, etc. Through this division of labor and collaboration, the input vector sequence can be analyzed from different angles at the same time, avoiding the problem of insufficient feature extraction or confusion caused by mixing grammatical and semantic information together. Each attention head can extract the most relevant features in a targeted manner, and then combine these features to fully grasp the various relationships between words and phrases.

[0135] To this end, the time-step-based input method enables the model to effectively capture the sequential characteristics of natural language, taking into full account the sequential dependency of words or phrases in different positions in the entire sentence, which is critical for accurately analyzing grammatical structures (such as the sequential relationship between subject, predicate, and object, the positional relationship between modifiers and central words, etc.) and semantic associations (such as the sequential logic of events, causal relationships, etc., which are reflected through the order of words). For example, although the words "eat first and then take a walk" and "take a walk first and then eat" are the same, the different order leads to differences in semantics and grammar. The time-step mechanism can accurately distinguish such differences and improve the accuracy of natural language understanding.

[0136] Using grammatical attention heads and semantic attention heads to extract features respectively can more accurately mine the key features of words and phrases in terms of grammar and semantics, and achieve more detailed and in-depth structural analysis and relationship recognition. The grammatical attention head can accurately sort out the grammatical framework of a sentence, such as determining the hierarchical nesting relationship of each component in a complex sentence; the semantic attention head can deeply mine semantic connections, such as discovering deep semantic associations such as metaphors and metonymies, providing strong support for fully and accurately understanding user search requests and building reasonable screening conditions, which helps to improve the entire search system's ability to process natural language and the quality of search results.

[0137] Optionally, when the grammatical attention head extracts and analyzes grammatical features, the grammatical attention head operates according to the learned word part information, grammatical patterns and grammatical rules when extracting grammatical features. Part-of-speech information (such as nouns, verbs, adjectives, etc.) is the basis for understanding sentence structure. Words of different parts of speech play different grammatical roles in sentences and have specific combination rules. For example, nouns are often used as subjects or objects, and adjectives are often used to modify nouns. Grammatical patterns are a summary of common sentence structure combinations, such as basic structures such as "subject-verb-object" and "subject-copula-table" and more complex nested structure patterns (such as "attributive clauses modify nouns", etc.), and the characteristic expressions of these patterns in vector representation are learned through a large amount of corpus. Grammatical rules further clarify the legal norms of word collocation and sentence construction, such as the semantic and grammatical collocation requirements of verbs and objects. The grammatical attention head focuses on and extracts the information contained in each vector in the input vector sequence, uses the attention mechanism to dynamically focus on the key parts related to grammar, calculates the degree of correlation between different words or phrases at the grammatical level, and then analyzes the hierarchical structure and logical relationship between them.

[0138] When analyzing the hierarchical structure, the grammatical attention head will determine which words are in the relationship of modification and modification, limitation and limitation, etc. according to the grammatical correlation between words and the matching of grammatical patterns, so as to determine the hierarchical nesting structure of the sentence from the whole to the part. For example, for "young anchor who likes outdoor sports", by paying attention to the grammatical associations that "young" modifies "anchor", "outdoor sports" is dominated by "like" and modifies "anchor" as a whole, the hierarchical structure from the outer modification to the inner core is sorted out. In terms of analyzing logical relationships, according to the vector features corresponding to conjunctions (such as "and", "or", "because", "so", etc.) and the grammatical parallel and subordinate relationships of different phrases, the logical connection between the various parts of the entire sentence is judged. For example, the logical "and" relationship between "likes outdoor sports" and "good at sharing stories" in "anchor who likes outdoor sports and is good at sharing stories" is clarified through grammatical analysis.

[0139] To this end, the grammar attention head extracts and analyzes features based on professional grammar-related evidence, and can accurately parse the complex grammatical structure in natural language search requests, whether it is a simple short sentence or a long sentence with multiple layers of modifiers and multiple clauses, it can sort out clear levels and logical relationships. This avoids the subjectivity and inaccuracy that may exist in manual grammar analysis, accurately grasps the grammatical features of user input sentences in an automated and intelligent way, and provides a reliable grammatical basis for subsequent operations such as converting natural language into executable screening conditions, ensuring the accuracy of the search process.

[0140] Because it works based on learned extensive grammatical patterns and rules, it can adapt to a variety of grammatical expressions of different users, and can effectively handle sentences that conform to grammatical norms but are novel and complex in form, thereby improving the system's inclusiveness and adaptability to the diversity of natural language grammar. This allows different users to initiate search requests using their accustomed grammatical expressions, and the system can accurately understand the grammatical connotations, thereby improving the user experience.

[0141] Optionally, when the semantic attention head extracts and analyzes semantic features, the semantic attention head mainly focuses on the essential connection between words and phrases at the semantic level when extracting semantic features from the vector sequence. On the one hand, semantic associations are mined through the distance and similarity relationship in the vector space. Because the pre-trained word vector model makes the vectors of words with similar semantics closer, vector operations (such as cosine similarity calculation, etc.) can be used to find out which words or phrases are semantically similar, and then infer the possible semantic associations between them. For example, the vector similarity of "delicious food" and "delicacy" is high, indicating that they have a close semantic association and may represent similar conceptual categories in the search request. On the other hand, semantic analysis is further enriched with the help of external knowledge and technical means such as knowledge graphs and semantic role labeling. The entities and relationships in the knowledge graph can help expand the scope of semantic understanding. For example, knowing that "food" has associated edges with "cooking", "restaurant" and other entities in the graph can identify broader semantic connections. Semantic role labeling can clarify the specific semantic roles of words in events or situations, and help understand how different words interact semantically. For example, the roles of each word in "the host shares food in the live broadcast room" clarify the semantic associations between them, such as actions and objects. The semantic attention head integrates this information to dynamically focus on and extract key features related to semantics, and analyze the semantic associations between words and phrases.

[0142] When mining semantic associations, the semantic attention head is not limited to the surface synonyms and near-synonyms, but can also go deep into the deep semantic connections such as the upper and lower relationships of concepts, the relationship between the whole and the part, and the cause and effect relationship. For example, for "find a cute little animal anchor", it can not only identify the semantic similarity between "little animal" and "pet", but also mine "animal" as the superordinate concept of "little animal" through knowledge graph or concept hierarchy analysis, thereby expanding the understanding of the semantic scope of the search request, understanding that users may have the intention to search for anchors involved in various animal-related content, and more comprehensively and deeply grasp the semantic intentions behind the user's search request, providing rich semantic basis for more accurate screening of content creation objects.

[0143] To this end, the semantic attention head deeply explores semantic features and associations in a variety of ways, which can go beyond the superficial understanding of text, touch the deeper semantic connotations behind natural language, and more comprehensively and accurately grasp the user's real search intention. This is very helpful for processing search requests that are semantically obscure, contain metaphors, or require background knowledge to understand, avoiding the situation where search results do not meet user expectations due to only literal understanding, and improving the depth and accuracy of natural language semantic understanding.

[0144] With the help of various semantic analysis methods, the semantic attention head can expand the scope of semantic associations, taking into account more concepts that are semantically related to the search request but may be expressed differently, expanding the potential scope of the search and improving the recall rate. For example, when searching for anchors related to "healthy life", anchors corresponding to multiple related concepts such as "fitness", "nutritional diet", and "mental health" are mined through semantic associations, making the search results more comprehensive and rich, more likely to meet the diverse needs of users, and further optimizing the performance of the search system and user experience.

[0145] Optionally, converting the logical framework into a structural expression to match database table fields in the content creation object database based on the structural expression includes: calling a method for converting content creation object attribute features between the logical framework and the structural expression, so that each screening condition in the logical framework is combined according to a predetermined template to convert the logical framework into a structural expression; a query optimizer generates a query plan based on the structural expression index information to determine the access path and connection order of the data; and matching the database table fields in the content creation object database based on the access path and connection order of the data.

[0146] Optionally, when converting the logical framework to the structural expression, first, for the various attribute characteristics of the content creation object, a clear correspondence and conversion method between the logical framework and the structural expression is established in the system design stage. For example, if the content creation object has attribute characteristics such as "anchor name", "broadcast category", and "number of fans", the screening conditions described in natural language are presented in the logical framework (such as "find food anchors with more than 100,000 fans"), and in the structural expression, they need to correspond to the specific table structure and field representation in the database. For example, the attribute "number of fans" may be stored in a field named "fan_count" in the database, and the "food anchor" corresponds to the record with the value of "food" in the "category" field. This mapping relationship is determined based on the design pattern of the database (such as the table structure and field definition of the relational database) and the standardized storage method of the attributes of the content creation object.

[0147] Each filter condition is combined according to a predetermined template, which usually follows the specification requirements of the database query language (such as the grammatical structure of SQL statements). For example, for multiple filter conditions of the "and" relationship in the logical framework, when converted into a structural expression, they will be combined according to the template of connecting multiple conditions with "AND" in the "WHERE" clause in SQL, and the field conditions corresponding to each attribute will be spliced ​​together. Taking "find anchors with more than 100,000 fans and whose broadcast category is food" as an example, its structural expression may be similar to "SELECT*FROM anchor table WHERE fan_count>100000AND category='food'". Through such a combination conversion based on the predetermined template, the logical framework can be accurately converted into a structural expression that can be recognized and executed by the database, realizing the transition from natural language intent to database operation statements.

[0148] To this end, through clear attribute feature mapping and predetermined template combinations, it is possible to ensure that the user search intent reflected in the logical framework is accurately converted into an expression that meets the database structure requirements, so that the system can directly use the database query function for subsequent operations. This avoids the problem of ineffective search execution due to differences in natural language and database structure, ensures a smooth connection from user input to database query, and improves the reliability of accurate execution of search requests at the database level.

[0149] The conversion using a predetermined template follows a unified rule, which makes the entire conversion process standardized. No matter how complex and diverse the screening conditions in the logical framework are, they can be converted into structural expressions in a predetermined way, which is convenient for system management and maintenance. If the database structure changes later (such as adding new fields, modifying table names, etc.), only the corresponding mapping relationship and template part need to be adjusted, without large-scale changes to the entire search logic, which reduces the system maintenance cost and improves the system's adaptability and scalability.

[0150] Optionally, when the query optimizer generates a query plan, one of the key bases for the query optimizer to generate the query plan is the structure expression index information. The index in the database is a data structure, which is similar to the catalog of a book and can help quickly locate and access data. For example, an index is established for the "fan_count" (number of fans) field in the "anchor table" that is often used for query filtering. When the structure expression involves a query on the "number of fans" condition (such as "fan_count>100000"), the query optimizer will recognize this index and analyze how to find the data records that meet the condition as quickly as possible based on the storage structure and data distribution of the index. Different types of indexes (such as B-tree indexes, hash indexes, etc.) are suitable for different data characteristics and query scenarios. The query optimizer will select the most effective way to use it based on the characteristics of the index and the specific conditions in the structure expression to determine the access path of the data, that is, which tables to access first, which indexes to use to find data, and other operation sequences.

[0151] When it comes to queries involving multiple table associations (such as finding a query that satisfies both the host's own attributes and the attributes of its cooperating brands, which may involve a join query of the "host table" and the "cooperating brand table"), the query optimizer also needs to determine the join order between the tables. It will consider factors such as the size of the table, the data distribution of the associated fields, the index situation, and the impact of different join orders on query performance. By analyzing statistical information (such as the number of records in each table, the distribution frequency of different values, etc.) and the association relationship reflected in the structural expression, the optimal join order is calculated, so that when performing multi-table join operations, the data that meets the requirements can be obtained with the least resource consumption and the shortest time, thereby improving query efficiency.

[0152] To this end, using index information to generate query plans can enable the database system to quickly locate data that meets the screening conditions, avoid time-consuming operations such as full table scans, and greatly shorten query time. This efficiency improvement is especially significant when dealing with large-scale content creation object databases. Reasonable determination of the connection order can also reduce unnecessary data associations and calculations, allowing multi-table queries to be executed efficiently, improving the overall system response speed, and enhancing the user's search experience, allowing users to obtain search results faster.

[0153] By scientifically planning the access path and connection order of data, the database system can more reasonably allocate system resources such as memory and disk I / O to avoid wasting resources on unnecessary query operations. For example, using indexes to find data first can reduce the amount of data read from the disk and reduce disk I / O pressure, allowing the system to run more smoothly and efficiently under limited resource conditions, while also being able to handle more concurrent search requests, enhancing the overall performance and stability of the system.

[0154] Optionally, when matching database table fields based on the access path and connection order, the database system will access the relevant tables in order according to the determined access path, and when accessing each table, it will perform matching operations on the field conditions involved in the structural expression. For example, when accessing the "anchor table", it will check whether the value of the "fan_count" field meets the condition of "greater than 100,000", and whether the value of the "category" field is "food", etc. Through the database's own query execution engine, the field values ​​in the record are compared line by line to see if they match the conditions in the structural expression. For multi-table connection queries, the relevant records in different tables are associated and matched according to the connection order, and the connection between the data is established based on the associated fields (such as the "anchor ID" in the "anchor table" and the "cooperative anchor ID" in the "cooperative brand table"), and then continue to match other field conditions in the result set after the connection to ensure that records that fully meet all the screening conditions set by the structural expression are found, that is, the database records corresponding to the content creation objects that ultimately meet the user's search request.

[0155] During the entire matching process, the database system will follow its internal data consistency mechanism to ensure the integrity and accuracy of the data. For example, in a relational database, transaction processing, foreign key constraints and other mechanisms are used to ensure that data will not be inconsistent, lost or incorrectly associated in the case of multi-table association operations and field value updates and deletions. In this way, no matter how complex the query operation is, the matching results ultimately returned are based on accurate and reliable data, and can truly reflect the content creation object information that meets the user's search intent.

[0156] To this end, database table field matching is performed strictly according to the determined access path and connection sequence, which can accurately filter out database records corresponding to content creation objects that meet all filtering conditions, avoid missing or incorrectly matching data, and ensure the accuracy and completeness of search results, so that the object information returned to users is truly in line with their search requests, improving the search quality and meeting the needs of users to find specific content creation objects.

[0157] Relying on the database's own data consistency mechanism, the quality and reliability of data in the entire matching process are ensured, so that users can trust the data source on which the search results are based, avoiding doubts about the search results due to data problems, enhancing users' trust in the search system, and improving the overall reputation and availability of the system.

[0158] Optionally, based on the matched database table fields, search for content creation objects in the content creation object database to obtain several pieces of content creation object description information, including: dynamically constructing an SQL query statement based on the matched database table fields; creating a search task according to the SQL query statement, where the search task includes multiple subtasks; and searching for content creation objects by performing paged queries and batch reads on the content creation object database based on multiple subtasks.

[0159] Optionally, when dynamically constructing an SQL query statement based on the matched database table fields, after obtaining the matched database table fields, it is necessary to dynamically construct the SQL query statement based on this field information and the database query syntax rules. First, determine the target table to be queried (usually the main table storing content creation object-related information and other related tables that may be involved in associated queries). For example, when looking for anchor-related information, the corresponding main table may be the "anchor information table". Then, combine each of the matched fields according to the syntax structure of the SQL statement. Generally, it includes a "SELECT" clause to specify the list of fields to be returned (which may be all fields or some key fields, such as anchor name, number of fans, live broadcast category, etc.), a "FROM" clause to clarify from which table to query data, and a "WHERE" clause to logically combine the matched field conditions. For example, "WHERE fan_count>100000 AND category='Food'" is concatenated according to specific filtering conditions. If it involves multi-table join queries, appropriate join methods (such as "JOIN" statements) and associated fields will also be used in the "FROM" clause to associate different tables to ensure that complete information meeting the conditions can be obtained. In addition, an "ORDER BY" clause may be added to sort the results (such as sorting in descending order of the number of fans, etc.) and a "LIMIT" clause to limit the number of returned results. Through the reasonable combination of these components, a complete SQL query statement that meets the current search requirements is dynamically generated.

[0160] To enhance the flexibility and generality of the query statement, a parameterized approach is often used to construct the SQL query statement. For example, specific numerical values (such as the specific threshold of the number of fans) and string values (such as the specific category of the live broadcast category) in the filtering conditions are passed in as parameters instead of being directly hard-coded in the statement. In this way, under different search requests, only by changing the corresponding parameter values can different query statements be conveniently generated to adapt to various changing filtering conditions. At the same time, it can also effectively prevent SQL injection attacks and improve the security of the system.

[0161] To this end, by constructing SQL query statements based on the matched database table fields, it is possible to ensure that the query statements accurately reflect the filtering conditions corresponding to the user's search request, so that the query operations performed by the database are fully consistent with the characteristic requirements of the content creation object to be found, thereby accurately obtaining qualified data records, improving the matching degree between search results and user intentions, and avoiding querying irrelevant or inaccurate information.

[0162] The parameterized construction and dynamic combination following SQL syntax rules make the system easy to handle various search requests. Regardless of whether the user is looking for content creation objects with a specific fan number range, different broadcast categories, specific regions, etc., the corresponding query statements can be quickly generated for query, which enhances the system's adaptability to different search scenarios and needs, and improves the system's versatility and scalability.

[0163] Optionally, when creating a search task and dividing subtasks according to an SQL query statement, a search task is created based on the constructed SQL query statement. This search task is a logical overall operation, representing the complete process of finding content creation objects that meet the requirements from the database. In actual implementation, in order to improve efficiency and facilitate management, this overall search task will be split into multiple subtasks. For example, according to the storage structure and query characteristics of the database, subtasks can be divided according to data partitions (if the database uses partitioned storage, such as time partitions, regional partitions, etc.) or logical groupings of data (such as grouping according to different broadcast categories, etc.). Each subtask is responsible for querying a part of the data range. For example, one subtask is responsible for querying the anchor information that meets the conditions in a certain regional partition, and another subtask is responsible for querying the relevant anchor data under another broadcast category grouping, etc. Through reasonable division, the entire search task can be executed in parallel or distributed, thereby improving the overall query speed.

[0164] There will be a corresponding task scheduler in the system to manage these subtasks. It will reasonably arrange the execution order of subtasks and allocate computing resources based on factors such as the resource status of the database server (such as CPU usage, memory free status, etc.), the priority of subtasks (which can be set according to the importance and urgency of the search request), and the dependencies between subtasks (some subtasks may need to wait for other subtasks to complete some pre-operations before they can start). For example, when the server CPU resources are sufficient, the scheduler will start multiple subtasks that can be executed in parallel at the same time to speed up the search process; when resources are tight, the subtasks will be executed in order of priority to ensure that important search requests can be processed first, ensuring the overall efficient operation of the system and the rational use of resources.

[0165] To this end, the search task is divided into multiple subtasks and reasonably scheduled, which can fully utilize the resource advantages of the database server's multi-core CPU, distributed storage, etc. to achieve parallel or distributed queries. For example, on a multi-core database server, multiple subtasks can be executed on different cores at the same time, greatly shortening the overall query time. Especially when processing large-scale content creation object databases, the advantages of this parallel processing are more obvious, and users' search requests can be responded to quickly.

[0166] By coordinating the execution of subtasks according to factors such as resource status and task priority through the task scheduler, the system can flexibly respond to different load conditions, avoid excessive use or idle waste of resources, and ensure that each search task can be processed within a reasonable time, thereby improving the utilization rate of database server resources, enhancing the stability and reliability of the system in high-concurrency scenarios, and enabling the system to better serve the search needs initiated by multiple users at the same time.

[0167] Optionally, when performing paging query and batch reading of content creation object search based on subtasks, the paging query method is used when executing subtasks. This is because when the query result set may be very large, if all of it is read out at once, it will occupy a large amount of memory resources, and may even cause problems such as memory overflow, and will also increase the burden of network transmission. Paging query is based on the set number of records per page (such as displaying 100 records per page) and page number (such as querying page 1, page 2, etc.), and is implemented in the SQL query statement through the "LIMIT" clause combined with the "OFFSET" clause (used to specify the offset, that is, which record in the result set to start from). For example, to query the content creation object information of page 2 with 100 records per page, the corresponding SQL statement may be "SELECT * FROM anchor information table WHERE... LIMIT 100OFFSET 100", so that only a small amount of data on the specified page is obtained each time, and the entire result set that meets the conditions is gradually traversed, which can not only meet the query requirements, but also effectively control memory usage and network transmission volume.

[0168] Batch reading is based on each paging query, reading a batch of data at one time (such as reading 10 pages of data at a time) instead of obtaining data page by page and record by record, which can reduce the frequent database connection and query operation overhead and improve reading efficiency. The database system will cache and manage the batch read data internally to optimize data transmission and storage. When the subtask performs a query operation, it first obtains the corresponding data block from the database according to the batch reading strategy, and then further filters and processes this data in memory (such as sorting and deduplicating the read content creation object description information according to specific search requirements) to obtain the final content creation object description information that meets the requirements and complete the entire search process.

[0169] To this end, paging query effectively avoids the memory and network resource pressure caused by reading a large amount of data at one time, allowing the system to stably process large-scale query result sets, which is suitable for content creation object databases of various sizes and improves the robustness of the system. Batch reading reduces database connection and query overhead while improving the efficiency of data acquisition and optimizing the performance of the entire search process, allowing the system to obtain the required content creation object description information more quickly, improving the overall efficiency and response speed of the search.

[0170] The paging query method also makes it easier for users to view and manage a large number of search results. Users can choose to view different page contents according to their needs, which is in line with common user browsing habits. Moreover, by batch reading and further processing data in memory, the system can optimize the results according to specific circumstances, such as removing duplicate information and arranging in a more reasonable order, etc., which improves the quality of search results and provides users with a better and more convenient search experience.

[0171] Optionally, converting the search request expression into a question vector includes: performing text preprocessing on the search request expression and then using a word segmentation tool to segment the search request expression into individual words or phrase sequences; assigning a pre-trained word vector to each segmented word or phrase sequence, and mapping it to a low-dimensional vector space; assigning a semantic weight according to the semantic importance of each segmented word or phrase sequence; and fusing all the word vectors based on the semantic weight to obtain the question vector.

[0172] Optionally, during text preprocessing and word segmentation, when performing text preprocessing on the search request expression, a normalization operation will be performed first, which includes unifying the uppercase and lowercase forms of the text (for example, unifying all characters into lowercase, because in many natural language processing tasks, uppercase and lowercase usually do not affect semantics but increase the complexity of processing), removing redundant spaces and special characters (such as some meaningless punctuation marks, tabs, etc., which may interfere with subsequent word segmentation and semantic analysis), and performing standardized conversion on some texts in special formats (for example, converting full-width characters into half-width characters, etc.). Through these normalization operations, the input search request expression is more unified and regular in format, which is convenient for subsequent processing procedures.

[0173] Stop words are those words that frequently appear in natural language but do not contribute much to expressing the core semantics, such as "的", "是", "在", etc. The system will identify and remove these stop words based on a pre-built stop word list (usually a collection of common stop words obtained through statistical analysis of a large corpus) or through some statistical methods (such as setting a frequency threshold according to word frequency, and determining words with a frequency higher than the threshold and relatively weak semantics as stop words). Removing stop words can streamline the text content, enabling subsequent word segmentation operations to focus on more substantial semantic words and phrases, reducing unnecessary computational effort, and highlighting the key information in the search request expression.

[0174] Use a word segmentation tool to split the pre-processed search request expression into a sequence of single words or phrases. Common word segmentation tools such as Jieba (for Chinese), NLTK (for English and many other languages), etc. generally perform word segmentation based on statistical machine learning methods or rule matching methods. Taking the statistical method as an example, it will utilize statistical information such as the frequency of words appearing in a large corpus and their adjacent relationships before and after to determine where it is most reasonable to perform the split. For example, for the Chinese sentence "我喜欢看搞笑的宠物视频", by statistically analyzing the probabilities of words such as "喜欢" and "搞笑" appearing as independent words in the corpus and the probabilities of them forming other words with the preceding and following characters, etc., the sentence can be accurately split into a sequence of single words such as "我", "喜欢", "看", "搞笑", "宠物", "视频". For some fixed collocation phrases (such as "宠物视频"), they can also be recognized as a phrase unit based on factors such as their frequency of appearance as a whole in the corpus, making the word segmentation result more in line with the actual usage habits and semantic structures of the language.

[0175] Therefore, through operations such as normalization and stop word removal, text preprocessing effectively reduces the noise and redundant information in the text data, making the subsequent processed data cleaner and more concise. This not only reduces the computational complexity of subsequent word segmentation and vector mapping operations, improves the processing efficiency, but also avoids problems such as word segmentation errors or semantic understanding deviations caused by the interference of these irrelevant information, and improves the data quality and accuracy of the entire processing process.

[0176] Using a professional word segmentation tool for splitting can accurately divide the search request expression into single words or reasonable phrase sequences according to the internal laws and statistical characteristics of the language. This provides a precise semantic unit basis for subsequent operations such as vector mapping and semantic weight assignment at the word and phrase levels, ensuring that each unit can better carry and reflect a part of the semantic information, contributing to a more detailed and accurate vector representation and semantic analysis of the entire search request expression, and thus improving the accuracy of the search.

[0177] Optionally, when allocating pre-trained word vectors

[0178] Pre-trained word vector models (such as Word2Vec, GloVe, BERT, etc.) are trained based on large-scale corpora. These models learn the semantic and grammatical features of words through different training methods and represent them in low-dimensional vector form. Taking Word2Vec as an example, it has two common training architectures, namely CBOW (Continuous Bag of Words) and Skip-gram. CBOW predicts a word based on its context. For example, given several words before and after the word "like" (such as "I", "watch", "funny", etc.), it infers that the middle word is "like"; Skip-gram is the opposite. It predicts the context words based on a word. Through such a large amount of corpus training, the model can capture the semantic similarity between words, so that words with similar semantics are closer in the vector space. For example, "happy" and "happy" often appear in similar contexts, so their vector representations will be very close. Similarly, for phrases, some models can also generate corresponding vector representations in specific ways (such as weighted averaging and concatenation of the vectors of each word in the phrase).

[0179] When assigning pre-trained word vectors to each word or phrase sequence after word segmentation, these segmented language units are matched with the vocabulary in the pre-trained word vector model to find the corresponding pre-trained vector representation, thereby mapping the word or phrase from text form to a low-dimensional vector space. For example, for the word "funny" after word segmentation, its corresponding vector is found in the vocabulary of the Word2Vec model (assuming it is a vector with a dimension of 300, the specific dimension depends on the model settings), and then this vector is used to represent the numerical representation of the word "funny" in subsequent semantic analysis and other operations, so that text information that was originally difficult to perform mathematical calculations and analysis can be converted into a vector form that can be easily processed by computers, laying the foundation for subsequent operations such as vector-based semantic weight allocation and fusion processing.

[0180] To this end, the pre-trained word vector model contains a large amount of semantic and grammatical information, which is obtained through the study of massive corpus. Mapping the segmented words or phrases to such a vector space is equivalent to indirectly utilizing this rich prior knowledge, which can better capture the semantic similarity and correlation between words and phrases, and provide strong support for understanding the semantics expressed in search requests. For example, when judging the similarity between the two search requests "interesting pet anchor" and "fun animal anchor", based on the close relationship between the word vectors of "interesting" and "fun", "pet" and "animal" in the word vector space, their semantic similarity can be more accurately evaluated, thereby improving the accuracy of search result matching.

[0181] Different words and phrases are converted into vectors of fixed dimensions, which realizes the standardized and numerical representation of text data, so that various mathematical operations and algorithms can be used to process these vectors, such as vector addition and multiplication, and calculation of distance and similarity between vectors. This unified data representation greatly simplifies the processing flow, facilitates operations such as semantic weight allocation and fusion processing at the vector level, improves the operability and efficiency of the entire search request vector representation process, and also facilitates the connection with other vector-based processing modules (such as subsequent vector fusion, vector matching with content creation object description information, etc.).

[0182] Optionally, when assigning semantic weights, semantic weights are assigned according to the semantic importance of each word or phrase sequence after word segmentation. This evaluation process usually takes multiple factors into consideration. On the one hand, from the perspective of grammatical structure, the words or phrases corresponding to key components such as core subjects and predicates often have higher semantic importance. For example, in "the anchor shares interesting stories", "anchor" as the subject of the behavior and "sharing" as the core action play a key role in expressing the core semantics of the entire sentence, so they will be given a relatively high weight; on the other hand, from a semantic level, those words or phrases that can better reflect the user's core search intent and have an important impact on distinguishing search results will also receive a higher weight. For example, if the user mainly wants to find an anchor with "many fans", then the phrase "many fans" has a higher semantic importance in the entire search request expression "find an anchor with many fans", and will be assigned a larger semantic weight accordingly. In addition, we can also refer to the statistical information of words or phrases in large-scale corpora (such as word frequency, inverse document frequency, etc., and measure their importance through algorithms such as TF-IDF) and their degree of association in knowledge graphs in specific fields to assist in determining semantic weights, and comprehensively consider multiple factors to more accurately measure the importance of each semantic unit.

[0183] When actually assigning weights, there are many ways to do it, including manually setting the weight range (such as setting a range from 0 to 1, assigning corresponding values ​​to different words or phrases according to their importance), rule-based weight assignment (according to pre-set grammatical and semantic rules, words or phrases that meet specific rules are given fixed weight values), and learning weights through machine learning models (using labeled training data to allow the model to automatically learn the appropriate weights of different words or phrases in different search request expressions). For example, for the search request expression "find a humorous anchor with many fans", through analysis, it is considered that both "humorous" and "many fans" are important, and a weight of 0.5 is manually assigned (assuming the total weight is 1, both are equally important and share the weight equally), and then this weight is used to influence their role in operations such as vector fusion processing.

[0184] To this end, by reasonably allocating semantic weights, we can highlight the words and phrases in the search request expression that are most critical to reflecting the user's intention, so that in the subsequent process of fusing multiple word vectors into a question vector, these core semantic information can be fully reflected and avoid being overwhelmed by some minor and relatively semantically weak words. This allows the question vector to focus more on the features of the content creation object that the user really wants to find, improves the representativeness and accuracy of the question vector for the search request semantics, and helps to more accurately match content creation objects that meet the user's intentions.

[0185] Different search request expressions have different focuses and core semantics. The semantic weight allocation mechanism can flexibly adjust the weight of each word or phrase according to the specific request content. Regardless of whether it is a search request that focuses on describing the host's style characteristics, business-related information, or other attributes, its semantic importance can be accurately reflected through appropriate weight allocation, which enhances the system's adaptability and processing capabilities for various types of search requests. No matter how the user emphasizes his search focus, the system can effectively capture it and reflect it in the vector representation, thereby improving the user experience.

[0186] Optionally, when performing vector fusion processing based on semantic weights, all word vectors are fused based on the assigned semantic weights. Common fusion methods include weighted average method, weighted sum method, etc. Taking the weighted average method as an example, suppose that after word segmentation and word vector assignment, the word vector corresponding to the word "anchor" is The weight is w1, and the word vector corresponding to "funny" is The weight is w2, then the fused question vector It can be calculated by the following formula: (Here we only use two vectors as an example. In reality, the vectors corresponding to all words or phrases after segmentation will be included.) Through this weighted average, each word vector is integrated according to its semantic weight, so that the fused question vector integrates the semantic information of different words and phrases, and highlights the important semantic parts according to the weights. The weighted summation method is similar, except that it does not need to be divided by the sum of weights, that is, Regardless of the method used, the core is to integrate the word vectors based on weights so that the final question vector can better reflect the overall semantics of the entire search request.

[0187] When performing vector fusion processing, it is necessary to ensure that the dimensions of each word vector are consistent (this is usually guaranteed when allocating pre-trained word vectors, and the pre-trained word vector model generally outputs vectors of fixed dimensions) so that corresponding mathematical operations can be performed. At the same time, sometimes in order to ensure that the numerical range and properties of the fused vector meet the requirements of subsequent processing (for example, in some similarity calculations and other operations, it is hoped that the properties such as the modulus of the vector are in an appropriate range), the fused vector will also be normalized. Common normalization methods include dividing the vector by its modulus to make it a unit vector (that is, a vector with a modulus of 1), or mapping the values ​​of each element of the vector to a specific interval (such as the interval from 0 to 1, etc.). Through these processes, the question vector is more conducive to subsequent matching with the content creation object description information vector in terms of value and properties.

[0188] To this end, vector fusion processing integrates the word vectors corresponding to each segmented word or phrase according to the semantic weight, and generates a question vector that can represent the expression of the entire search request. This question vector integrates the information of each semantic unit in the search request, and realizes the transformation from scattered words and phrases to overall semantic representation. It provides a unified and comprehensive semantic representation basis for subsequent vector-level matching and comparison with the description information of the content creation object, which facilitates the accurate measurement of the degree of match between the search request and the content creation object.

[0189] By performing dimension processing and normalization on the fused vector, the numerical characteristics of the question vector are optimized, making it more reasonable and comparable when performing similarity calculations and matching evaluations with other vectors. For example, when the normalized vector is used for cosine similarity calculations, the range of the results is more in line with conventional semantic similarity judgment habits (cosine similarity is between -1 and 1, and normalization helps the results to more accurately reflect the actual semantic matching situation), improving the accuracy and reliability of subsequent search result screening based on vector matching, thereby improving the performance of the entire search system and the quality of search results.

[0190] Optionally, converting each content creation object description information into a context sentence vector includes:

[0191] For each content creation object description information, the key attributes are used as nodes and the relationships between attributes are used as edges to construct an attribute relationship graph;

[0192] The nodes are allowed to propagate information through edges. In each layer of propagation, the node updates its own vector representation according to the information of its neighbor nodes. The propagation formula can be expressed as: in is the vector representation of node i at the l+1th layer, N(i) is the set of neighbor nodes of node i, α ijis the attention weight of the edge between node i and node j (used to determine the importance of neighbor node information), W (l) is the weight matrix of the lth layer, σ is the activation function, α ij The correlation score between the node and its neighbor nodes is calculated based on their vector representation, and then normalized using the softmax function to obtain the weight.

[0193] Based on the created virtual central node instance, it is connected to all other nodes in the attribute relationship graph, and then the central node is allowed to learn the comprehensive information of the entire graph through information propagation, and a vector with the central node is obtained and used as the context sentence vector.

[0194] To this end, the above-mentioned technical process of converting the description information of the content creation object into the context sentence vector has the following technical benefits from the aspects of mining semantic associations, enriching vector semantics, highlighting important relationships, and generating unified representation, through the construction of attribute relationship graphs, information propagation and updating node vectors, and the use of virtual central nodes to integrate information:

[0195] 1. Benefits of building an attribute relationship diagram

[0196] By constructing an attribute relationship graph using the key attributes in the description information of the content creation object as nodes and the relationships between the attributes as edges, the originally relatively scattered and disordered description information can be converted into a structured representation. For example, for the description information related to the anchor, attributes such as "anchor name", "broadcast category", "number of fans", and "style characteristics" become nodes in the graph, and there may be relationships such as "the category of live broadcast content that the anchor is good at" between "anchor name" and "broadcast category" as edges connecting them. This graph structure can clearly present the internal logic and relationship between each attribute. Instead of viewing each attribute in isolation, it can grasp how the different attributes of the content creation object influence and relate to each other as a whole, which helps to deeply explore its deep semantics and feature information.

[0197] To this end, this structured representation helps to capture the full picture of the content creation object more accurately in the future, avoiding ignoring the synergy and implicit semantics between attributes due to focusing only on a single attribute. For example, when searching for anchors related to "food sharing and a large number of fans", the attribute relationship diagram shows that the "food sharing" broadcast category attribute may have a positive correlation with the "number of fans" (because high-quality food sharing content often attracts more fans), so as to better reflect this correlation in the vector representation, improve the recognition accuracy of content creation objects that meet the requirements, and make the search results more in line with the user's search intent.

[0198] 2. Benefits of Updating Node Vector Representations Based on Information Propagation

[0199] During the information propagation process, a node updates its own vector representation based on the information of its neighboring nodes, which means that each node is no longer limited to the attribute information it initially carries, but can absorb information about other attributes (neighboring nodes) associated with it. Through the propagation formula, factors such as the vector representation of neighboring nodes, the attention weight of the edge, and the corresponding weight matrix and activation function are comprehensively considered. For example, for the "style characteristics" node that describes the anchor, its neighboring nodes may include "broadcast categories" and "fan interaction status". When the information is propagated, according to the correlation between them and their respective importance (reflected by the attention weight), part of the information of these neighboring nodes will be integrated into the vector representation of the "style characteristics" node, so that the semantics contained in the vector is richer, reflecting more interrelated features of the anchor in different aspects.

[0200] To this end, the complex characteristics of the content creation object can be more comprehensively characterized, so that the vector representation corresponding to each attribute can contain other attribute information related to it, reflecting the specific situation of the attribute in the entire content creation object from multiple dimensions. This is very critical for accurately understanding and representing content creation objects, especially when faced with complex situations where multiple attributes are intertwined and influenced by each other. It can avoid the one-sidedness of a single attribute vector representation, improve the accuracy and completeness of the vector's description of the content creation object, and thus improve the accuracy of subsequent searches based on vector matching.

[0201] The attention weight used in the propagation process is used to determine the importance of neighbor node information. It calculates the correlation score between nodes and then normalizes it through the softmax function to obtain the weight value. This mechanism allows for the fusion of neighbor node information, not treating all neighbor nodes equally, but assigning different importance weights based on their actual degree of association with the current node. For example, for the "number of fans" node, the "on-air category" node may be more relevant to it in some cases (such as when a specific popular category is more likely to attract fans). In this case, when the information is propagated, the attention weight corresponding to the "on-air category" node will be relatively high, and its information will account for a larger proportion when updating the "number of fans" node vector representation, which can highlight more critical related information and filter out relatively minor related influences.

[0202] To this end, the attention mechanism can focus on the truly important correlations between the attributes of content creation objects, avoid interference from irrelevant or weakly related information, and allow the vector representation to more accurately reflect the factors that have an important impact on the characteristics of content creation objects and the matching degree with search requests. During the search process, it helps to more accurately distinguish the differences in the correlation of key attributes of different content creation objects, improve the ability to screen out content creation objects that meet the user's search intent, and make the search results more targeted and reliable.

[0203] 3. Benefits of learning the comprehensive information of the graph as the context sentence vector through the virtual central node

[0204] Create a virtual central node instance and connect it to all other nodes in the attribute relationship graph, and then let it learn the comprehensive information of the entire graph through information propagation. This virtual central node is like a convergence point that can collect and integrate all the information contained in each attribute node and their mutual relationship. After multiple rounds of information propagation, the information it learns covers the whole picture of the content creation object represented by the entire attribute relationship graph. By expressing this comprehensive information in the form of a vector, we can get the context sentence vector that can represent the description information of the content creation object. For example, for a piece of information that describes the host in detail in all aspects, through the information aggregation and integration of the central node, its final vector can fully reflect the comprehensive characteristics of the host from basic information to business content, style characteristics, and social influence, forming a unified and holistic semantic representation.

[0205] To this end, a complete and representative vector representation basis is provided for subsequent matching and comparison with the question vector, avoiding the problem of difficulty in measuring the overall matching degree with the search request due to the use of multiple scattered attribute vectors. This context sentence vector can be directly used to perform similarity calculations with the question vector, which can more intuitively and effectively determine whether the content creation object meets the user's search intent, improve the convenience and accuracy of the vector matching link, and help to quickly and accurately screen out suitable content creation objects.

[0206] Regardless of the structural complexity of the content creation object description information itself, the corresponding attribute relationship graph structure may vary greatly, but the method of learning comprehensive information through virtual central nodes has good adaptability. Because no matter whether the relationship between attributes is simple or complex, sparse or dense, the virtual central node can obtain and integrate the corresponding information through the connection with each node and the information propagation process, and finally generate the corresponding context sentence vector. For example, for a simple description of a content creation object information containing only a few key attributes, or a piece of information containing many detailed attributes and complex associations, it can be converted into a suitable vector representation through this mechanism, so that the system can perform subsequent search and matching operations in a unified vector form when processing description information of various levels of detail and structure.

[0207] To this end, the system's ability to process description information of content creation objects in different formats and with different levels of detail has been enhanced, which has improved the system's versatility and compatibility, enabling it to better cope with diverse data situations that may arise in practical applications, and ensuring that descriptive information can be accurately converted into vectors for matching and screening in various situations, thereby ensuring the stable operation of the search system and the output of effective search results.

[0208] Optionally, calculating a matching evaluation score between the question vector and the context sentence vector includes:

[0209] Concatenate the question vector and the context sentence vector to obtain an input vector, and input the input vector into the hidden layer;

[0210] Concatenate the question vector and the context sentence vector to get the input vector Input Vector is the question vector and context sentence vector splicing.

[0211] Calculate the hidden layer output Calculate first For each neuron j in the hidden layer, calculate Then apply the ReLU function, i.e. W 1: is the weight matrix from the input layer to the hidden layer, b 1: is the bias vector of the hidden layer, W 1ji is the weight matrix W 1: The element in the jth row and ith column of ;

[0212] Calculate the output layer output as the matching score y: First calculate Right now Then apply the Sigmoid function Get the matching evaluation score, W2: is the weight matrix from the hidden layer to the output layer, W 21j Represents the weight matrix W 2: The element at row 1 and column j in .

[0213] The following are the technical benefits of the above technical process of calculating the matching evaluation score between the question vector and the context sentence vector:

[0214] 1. Benefits of Vector Stitching

[0215] The question vector and the context sentence vector are concatenated to obtain the input vector. This can integrate the information contained in the question vector representing the user's search request and the context sentence vector reflecting the description information of the content creation object into a unified vector representation. For example, the question vector carries key semantic information that the user wants to find, such as "anchors with funny style and many fans", while the context sentence vector covers the actual attributes of a specific anchor in terms of style characteristics, number of fans, etc. Through concatenation, the subsequent neural network can consider both aspects of information at the same time, avoiding the information fragmentation problem that may occur when processing them separately, and laying the foundation for measuring the degree of matching between the two as a whole.

[0216] To this end, this integration method facilitates the subsequent comprehensive analysis and processing of information by the neural network, allowing the system to judge the fit between the content creation object and the search request based on complete information under a unified framework, and evaluate the matching degree more comprehensively and accurately, avoiding the deviation of matching results caused by only focusing on partial information, improving the accuracy and reliability of matching evaluation, and thus ensuring that the search results can better meet the user's search intent.

[0217] 2. Benefits of Hidden Layer Calculation

[0218] When calculating the hidden layer output, a linear transformation is first performed (calculation ), where the weight matrix W1 and the bias vector b1 play the role of linear mapping of the input vector. Different weight values ​​determine the scaling, translation and other changes of the input vector's dimensional information during the mapping process, which helps to perform preliminary feature extraction and information integration on the concatenated input vector. Then apply the ReLU function As a nonlinear activation function, ReLU can introduce nonlinear factors, allowing the neural network to learn the complex nonlinear relationship between the dimensions of the input vector. For example, the dimensions corresponding to different attributes in the question vector and the context sentence vector may not be simply linearly related (for example, there may be a complex, nonlinear mutual influence relationship between "funny style" and "number of fans", not a simple proportional or inverse relationship). Through the nonlinear transformation of the ReLU function, the neural network can dig out and capture these complex relationships hidden behind the data, further enriching and deepening the feature representation of the input information.

[0219] To this end, it can better adapt to the complex semantic relationships that are prevalent in natural language and content creation object-related data, and mine deep features and associations that are difficult to discover with linear models alone, making the matching relationship analysis of question vectors and context sentence vectors more accurate and detailed, which helps to improve the effectiveness of matching evaluation scores, allowing the system to more accurately determine which content creation objects truly match user search requests in terms of semantics and features, thereby improving the quality of search results.

[0220] Through the above calculation process, multiple neurons in the hidden layer extract and abstract features of the input vector from different angles. The elements in the weight matrix \(W_1\) of each neuron are different, which means that they focus on different dimensional combinations of the input vector and different ways of processing these dimensional information, thereby extracting diverse features. For example, some neurons may focus on extracting features related to style characteristics, while other neurons may focus on features of other attributes such as the number of fans and the categories of broadcasts. As the number of hidden layer neurons increases and they collaborate with each other, the original and specific information in the input vector can be gradually abstracted into a higher-level and more representative feature representation, and the matching-related features between the question vector and the context sentence vector can be characterized from multiple dimensions, which is convenient for further comprehensive judgment of the matching degree in the future.

[0221] To this end, the system has enhanced its ability to process complex information contained in the input vector. Through feature extraction and abstraction of multiple layers of neurons, it can transform complex, high-dimensional vector information into a more concise representation that better reflects key matching features, avoiding problems such as the curse of dimensionality when directly processing the original vector. At the same time, it also enables the matching evaluation process to focus on the core features that truly affect the matching results, improving the efficiency and accuracy of the matching evaluation, and providing a strong intermediate feature foundation for outputting reasonable matching evaluation scores.

[0222] 3. Benefits of calculating the matching score through the output layer

[0223] When calculating the output layer output as the matching score y, a linear transformation is first performed Similarly, the weight matrix W2 and the bias vector b2 are used to further linearly map and integrate the feature vector output by the hidden layer, and then the Sigmoid function is applied The role of the Sigmoid function is to compress the output value into the interval (0,1). In this way, no matter what the value range of the characteristic vector output by the hidden layer is after linear transformation, the final matching evaluation score falls within the interval (0,1) that is easy to understand and explain, where 0 represents a complete mismatch, 1 represents a complete match, and the values ​​in between represent different degrees of matching. For example, when the calculated matching score is 0.8, it can be intuitively understood that the content creation object has a high degree of match with the search request, which facilitates users and the system to intuitively judge and subsequently process the matching results.

[0224] To this end, an intuitive and standardized matching measurement method is provided, which helps users clearly understand the degree of fit between the content creation object and their search request. At the same time, it also provides a clear numerical basis for the system to perform subsequent operations such as screening content creation objects based on the matching degree, thereby enhancing the interpretability and practicality of the matching evaluation results, which is conducive to improving the user experience and operational convenience of the entire search system.

[0225] In the output layer, the features extracted by multiple neurons in the hidden layer are integrated, and different weights of importance are assigned to different features in combination with the weight matrix W2 to comprehensively judge the matching degree between the question vector and the context sentence vector. 21j Determines the different features of the hidden layer (output by the hidden layer neurons h j The weight of the feature in the final match evaluation is expressed as W, which enables the system to reasonably weigh the contribution of each feature to the overall match according to the learned pattern and determine the match score comprehensively. For example, if the feature "style feature matching" extracted in the hidden layer is found in past training to be very important in determining whether the content creation object meets the user's needs, then the corresponding weight W in the output layer is 21j The probability is relatively large, and the impact of this feature is more significant when calculating the matching score, thus achieving accurate matching evaluation based on multi-dimensional features.

[0226] To this end, we fully utilize the rich feature information extracted from the hidden layer to avoid the one-sidedness of judging the matching degree by a single feature. By comprehensively considering multiple features and their relationships, we can more scientifically and accurately measure the matching between the question vector and the context sentence vector, so that the matching evaluation score can truly reflect the degree of fit between the content creation object and the search request in terms of semantics, features and other aspects, thereby improving the accuracy and reliability of the matching evaluation, and providing a more powerful basis for screening out content creation objects that meet user intentions, thereby improving the overall performance of the search system and the quality of search results.

[0227] Optionally, the filtering out and returning the content creation object pointed to by the corresponding content creation object description information when the matching evaluation score is greater than the set matching evaluation score threshold, includes: creating a matching_scores array and a content_objects array, the matching_scores array storing the matching scores, and the content_objects array storing the corresponding content creation object description information; assigning the set matching evaluation score threshold to a threshold variable; using a loop to traverse each matching evaluation score in the matching_scores array; performing a comparison operation with the threshold variable for each matching evaluation score to determine whether each matching evaluation score is greater than the set matching evaluation score threshold; when finding a situation where the matching evaluation score is greater than the set matching evaluation score threshold, recording the index index of the matching evaluation score in the matching_scores array; and obtaining the content creation object pointed to by the corresponding content creation object description information from the content_objects array according to the index index.

[0228] Optionally, when creating and initializing the arrays, when creating the `matching_scores` array and the `content_objects` array, the size of the arrays needs to be reasonably allocated according to the estimated number of matching evaluation scores and the number of content creation object description information to avoid subsequent errors such as array out-of-bounds. Some initialization operations can be performed to ensure that the array elements have appropriate initial values, such as initializing the elements of the `matching_scores` array to 0, and initializing the elements of the `content_objects` array to null pointers (if a programming language that supports pointers is used) or specific default values ​​(indicating that there is no valid content creation object description information). The creation of these two arrays is usually implemented according to the specific programming language environment using the corresponding array declaration syntax. For example, in Python, you can use lists to simulate arrays, create an empty list through `matching_scores=[]` and `content_objects=[]`, and then add elements to it in sequence according to the actual calculated matching scores and the corresponding description information; in Java, use statements like `double[]matching_scores=new double[size];` (assuming `size` is the estimated number of elements, and the example here is to store double-precision matching scores) and `ContentObject[]content_objects=newContentObject[size];` (assuming `ContentObject` is a custom class for storing content creation object description information) to create arrays and allocate memory space.

[0229] The estimation of array size should take into account the number of possible search results and system resources. If the estimate is too small, it may lead to frequent array expansion operations when adding elements (in some languages ​​with dynamic array implementations), affecting performance; while an estimate that is too large may cause a waste of memory space. Therefore, the appropriate array size can be reasonably estimated based on factors such as past search data statistics, system load, and the approximate size of the content creation object database to ensure that it can accommodate all possible matching results and efficiently use memory resources.

[0230] Optionally, when assigning a value to a threshold variable, when assigning a set matching evaluation score threshold to the `threshold` variable, the determination of this threshold is a key step. The value of the threshold usually needs to be determined through multiple experiments and data analysis, taking into account factors such as the accuracy of search results, recall rate, and user expectations. You can first test different thresholds on a small-scale test data set to observe whether the returned content creation objects meet the expected search intent. For example, for search requests for "funny style anchors", set different thresholds to see at what threshold the anchors returned do indeed mostly have obvious funny styles, while not missing too many potential anchors that meet the requirements, so as to determine a more appropriate threshold range, and then further fine-tune it based on actual application scenarios and user feedback. In the code, depending on the type of programming language, the assignment operation may be a simple direct assignment statement, for example, in C++ it may be `doublethreshold=0.8;` (assuming the threshold is set to 0.8). The threshold type here (such as `double` represents a double-precision floating point number) must match the type of the matching evaluation score stored in the `matching_scores` array to ensure the correctness of subsequent comparison operations.

[0231] The setting of thresholds is not fixed. With the update of the content creation object database, the change of user search habits, and the adjustment of the system's requirements for search accuracy, etc., it may be necessary to re-evaluate and update the thresholds regularly. In addition, in a multi-user, multi-scenario application environment, you can also consider setting personalized thresholds for different types of search requests or different user groups, and dynamically adjust the thresholds corresponding to each user through user portraits, search history analysis, etc., to better meet diverse search needs.

[0232] Optionally, for loop traversal and comparison operations, when using a loop to traverse each matching evaluation score in the `matching_scores` array, common loop structures include `for` loops, `while` loops, etc. The specific choice depends on the characteristics of the programming language and the logical clarity requirements of the code. Taking the `for` loop as an example, it can be written like this in Python:

[0233]

[0234] In the comparison operation, it is necessary to ensure that the comparison logic conforms to the expected semantics, that is, to determine whether the matching evaluation score is strictly greater than the set threshold (here is the `>` operator), and to take into account the precision problems that may occur when comparing floating-point numbers (due to the storage method of floating-point numbers in the computer, some minor errors may occur). In order to compare floating-point numbers more accurately, some appropriate methods can be used, such as setting an allowable error range (such as determining whether the absolute value of the difference between two floating-point numbers is less than a minimum value, such as `abs(score-threshold)<0.00001`, the specific value is determined according to the actual precision requirements). When the difference is within this range, they are considered to be numerically equal or meet the comparison requirements, avoiding incorrect comparison results caused by floating-point precision problems. During the loop traversal process, if the number of array elements is very large, performance problems may occur, especially when the operations in each loop are complex (for example, in addition to comparison operations, there are other complex calculations or database access operations, etc.). To improve performance, you can consider optimizing the loop, such as using the compiler's optimization options (in compiled languages), using more efficient algorithmic logic to replace some complex operations, or using parallel processing technology (if supported) to distribute the comparison operations in the loop to multiple threads or processes to perform them simultaneously, thereby speeding up traversal and comparison. In addition, for the problem of floating-point precision, in addition to the above-mentioned method of setting the error range, you can also perform appropriate numerical processing on the matching evaluation score according to the specific application scenario, such as rounding operations, so that it is more in line with the actual semantic requirements when comparing.

[0235] Optionally, for index record and object retrieval, when a case where the matching score evaluation score is greater than the set matching score evaluation score threshold is found, record the index `index` of this matching score evaluation score in the `matching_scores` array. A variable can be used to store this index value. For example, in most programming languages, an integer variable `index` can be defined and assigned within the code block that meets the condition, such as `index = i;` (assuming `i` is a loop variable used to traverse the array indices). When retrieving the content creation object pointed to by the corresponding content creation object description information from the `content_objects` array according to the index `index`, it is also necessary to ensure the legality of the index, that is, it cannot exceed the range of the `content_objects` array. Therefore, it is best to perform an index range verification before the retrieval operation (such as a conditional judgment like `if(index >= 0 && index < content_objects.length)`; here, the syntax similar to Java is used as an example). The specific operation of retrieving the object depends on the data structure for storing the content creation object description information and the object itself, as well as the programming language features. For example, if the `content_objects` array stores object references (pointers), then the corresponding object content can be directly accessed through this reference. In Python, if the object information is represented by data structures such as object instances or dictionaries, the specific object attributes and content can be obtained through the corresponding indices or key values, etc.

[0236] To ensure the accuracy and integrity of the retrieved content creation object, it is necessary to ensure that the elements in the `content_objects` array and the elements in the `matching_scores` array are logically in one-to-one correspondence, that is, each matching score evaluation score corresponds to the matching situation of the object pointed to by the description information in the `content_objects` array at the same index position. During the entire search and matching process, it is necessary to ensure that the operations on these two arrays (such as adding elements, modifying elements, etc.) follow the same logic and order to avoid data inconsistency. For example, when adding new matching scores and corresponding object description information to both arrays simultaneously, a synchronization mechanism (in a multi-threaded or multi-process environment) or operating strictly in sequence should be used to ensure their data synchronization and consistency. Otherwise, problems such as retrieving the wrong object or missing objects that should be returned may occur.

[0237] To this end, by creating the `matching_scores` array and the `content_objects` array to store the matching scores and the corresponding content creation object description information respectively, the relevant data is organized and classified in an orderly manner. The design of this data structure enables the corresponding elements to be clearly located and processed according to the array index in subsequent operations such as screening, comparison, and object acquisition. Just like using a table, the two elements (matching scores and object description information) in each row (corresponding to the same index) are related to each other, which facilitates unified management and operation. For example, when traversing and comparing matching scores, the corresponding object description information can be directly matched through the index, without the need for complex search or association operations to determine the corresponding relationship between the two, which improves the readability and maintainability of the code, and also facilitates batch processing and analysis of data, such as counting the number of objects that meet different threshold conditions, analyzing the distribution of matching scores, etc.

[0238] In the actual development and maintenance of the search system, a clear data structure helps developers quickly understand the code logic, expand functions and debug. If new attributes need to be added or the matching evaluation mechanism needs to be improved later, the corresponding code modification and data update can be easily performed based on this array structure. For example, an array can be added next to the `matching_scores` array to store other related evaluation indicators (such as matching weights of different dimensions, etc.), and these new data can be easily associated with the existing object description information to ensure the scalability and flexibility of the system and reduce development and maintenance costs. In addition, accurate screening can be achieved based on threshold comparison. By setting the matching evaluation score threshold and comparing it with each matching evaluation score, content creation objects can be accurately screened according to the user's expected matching degree standard. The threshold is like a screening "filter". Only those content creation objects with a certain level of matching (greater than the threshold) will be selected. This can avoid returning too many objects that are not strongly related or do not meet the user's search intent, and improve the quality and relevance of search results. For example, when searching for "technology anchors with solid professional knowledge", if the threshold is not set, a lot of anchor information that only occasionally involves technology content or does not explain professional knowledge in depth may be returned. By setting the threshold reasonably (such as 0.8), those anchors who really have a high match in professional knowledge and technology can be screened out, so that users can quickly obtain the content creation objects that best meet their expectations and improve user experience. Under different search scenarios and user needs, the adjustability of the threshold further enhances the flexibility and accuracy of screening. For some users who have high requirements for the accuracy of search results and want to obtain the content creation objects that best meet their requirements, a higher threshold can be set; for those who want to obtain more extensive relevant information and pay more attention to the recall rate, the threshold can be appropriately lowered. Through this threshold comparison mechanism, the system can adapt well to the diverse user needs. Whether it is professional users performing precise searches or ordinary users performing broad information exploration, they can get relatively satisfactory search results, which improves the versatility and applicability of the search system. The index mechanism ensures accurate association and acquisition, and uses the index to record and associate the matching evaluation score with the description information of the content creation object and the final method of obtaining the object, ensuring the accurate correspondence of the data in the entire screening process. By finding the index of the score that meets the threshold condition in the `matching_scores` array, and then obtaining the object pointed to by the corresponding object description information from the `content_objects` array based on this index, the matching score can be accurately associated with the correct object, avoiding the situation of obtaining the wrong object due to data confusion or incorrect association.For example, no matter how the elements in the `matching_scores` array and the `content_objects` array change dynamically (such as as new search results are added), as long as the index mechanism is correctly maintained, the corresponding objects can always be accurately filtered out according to the matching degree, ensuring the reliability and accuracy of the entire screening process. The accuracy of the index mechanism is particularly important when dealing with large-scale search results and complex data structures. It enables the system to efficiently and accurately obtain objects that meet the requirements when faced with a large amount of matching evaluation data and numerous content creation object description information, without problems such as object acquisition errors or omissions caused by the huge amount of data. This accurate association and acquisition method based on indexing ensures that the search system can run stably under different data scales, output reliable search results, enhance the robustness and stability of the system, and meet the high requirements for search accuracy and reliability in practical applications.

[0239] Figure 2 A schematic diagram of a content creation object search device provided by an embodiment of the present invention. Figure 2 As shown, it includes: a first program unit for obtaining an input search request expression, wherein the search request expression is expressed in natural language; a second program unit for splitting the search request expression into single words or single phrases based on the internal word segmentation code assigned to the content creation object; a third program unit for constructing a logical framework including multi-dimensional screening conditions based on the logical relationship between the single words or the single phrases; a fourth program unit for converting the logical framework into a structural expression to match database table fields in the content creation object database based on the structural expression; a fifth program unit for searching for content creation objects in the content creation object database based on the matched database table fields to obtain a number of content creation object description information; a sixth program unit for converting the search request expression into a question vector, and converting each content creation object description information into a context statement vector; a seventh program unit for calculating the matching evaluation score between the question vector and the context statement vector; and an eighth program unit for screening out and returning the content creation object pointed to by the corresponding content creation object description information when the matching evaluation score is greater than a set matching evaluation score threshold. Figure 2 In the embodiments, the exemplary explanation of the technical processing process of each program unit can be found in the above Figure 1 Records of.

[0240] Figure 3 A schematic diagram of the structure of an electronic device is provided in accordance with an embodiment of the present invention. Figure 3As shown, the electronic device includes a memory and a processor, the memory stores a computer executable program, and the processor runs the computer executable program to implement the following steps: obtaining an input search request expression, the search request expression is expressed in natural language; splitting the search request expression into single words or single phrases based on the internal word segmentation code assigned to the content creation object; constructing a logical framework including multi-dimensional screening conditions based on the logical relationship between the single words or the single phrases; converting the logical framework into a structural expression to match database table fields in the content creation object database based on the structural expression; searching for content creation objects in the content creation object database based on the matched database table fields to obtain a number of content creation object description information; converting the search request expression into a question vector, and converting each content creation object description information into a context statement vector; calculating the matching evaluation score between the question vector and the context statement vector; screening out and returning the content creation object pointed to by the corresponding content creation object description information when the matching evaluation score is greater than the set matching evaluation score threshold. Figure 3 In the embodiment, the exemplary explanation of the technical processing process of each step can be found in the above Figure 1 Records of.

[0241] The above implementation methods are only used to illustrate the embodiments of the present invention, and are not intended to limit the embodiments of the present invention. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present invention, and the patent protection scope of the embodiments of the present invention should be defined by the claims. The systems, devices, modules or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions.

Claims

1. A method for searching content creation objects, characterized in that: include: Obtaining an input search request expression, where the search request expression is expressed in a natural language; Splitting the search request expression into individual words or individual phrases based on the internal word segmentation codes assigned to the content creation object; Based on the logical relationship between the single words or the single phrases, a logical framework including multi-dimensional screening conditions is constructed; Converting the logical framework into a structural expression to match database table fields in a content creation object database based on the structural expression; Based on the matched database table fields, searching for content creation objects in the content creation object database to obtain a plurality of content creation object description information; Convert the search request expression into a question vector, and convert each content creation object description information into a context sentence vector; Calculating a matching evaluation score between the question vector and the context sentence vector; The content creation object pointed to by the corresponding content creation object description information when the matching evaluation score is greater than the set matching evaluation score threshold is filtered out and returned.

2. A method for searching content creation objects according to claim 1, characterized in that: The input search request expression is obtained, and the search request expression is expressed in natural language: The front-end-based multimodal event listener listens to input events, captures user input in real time, and converts the captured input into a character stream through a set conversion function, wherein the input event includes at least one of a keyboard input event, a voice input event, and a handwriting input event; Add the character stream to the configured buffer in the order of input to form a character stream sequence; According to the set grammar rules, a preliminary grammar check and automatic completion are performed on the character stream sequence to generate a search request expression.

3. A method for searching content creation objects according to claim 2, characterized in that: The front-end-based multimodal event listener listens to input events and captures user input in real time, including: For the keyboard input event, use the addEventListener component of JavaScript to bind the multimodal event listener to the keydown, keyup and keypress events of the search input box to trigger keyboard input event capture when the user inputs characters on the keyboard; For the voice input event, the multimodal event listener is bound to a click event or a voice wake-up event of the voice input button through a voice recognition interface provided by the browser, so as to trigger the capture of the voice input event when the user inputs characters by voice; For the handwriting input event, the multimodal event listener is bound to the handwriting input area through the interface of the handwriting recognition library to trigger the capture of the handwriting input event when the user inputs characters by handwriting.

4. A method for searching content creation objects according to claim 2, characterized in that: The step of performing preliminary grammar checking and automatic completion on the character stream sequence according to the set grammar rules to generate a search request expression includes: The grammatical rules are parsed based on the set grammatical rule parser to create a keyword object phrase and a conjunction object phrase, wherein the grammatical rules include a keyword rule, a conjunction rule, and a numerical range rule, wherein the keyword rule lists various attribute keywords related to the anchor and their possible variants; the conjunction rule defines the use of the conjunctions "and" or "greater than" or "less than" in the search request; the numerical range rule specifies the expression of the numerical search condition; Based on the grammar detection state transition mechanism defined by the set finite state machine, starting from the beginning of the character stream sequence, analyze each character one by one, wherein for each character, first determine its category, whether it is a letter, a number, a punctuation mark or a special character, if it is a letter, determine whether it may be part of a keyword based on the context of the current character, and check whether there is a matching keyword by matching it with the keyword object array, and if it is a punctuation mark or a conjunction, check whether its use conforms to the grammar structure defined in the conjunction rule, so as to generate a grammar detection result; Based on the grammar detection results, possible subsequent keywords or search conditions are determined to generate automatic completion suggestions, and, based on the user's historical search records, the user's frequently used search patterns and keyword combinations are analyzed and integrated into the automatic completion suggestions to generate a search request expression.

5. A method for searching content creation objects according to claim 1, characterized in that: The step of splitting the search request expression into individual words or phrases based on the internal word segmentation code assigned to the content creation object comprises: Collecting attribute features of the content creation object, defining different word segmentation codes with different attributes and setting multiple matching modes for each word segmentation code, wherein the matching modes include synonyms, near-synonyms and colloquial expression matching, wherein the attribute features include: basic information, business-related information, style characteristics and social influence-related information; All word segmentation codes and their corresponding matching patterns are converted into a hash table for storage. When a hash conflict occurs, a free storage location is found according to a predefined detection sequence to store the conflicting elements. Alternatively, the conflicting elements are stored in a linked list structure in the same hash bucket so that the conflicting elements can be accessed through a linked list traversal operation.

6. A method for searching content creation objects according to claim 1, characterized in that: The step of splitting the search request expression into individual words or individual phrases based on the internal word segmentation code assigned to the content creation object includes: Standardizing the search request expression and removing stop words to obtain the search request expression to be segmented; Starting from the beginning of the search request expression to be segmented, according to the longest phrase matching mode defined in the internal word segmentation code library, try to match words or phrases in turn and identify words and phrases according to the context relationship. The context relationship is obtained by analyzing the co-occurrence probability of the previous and next words and phrases in the set context window; Determine whether the identified words or phrases have matching word segmentation codes in the internal word segmentation code library, and if so, determine the words or phrases as the words or phrases obtained by splitting; If it does not exist, the similarity between the identified words and phrases and the word segmentation codes of the internal word segmentation code library is calculated. If the similarity is greater than the set similarity threshold, the words and phrases are supplemented as the words or phrases obtained by the splitting.

7. A method for searching content creation objects according to claim 1, characterized in that: The step of constructing a logical framework including multi-dimensional screening conditions based on the logical relationship between the single words or the single phrases includes: Performing grammatical structure analysis on the single words or the single phrases to obtain the hierarchical structure and logical relationship between the single words or the single phrases; Performing semantic relationship recognition on the single words or the single phrases to obtain semantic association relationships between the single words or the single phrases; Constructing multi-dimensional screening conditions according to the hierarchical structure, logical relationship, and semantic association relationship between the single words or the single phrases; Each filter condition is marked with its importance weight in syntax and semantics to build a logical framework including multi-dimensional filter conditions.

8. A method for searching content creation objects according to claim 7, characterized in that: The method further comprises: Vectorizing the single word or the single phrase to obtain a vector sequence; Based on the set time step, the vector sequence is input into the grammatical attention head and the semantic attention head; By calling the grammatical attention head, based on the learned part-of-speech information, grammatical patterns and grammatical rules of the words, grammatical feature extraction is performed on the vector sequence to perform grammatical structure analysis on the single words or the single phrases to obtain the hierarchical structure and logical relationship between the single words or the single phrases; The semantic attention head is called to extract semantic features from the vector sequence, to identify semantic relationships between the single words or the single phrases, and to obtain semantic association relationships between the single words or the single phrases.

9. A method for searching content creation objects according to claim 1, characterized in that: The converting the logical framework into a structural expression to match database table fields in a content creation object database based on the structural expression comprises: Invoking a method for converting the attribute characteristics of the content creation object between a logical framework and a structural expression, so that each screening condition in the logical framework is combined according to a predetermined template to convert the logical framework into a structural expression; The query optimizer generates a query plan according to the structure expression index information to determine the access path and connection order of the data; According to the access path and connection sequence of the data, database table fields are matched in the content creation object database.

10. A method for searching content creation objects according to claim 1, characterized in that: Based on the matched database table fields, the content creation object is searched in the content creation object database to obtain a plurality of content creation object description information, including: Dynamically build SQL query statements based on the matched database table fields; Creating a search task according to the SQL query statement, wherein the search task includes multiple subtasks; The content creation object database is searched for content creation objects by performing paged query and batch reading based on the plurality of subtasks.

Citation Information

Patent Citations

  • Grammar-based unsupervised word segmentation method and device and storage medium

    CN117332779A

  • Large language model Text2SQL single-table query statement generation method

    CN118643039A

  • Construction method and device of knowledge base question-answering system, equipment and storage medium

    CN119293164A

  • Intelligent session method and server based on table data retrieval.

    MX2023003764A

Cited By

  • Method and system for searching by combining user input information

    CN120744134A