Index structure construction and index tag determination method and device, medium and product

By integrating multiple historical index structures of the same search platform, the target index structure is constructed, and the problems of low search efficiency and resource waste caused by multiple independent index structures are solved, and efficient and multi-dimensional search retrieval is achieved.

CN119441541APending Publication Date: 2025-02-14XINGIN INFORMATION TECH (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411503842.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the prior art, multiple independent index structures are usually defined in the same search platform, resulting in low search efficiency, waste of resources and redundant data storage maintenance problems.

Method used

By obtaining multiple historical index structures of the same search platform, integrating their index labels, and building a target index structure based on preset hierarchical relationships, reducing redundant indexes and avoiding duplicate retrieval.

Benefits of technology

It improves search efficiency, reduces resource waste and redundant data storage, realizes multi-dimensional retrieval of the search platform, and improves the comprehensiveness and accuracy of the search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441541A_ABST
    Figure CN119441541A_ABST
Patent Text Reader

Abstract

One or more embodiments of the invention provide an index structure construction and index tag determination method and device, a medium and a product. The index structure construction method comprises the steps that at least two historical index structures applied to the same search platform are obtained, each historical index structure comprises at least one hierarchy, and each hierarchy comprises a plurality of index tags; taking each index tag in the at least two historical index structures as a node in a to-be-constructed target index structure, and establishing an edge between nodes belonging to different hierarchies based on a preset hierarchical relationship of the target index structure to generate the target index structure; the preset hierarchical relationship is used for describing a superior-subordinate relationship between hierarchies in the at least two historical index structures. The index labels of different historical index structures are integrated into a unified target index structure, and a clear hierarchy and node relationship is established, so that redundant indexes can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present application relate to the field of computer software technology, and in particular, to an index structure construction method, an index tag determination method, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] In search scenarios, index structure is usually one of the important tools to improve search efficiency. The index structure can greatly speed up the query through the ordered mapping between index tags and search terms, thereby improving the user's search experience.

[0003] However, in order to meet the needs of different search scenarios, related technologies usually define multiple independent index structures in the same search platform. The use of different index structures separately is not conducive to improving search efficiency. Moreover, the use of multiple independent index structures not only wastes resources, but may also lead to the storage and maintenance of redundant data. Summary of the invention

[0004] In view of this, one or more embodiments of the present application provide an index structure construction method, an index tag determination method, an electronic device, a computer-readable storage medium, and a computer program product.

[0005] To achieve the above objectives, one or more embodiments of the present application provide the following technical solutions:

[0006] According to a first aspect of one or more embodiments of the present application, a method for constructing an index structure is proposed, including:

[0007] Acquire at least two historical index structures applied to the same search platform, each of the historical index structures comprising at least one level, each level comprising a plurality of index tags; wherein different historical index structures are used to indicate that a plurality of search items provided by the search platform are to be retrieved from different retrieval dimensions;

[0008] Each index label in the at least two historical index structures is used as a node in the target index structure to be constructed, and edges between nodes belonging to different levels are established based on a preset hierarchical relationship of the target index structure to generate the target index structure; wherein the preset hierarchical relationship is used to describe the superior-subordinate relationship between each level in the at least two historical index structures.

[0009] In one implementation, the establishing of edges between nodes belonging to different levels based on a preset hierarchical relationship of the target index structure includes:

[0010] Acquire hierarchical mapping information predetermined based on a preset hierarchical relationship of the target index structure, the hierarchical mapping information including upper index tags and / or lower index tags corresponding to each index tag in the at least two historical index structures;

[0011] Based on the level mapping information, edges between nodes belonging to different levels are established.

[0012] In one implementation, the target index structure further includes at least one additional level other than the levels in the at least two historical index structures;

[0013] The preset hierarchical relationship is also used to describe the superior-subordinate relationship between different newly added hierarchies, and the superior-subordinate relationship between at least one of the newly added hierarchies and the hierarchical relationships between the hierarchies in the at least two historical index structures;

[0014] The method further comprises:

[0015] Performing data mining on a number of search conditions received by the search platform to obtain a plurality of target search conditions;

[0016] Based on the multiple target search conditions, generate an index tag corresponding to the newly added level;

[0017] The index tag corresponding to the newly added level is added as a newly added node to the target index structure, and edges are established between the newly added node and other nodes in the target index structure based on the preset hierarchical relationship.

[0018] In one implementation, the generating, based on the multiple target search conditions, index tags corresponding to the newly added levels includes:

[0019] Perform word segmentation and function word filtering on each of the target search conditions to obtain at least one phrase, and use the phrase as an index tag corresponding to the first newly added level;

[0020] and / or,

[0021] Performing entity recognition on the phrase to obtain an entity corresponding to the phrase, and using the entity corresponding to the phrase as an index label corresponding to the second newly added level;

[0022] and / or,

[0023] The entities corresponding to the phrases are classified to obtain entity categories corresponding to the phrases, and the entity categories corresponding to the phrases are used as index labels corresponding to the third newly added level.

[0024] In one implementation, the preset hierarchical relationship includes: the previous level of the first newly added level includes at least one of the second newly added level and the designated levels in the at least two historical index structures, and the previous level of the second newly added level includes the third newly added level;

[0025] The step of adding the index tag corresponding to the newly added level as a newly added node to the target index structure, and establishing edges between the newly added node and other nodes in the target index structure based on the preset hierarchical relationship includes:

[0026] Adding the index tag corresponding to the third newly added level as a third type of newly added node to the target index structure;

[0027] Adding the index tag corresponding to the second newly added level as a second type of newly added node to the target index structure, and determining the parent node of the second type of newly added node according to the preset hierarchical relationship to establish an edge between the second type of newly added node and its parent node;

[0028] The index tag corresponding to the first newly added level is added as a first type of newly added node to the target index structure, and the parent node of the first type of newly added node is determined according to the preset hierarchical relationship to establish an edge between the first type of newly added node and its parent node.

[0029] In one implementation, determining the parent node of the first-category newly added node according to the preset hierarchical relationship includes:

[0030] After determining the target entity corresponding to the first type of newly added node, taking the second type of newly added node corresponding to the target entity as the parent node of the first type of newly added node according to the preset hierarchical relationship;

[0031] and / or,

[0032] Determining, according to the preset hierarchical relationship, candidate nodes in the target index structure that belong to a specified level in the at least two historical index structures;

[0033] A candidate node that meets the following conditions is determined as the parent node of the first type of newly added node: the index tag in the first type of newly added node contains the index tag in the candidate node, or the index tag in the first type of newly added node contains a word with the same semantics as the index tag in the candidate node.

[0034] In one implementation, data mining is performed on the search conditions received by the search platform to obtain multiple target search conditions, including:

[0035] Based on the first statistical feature of each of the search conditions among the plurality of search conditions, a plurality of candidate search conditions whose first statistical search feature satisfies a first set statistical condition are screened out from the plurality of search conditions;

[0036] Based on the second statistical characteristics of each of the candidate search conditions in the plurality of search items, screening out from the plurality of candidate search conditions a plurality of search conditions to be checked whose second statistical characteristics satisfy a second set statistical condition;

[0037] A quality check is performed on each of the search conditions to be checked to determine a target search condition that meets the quality requirements.

[0038] In one implementation, the first statistical feature of each of the search conditions includes at least one of the following: the number of intent words obtained by performing intent identification on each of the search conditions, and the search frequency ranking of each of the search conditions in at least one time period;

[0039] The first set statistical condition includes at least one of the following: the number of intended words is greater than a preset number, and the search frequency ranking of each search condition in at least one time period is not lower than a set ranking; wherein different time periods indicate different set rankings.

[0040] In one implementation, the second statistical feature of each of the candidate search conditions includes at least one of the following: the frequency of occurrence of each of the candidate search conditions in the several search items, the left information entropy, the right information entropy, and the intimacy; wherein the left information entropy is used to describe the collocation of the left side of each of the candidate search conditions with other words, the right information entropy is used to describe the collocation of the right side of each of the candidate search conditions with other words, and the intimacy is used to describe the probability of each word in the candidate search condition appearing together in the several search items;

[0041] The second set statistical condition includes at least one of the following: the occurrence frequency is greater than the set number of times, the left information entropy is greater than the set left entropy threshold, the right information entropy is greater than the set right entropy threshold, and the intimacy is greater than the set intimacy threshold.

[0042] In one implementation, the performing of a quality check on each of the search conditions to be checked to determine a target search condition that meets the quality requirement includes:

[0043] Embed each of the search conditions to be checked into a preset prompt template to generate a prompt text corresponding to each of the search conditions to be checked;

[0044] Inputting the prompt text into a first pre-trained language model, so that the first pre-trained language model determines whether the search condition to be checked meets the quality requirement indicated by the prompt text based on the prompt text, and outputs a first quality detection result corresponding to the search condition to be checked;

[0045] If the first quality detection result corresponding to the search condition to be checked indicates that the search condition to be checked meets the quality requirement, the search condition to be checked is determined as the target search condition.

[0046] In one implementation, the method further includes:

[0047] If the first quality detection result corresponding to the search condition to be checked indicates that the search condition to be checked does not meet the quality requirement, input the prompt text into a second pre-trained language model, so that the second pre-trained language model determines whether the search condition to be checked meets the quality requirement indicated by the prompt text based on the prompt text, and outputs a second quality detection result corresponding to the search condition to be checked; wherein the first pre-trained language model and the second pre-trained language model are different;

[0048] If the second quality detection result corresponding to the search condition to be checked indicates that the search condition to be checked meets the quality requirement, the search condition to be checked is determined as the target search condition; otherwise, the search condition to be checked is discarded.

[0049] In one implementation, the quality requirement indicated by the prompt text includes: the search condition to be checked that belongs to any one of a single noun, a combination of multiple nouns but not a sentence, a proper noun, and a verb phrase meets the quality requirement.

[0050] In one implementation, before adding the index tag corresponding to the newly added level as a newly added node to the target index structure, the method further includes:

[0051] Detecting whether there is a node in the target index structure that indicates an index tag corresponding to the newly added level;

[0052] If yes, discard the index tag corresponding to the newly added level;

[0053] If not, the step of adding the index tag corresponding to the newly added level as a newly added node to the target index structure is executed.

[0054] In one implementation, the target index structure is represented by a directed acyclic graph, and an edge between any two nodes having a connection relationship in the target index structure points from a lower node of the two nodes to a higher node of the two nodes.

[0055] In one implementation, the method further includes:

[0056] The edges that cause a cycle in the target index structure are deleted.

[0057] In one implementation, the several search items provided by the search platform include notes posted on the search platform by user accounts in the search platform;

[0058] The note includes at least one of text, image, video or audio.

[0059] According to a second aspect of an embodiment of the present application, a method for determining an index tag is provided, including:

[0060] In response to detecting a target search term published to a search platform, determining a plurality of candidate search terms similar to the target search term from a plurality of search terms provided by the search platform; wherein each of the plurality of search terms corresponds to an index tag;

[0061] Determine, from a pre-constructed target index structure, a target node for indicating an index tag corresponding to the candidate search term; wherein the target index structure is constructed based on the index structure construction method described in any one of the first aspects;

[0062] Based on the index tags corresponding to the multiple candidate search terms respectively and the index tags in other nodes having a connection relationship with the target node, the index tag corresponding to the target search term is determined.

[0063] In one implementation, determining the index tag corresponding to the target search term based on the index tags corresponding to the multiple candidate search terms and the index tags in other nodes having a connection relationship with the target node includes:

[0064] Using the index tags corresponding to the multiple candidate search items and the index tags in other nodes connected to the target node as candidate index tags for the target search item;

[0065] Based on the relevance between the target search term and each of the candidate index tags, an index tag corresponding to the target search term is determined.

[0066] In one implementation, the target index structure is determined based on at least two historical index structures applied to the search platform;

[0067] Each historical index structure corresponds to a pre-trained index tag recognition model, and the index tag recognition model corresponding to each historical index structure is used to determine the index tag of the search term in the historical index structure based on the input search term;

[0068] The method further comprises:

[0069] Inputting the target search term into the index label recognition model corresponding to each historical index structure to obtain the index label of the target search term in each historical index structure output by each index label recognition model;

[0070] The index tags of the target search term in each historical index structure are used as candidate index tags of the target search term.

[0071] In one implementation, determining the index tag corresponding to the target search term based on the relevance between the target search term and each of the candidate index tags includes:

[0072] Based on the relevance between the target search term and each of the candidate index tags, filter out candidate index tags with relevance higher than a preset threshold from the candidate index tags of the target search term;

[0073] Based on the target index structure, determining whether there are at least two candidate index tags in a superior-subordinate relationship among the candidate index tags whose relevance is higher than a preset threshold;

[0074] If so, the candidate index tag belonging to the superior among the at least two candidate index tags belonging to the superior-subordinate relationship is deleted, and the remaining candidate index tags are determined to be index tags corresponding to the target search item.

[0075] According to a third aspect of an embodiment of the present application, there is provided an electronic device, including:

[0076] processor;

[0077] a memory for storing processor-executable instructions;

[0078] When the processor executes the executable instructions, it is used to implement the method described in the first aspect or the second aspect.

[0079] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of any of the above methods are implemented.

[0080] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, comprising a computer program, which implements the steps of any of the above methods when executed by a processor.

[0081] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0082] The index structure construction method provided in the embodiment of the present application obtains at least two historical index structures applied to the same search platform, uses each index tag in the at least two historical index structures as a node in the target index structure to be constructed, and establishes edges between nodes belonging to different levels based on the preset hierarchical relationship of the target index structure to generate the target index structure. By integrating the index tags of different historical index structures into a unified target index structure and establishing clear hierarchical and node relationships, redundant indexes can be reduced, multiple repeated retrievals can be avoided, and search efficiency can be greatly improved.

[0083] The index tag determination method provided in the embodiment of the present application detects the published target search terms and finds similar candidate search terms, determines the relevant nodes from the existing target index structure, and determines the most suitable index tag corresponding to the target search term based on the index tags corresponding to the candidate search terms and the index tags in the relevant nodes. The method can ensure the accuracy and consistency of the index tags, improve the classification and retrieval efficiency of the search terms, enable users to find relevant information more quickly, and avoid the tedious process of manual tag assignment. It has a high degree of automation and helps to improve the overall intelligence level and user satisfaction of the search platform.

[0084] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] Figure 1 It is a schematic diagram of the architecture of a search platform provided by an exemplary embodiment.

[0086] Figure 2 It is a flowchart of a method for constructing an index structure provided by an exemplary embodiment.

[0087] Figure 3 It is a schematic diagram of a hierarchical relationship of a target index structure provided by an exemplary embodiment.

[0088] Figure 4 It is a schematic diagram of a mapping relationship between index tags at different levels provided by an exemplary embodiment.

[0089] Figure 5 It is a schematic diagram of a target index structure provided by an exemplary embodiment.

[0090] Figure 6 It is a schematic diagram of the hierarchical relationship of another target index structure provided by an exemplary embodiment.

[0091] Figure 7 It is an interactive sequence diagram of search recommendation provided by an exemplary embodiment.

[0092] Figure 8 It is a flowchart of a method for determining an index tag provided by an exemplary embodiment.

[0093] Fig. 9 It is a schematic structural diagram of an electronic device provided by an exemplary embodiment. DETAILED DESCRIPTION

[0094] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of the present application. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of the present application as detailed in the appended claims.

[0095] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this application. In some other embodiments, the steps included in the method may be more or less than those described in this application. In addition, a single step described in this application may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this application may also be combined into a single step for description in other embodiments.

[0096] In search scenarios, index structure is usually one of the important tools to improve search efficiency. The index structure can greatly speed up the query through the ordered mapping between index tags and search terms, thereby improving the user's search experience.

[0097] However, in order to meet the needs of different search scenarios, related technologies usually define multiple independent index structures in the same search platform. The use of different index structures separately is not conducive to improving search efficiency. Moreover, the use of multiple independent index structures not only wastes resources, but may also lead to the storage and maintenance of redundant data.

[0098] Based on this, an embodiment of the present application provides a method for constructing an index structure, which can integrate at least two historical index structures applied to the same search platform to obtain a target index structure, thereby realizing multi-dimensional retrieval of the search platform and improving the comprehensiveness and accuracy of the retrieval results; and can reduce redundant data and optimize index storage and retrieval efficiency.

[0099] In some embodiments, see Figure 1 , a search platform is provided, which includes a server 100 and several terminals 200.

[0100] The server 100 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. During operation, the server 100 may run a program on the server side of an application to implement the relevant functions of the application. For example, when the server 100 runs a program for a search service, it may be implemented as a corresponding search server.

[0101] The terminal 200 includes but is not limited to a smart phone, a personal digital assistant, a tablet computer, a personal computer, a laptop computer, a wearable device, a virtual reality terminal device, an augmented reality terminal device, etc. During operation, the terminal 200 can run a program on the client side of a certain application to implement the relevant functions of the application. For example, when the terminal 200 runs a program for a search service, it can be implemented as a client of the search service. The application program of the client of the above-mentioned search service can be started and run on the electronic device. The program on the client side can be an application, a web page, a small program, a plug-in, a component or other similar forms installed on the electronic device.

[0102] The server 100 and the terminal 200 can interact with each other through a network, and specifically choose to use a wired or wireless network to achieve communication, which is not limited in this specification.

[0103] In some embodiments, see Figure 2 The present application embodiment provides a method for constructing an index structure, which can be executed by an electronic device, which can be Figure 1 The server 100 in the embodiment may also be another computing device in communication with the server 100, so that after the target index structure is generated, the target index structure is deployed to the server 100. The index structure construction method includes:

[0104] In S201, at least two historical index structures applied to the same search platform are obtained, each historical index structure includes at least one level, and each level includes multiple index tags; wherein different historical index structures are used to indicate retrieval of several search items provided by the search platform from different retrieval dimensions.

[0105] Exemplarily, different historical index structures may be established based on different dimensions such as time, location, user interest, content category, etc. For example, one historical index structure may hierarchically index all search terms based on time, while another index structure may hierarchically index all search terms based on the user's geographic location.

[0106] Each historical index structure contains at least one level, and each level can be regarded as a subdivision of a specific dimension. For example, in the time dimension, the levels can be divided by year, month, and date; in the geographical dimension, the levels can be divided by country, province, city, etc. The index tags contained in each level represent specific index points, such as a year, a city, etc., which are used to identify the attributes or categories of specific search items. There is an index mapping relationship between the index tags and several search items provided by the search platform. In other words, by querying the index tags, the target search items that meet the user's needs can be retrieved.

[0107] In S202, each index tag in at least two historical index structures is used as a node in the target index structure to be constructed, and edges between nodes belonging to different levels are established based on the preset hierarchical relationship of the target index structure to generate the target index structure; wherein the preset hierarchical relationship is used to describe the hierarchical relationship between each level in at least two historical index structures.

[0108] Exemplarily, the index tags in each historical index structure will serve as nodes in the target index structure, which means that index tags under different dimensions will coexist in the target index structure in the form of nodes. The hierarchical relationship in the target index structure is predefined and is used to describe the hierarchical relationship between hierarchies of different dimensions; the hierarchical relationship between the hierarchies determines how to filter and locate search items layer by layer during retrieval. Connections (edges) are established between nodes at different levels, which allows information of different dimensions to be associated in the target index structure; for example, from the geographic location dimension, there can be a country level and a city level, and different levels can be used during search to quickly find search items for locations of a specific granularity.

[0109] In this embodiment, by integrating the index tags of different historical index structures into a unified target index structure and establishing clear hierarchical and node relationships, redundant indexes can be reduced, multiple repeated retrievals can be avoided, and search efficiency can be greatly improved; and through the preset hierarchical relationship of the target retrieval structure, multi-dimensional retrieval of the search platform can be achieved, and effective filtering and association can be performed between multiple dimensions, thereby improving the comprehensiveness and accuracy of the retrieval results.

[0110] For example, assume that there are three historical index structures applied to the same search platform, namely, the category index structure, the subject index structure and the tag index structure.

[0111] The category index structure includes three levels, namely the first-level category, the second-level category and the third-level category. Each level category includes multiple index tags. Taking the commodity classification in the e-commerce platform as an example, the first-level category includes the following index tags: electronic products, household goods, books, clothing, and food. The second-level category includes the following index tags: (1) Second-level categories under electronic products: mobile phones, computers, cameras, and household appliances; (2) Second-level categories under household goods: furniture, decorations, home textiles, and kitchen supplies; (3) Second-level categories under books: novels, education, technology, and history. The third-level category includes the following index tags: (1) Third-level categories under mobile phones: smart phones, feature phones, and accessories; (2) Third-level categories under furniture: sofas, beds, and chairs; (3) Third-level categories under novels: science fiction novels, mystery novels, and romance novels.

[0112] The subject index structure includes 1 level, which includes multiple index tags. For example, the index tags in the subject index structure include but are not limited to workplace soft skills, Internet, campus recruitment / social recruitment, artificial intelligence, health and fitness, travel, etc.

[0113] The Tag index structure includes 1 level, which includes multiple index tags. For example, the index tags in the Tag index structure include but are not limited to Harry Potter Wizarding World, Yangcheng Lake Hairy Crabs, Tangshan Food, Midnight Diner, Java Programming, Python Machine Learning, Marathon Training Plan, Paris Tourist Attractions, etc.

[0114] See also Figure 3 The preset hierarchical relationship of the target index structure describes the hierarchical relationship between the categories, the subject and the Tag index structures. Figure 3 The edges in point from the next level to the previous level, specifically: (1) third-level category → second-level category → first-level category; (2) Tag → topic; (3) topic → first-level category. In the target index structure, the first-level category has the highest level.

[0115] In a possible implementation, hierarchical mapping information may be predetermined based on a preset hierarchical relationship of the target index structure, and the hierarchical mapping information includes at least one of an upper index tag and a lower index tag corresponding to each index tag in at least two historical index structures. Figure 4 , Figure 4 The left side of the table shows the index labels of the third-level categories in the category index structure. Figure 4 The right side of the table shows the index tags of the secondary categories in the category index structure. Figure 4 The upper-level index tags corresponding to the index tags included in the third-level categories are shown.

[0116] In the process of establishing edges between nodes belonging to different levels based on the preset hierarchical relationship of the target index structure, the electronic device can obtain hierarchical mapping information predetermined based on the preset hierarchical relationship of the target index structure, and then can establish edges between nodes belonging to different levels based on the hierarchical mapping information. In this embodiment, by using the predetermined hierarchical mapping information, the electronic device can automatically and accurately establish connections between nodes at different levels, reducing errors and workload of manual settings, and the hierarchical mapping information makes the target index structure clearer and the retrieval path clear, thereby improving the efficiency of the search.

[0117] For example, on an e-commerce platform, users may search through multiple dimensions (such as categories, topics, and tags). By establishing a target index structure and using hierarchical mapping information to clarify the relationship between different levels, the search platform can provide users with more accurate search results in multiple dimensions. For example, when a user searches for "smartphones", the search platform can quickly locate products, articles, or user comments related to "smartphones" based on the comprehensive information of categories, topics, and tags.

[0118] In some embodiments, the target index structure is represented by a directed acyclic graph. A directed acyclic graph (DAG) means that if a directed graph cannot return to a vertex through a number of edges, then the graph is a directed acyclic graph. Because there may be two routes from one point to another in a directed acyclic graph, a directed acyclic graph may not be converted into a tree, but any directed tree is a directed acyclic graph. The edge between any two nodes with a connection relationship in the target index structure is from the lower node of the two nodes to the upper node of the two nodes. For example, please refer to Figure 5 , shows an example graph of a target index structure represented by a directed acyclic graph.

[0119] In some embodiments, in modern search platforms, users' search behaviors and interests will continue to change over time and with changes in network hotspots, and the number and content of search items provided by the search platform will also be updated over time. Relying solely on the historical index structure may not fully meet the user's search needs. Therefore, the target index structure needs to have the ability to dynamically adjust and expand in order to adapt to new search trends and hot topics.

[0120] In order to adapt to changes in network hotspots and the distribution of search items within the search platform, the target index structure also includes at least one additional level in addition to the levels in at least two historical index structures. The electronic device can perform data mining on several search conditions received by the search platform to achieve automatic iteration and expansion of the target index system.

[0121] The electronic device can perform data mining on several search conditions received by the search platform to obtain multiple target search conditions, which represent the user's new needs and interests; then the electronic device generates an index tag corresponding to the newly added level based on the multiple target search conditions, and then adds the index tag corresponding to the newly added level as a new node to the target index structure; wherein the preset hierarchical relationship of the target index structure is also used to describe the superior-subordinate relationship between different newly added levels, and the superior-subordinate relationship between at least one newly added level and the levels in at least two historical index structures, then the electronic device can establish edges between the newly added node and other nodes in the target index structure based on the preset hierarchical relationship of the target index structure. In this embodiment, the index structure can be dynamically adjusted according to the common user search behavior in the search platform to ensure that the most relevant search results are always provided. Through automated hierarchical updates and node connections, the target index structure can continuously optimize and expand itself to adapt to changing user needs and search environments.

[0122] The following is an exemplary description of the mining process of the target search condition:

[0123] First, the electronic device can screen out multiple candidate search conditions whose first statistical search features meet the first set statistical conditions from the multiple search conditions based on the first statistical features of each search condition in the multiple search conditions. Exemplarily, the first statistical features of each search condition include at least one of the following: the number of intent words obtained by performing intent recognition on each search condition, and the search frequency ranking of each search condition in at least one time period. The first set statistical condition includes at least one of the following: the number of intent words is greater than the preset number, and the search frequency ranking of each search condition in at least one time period is not lower than the set ranking; wherein the set ranking indicated by different time periods is different. Among them, the preset number and the set ranking can be specifically set according to the actual application scenario, and this implementation does not impose any restrictions on this. In this embodiment, based on the screening mechanism of the first statistical feature (screening search conditions with high number of intent words and high search frequency), the electronic device can dynamically and accurately dig out multiple candidate search conditions with potential.

[0124] The number of intent words refers to the number of core words obtained after intent recognition for each search condition. Intent words refer to keywords that can clearly reflect the user's search purpose or needs. The search frequency ranking is the ranking of the number of searches for a certain search condition in a specific time period. The higher the ranking, the more attention the search condition has received from users in that time period. Different time periods can be one day, one week, ten days, half a month, or one month, and this implementation does not impose any restrictions on this.

[0125] For example, on a travel search platform, users can search for travel-related destinations, activities, accommodation, and other information. In order to better meet the search needs of users, the platform conducts data mining on the search conditions of a large number of users in order to screen out new and potential candidate search conditions. These multiple candidate search conditions can be used to expand the index structure of the platform to make it more in line with user needs.

[0126] The electronic device first extracts the first statistical feature of the large number of search conditions received by the travel search platform. Take five search conditions as an example: (1) search condition A "travel to Kyoto, Japan during cherry blossom season", (2) search condition B "recommendation of theme parks for family travel", (3) search condition C "water villas in the Maldives", (4) search condition D "self-driving tour in the western United States" and (5) search condition E "winter ski resort".

[0127] For each search condition, the electronic device extracts the following first statistical features:

[0128] The number of intent words: (1) The number of intent words of A is 4 ("Japan", "Kyoto", "Sakura season", "travel"); (2) The number of intent words of B is 3 ("family travel", "theme park", "recommendation"); (3) The number of intent words of C is 3 ("Maldives", "water villa", "travel"); (4) The number of intent words of D is 3 ("United States", "West", "self-driving tour"); (5) The number of intent words of E is 2 ("winter", "skiing", "resort").

[0129] Search frequency ranking (for example, search frequency ranking in the past week): (1) A ranked 2; (2) B ranked 5; (3) C ranked 8; (4) D ranked 15; (4) E ranked 202.

[0130] The first statistical condition includes: (1) The number of intent words is greater than or equal to 4: This condition is used to filter out search conditions with clear intent and covering multiple topics. (2) The search frequency ranking is not less than 10: This condition is used to filter out search conditions that are popular recently. Based on these conditions, candidate search conditions that meet the conditions are filtered out. The candidate search condition that meets the conditions is search condition A ("travel to Kyoto, Japan during the cherry blossom season"), and the other search conditions are not met.

[0131] Next, the electronic device can screen out multiple search conditions to be checked whose second statistical characteristics meet the second set statistical condition from multiple candidate search conditions based on the second statistical characteristics of each candidate search condition in a number of search items. This step further screens the candidate search conditions to ensure that the search conditions finally included in the index structure have high quality and relevance. By analyzing the second statistical characteristics of the candidate search conditions, it is possible to accurately determine which search conditions are most valuable in actual search scenarios.

[0132] Exemplarily, the second statistical feature of each candidate search condition includes at least one of the following: the occurrence frequency of each candidate search condition in a number of search items, the left information entropy, the right information entropy, and the intimacy.

[0133] Occurrence frequency refers to the total number of times a search term appears in all search items. A higher frequency reflects the general needs of users and therefore has a higher priority.

[0134] Left information entropy and right information entropy are used to describe the collocation of candidate search conditions with other words in the context. Left information entropy is used to describe the collocation of the left side of each candidate search condition with other words. For example, the word "summer" can be collocated with words such as "hot" and "sunny". High left information entropy means that the distribution of words on the left is relatively uniform and diverse, and the information uncertainty is high, which means that the candidate search condition may appear in multiple contexts. Low left information entropy means that the distribution of words on the left is relatively concentrated, and the information uncertainty is low, which means that the candidate search condition may appear in a relatively fixed context. Right information entropy is used to describe the collocation of the right side of each candidate search condition with other words, reflecting the distribution of words that appear on the right side of the candidate word and the complexity of the probability distribution of these words. For example, the word "summer" can be collocated with words such as "tourist resort" and "summer resort". High right information entropy means that the distribution of words on the right side is relatively uniform and diverse, and the information uncertainty is high, which means that the candidate search condition may appear in multiple contexts. Low right information entropy means that the distribution of words on the right side is relatively concentrated, and the information uncertainty is low, which means that the candidate search condition may appear in a relatively fixed context.

[0135] Intimacy is used to describe the probability of each word in the candidate search criteria to co-occur in several search items. For example, the degree of co-occurrence between each word in the candidate search criteria can be quantified by calculating the pointwise mutual information between each word in the candidate search criteria. Pointwise Mutual Information (PMI) is an important metric used to measure the association or correlation between two specific events. PMI>0 means that the probability of the two words appearing independently is higher, that is, the frequency of the two words appearing in the context is higher than random, indicating that there is a strong association between them. PMI<0 means that the probability of the two words appearing together is lower than the probability of their independent appearance, indicating that the association between them is weak. PMI=0 means that the probability of the two words appearing together is equal to the product of the probability of their respective independent appearances, that is, there is no special association.

[0136] The second set statistical condition includes at least one of the following: the frequency of occurrence is greater than the set number of times, the left information entropy is greater than the set left entropy threshold, the right information entropy is greater than the set right entropy threshold, and the intimacy is greater than the set intimacy threshold. A larger frequency of occurrence means that there are enough search items to provide to users. Search conditions with higher left information entropy and right information entropy usually cover a wide range and can be used with a variety of contexts, increasing the diversity of search results. Search conditions with high intimacy are more holistic and usually represent a specific and common user need. Through the screening method based on the second statistical feature, the screened search conditions to be checked can be closely related to the search items provided by the search platform. Among them, the setting of the number of times, the setting of the left entropy threshold, the setting of the right entropy threshold, and the setting of the intimacy threshold can be specifically set according to the actual application scenario, and this implementation does not impose any restrictions on this.

[0137] For example, the multiple candidate search conditions are: candidate search condition A "travel to Kyoto, Japan during cherry blossom season", candidate search condition B "recommendation of theme parks for family travel", and candidate search condition C "water villas in the Maldives".

[0138] The second statistical features of candidate search condition A "travel to Kyoto, Japan during cherry blossom season" include: occurrence frequency of 5,500 times, left information entropy of 1.9, right information entropy of 2.2, and intimacy of 0.87.

[0139] The second statistical features of the candidate search condition B “family travel theme park recommendation” include: occurrence frequency 4200 times, left information entropy 1.6, right information entropy 2.0, and intimacy 0.78.

[0140] The second statistical features of the candidate search condition C "Maldives water villa" include: occurrence frequency 2900 times, left information entropy 1.3, right information entropy 1.7 and intimacy 0.65.

[0141] The second set statistical conditions include: occurrence frequency>3000 times, left information entropy>1.4, right information entropy>1.8 and intimacy>0.7. The search conditions to be checked that meet the second set statistical conditions are: candidate search condition A and candidate search condition B, and candidate search condition A and candidate search condition B are used as the search conditions to be checked in the subsequent processing flow.

[0142] Finally, the electronic device performs a quality check on each search condition to be checked to determine a target search condition that meets the quality requirements. Exemplarily, the electronic device can embed each search condition to be checked into a preset prompt template to generate a prompt text corresponding to each search condition to be checked; input the prompt text into the first pre-trained language model, so that the first pre-trained language model determines whether the search condition to be checked meets the quality requirements indicated by the prompt text based on the prompt text, and outputs the first quality detection result corresponding to the search condition to be checked; if the first quality detection result corresponding to the search condition to be checked indicates that the search condition to be checked meets the quality requirements, the search condition to be checked is determined as the target search condition. Among them, the first pre-trained language model can be a deep learning model trained based on a large amount of general text, which is good at judging the rationality and naturalness of language. If it does not meet the requirements, it will not be discarded directly, but will enter the next step of verification.

[0143] Furthermore, if the first quality detection result corresponding to the search condition to be checked indicates that the search condition to be checked does not meet the quality requirements, the electronic device can input the prompt text into the second pre-trained language model, so that the second pre-trained language model can judge whether the search condition to be checked meets the quality requirements indicated by the prompt text based on the prompt text, and output the second quality detection result corresponding to the search condition to be checked; wherein the first pre-trained language model and the second pre-trained language model are different large language models, such as having different architectures or training data, so they can be judged from different angles. If the second quality detection result corresponding to the search condition to be checked indicates that the search condition to be checked meets the quality requirements, the search condition to be checked is determined as the target search condition; otherwise, the search condition to be checked is discarded.

[0144] In this embodiment, a pre-trained language model is used to perform quality checks on the search conditions to be checked, replacing manual annotations, saving a lot of cost and time. And through multi-model verification, when the first pre-trained language model may make a misjudgment, the second pre-trained language model provides an additional evaluation mechanism, further improving the accuracy of the judgment, which is suitable for complex or ambiguous search conditions and reduces the risk of mistakenly incorporating low-quality conditions into the index.

[0145] Exemplarily, the quality requirement indicated by the prompt text includes: the search condition to be checked that is a single noun, a combination of multiple nouns but not a sentence, a proper noun, and a verb phrase satisfies the quality requirement.

[0146] This application does not impose any restrictions on the specific style of the prompt template, which can be set specifically according to the actual application scenario. For example, the prompt template can be as follows:

[0147] Determine whether the search condition "*****" to be checked meets the following conditions. If any one of them is met, the search condition to be checked is considered to meet the quality requirements:

[0148] a) It is a single noun, which has a clear meaning in human common sense and is a general term for a class of concepts or things. For example: ocean, surgery, handicrafts.

[0149] b) It is a proper noun, which is used to refer to a specific object, concept or action with a clear meaning, such as the name of a star, the name of a movie, or a place name. For example: The Matrix, Shanghai.

[0150] c) It is a combination of multiple nouns, but it is not a sentence (interrogative sentence, exclamatory sentence, etc.). It refers to a specific concept or object with a clear meaning; and in order to express this meaning, any component in this combination is an important and indispensable attribute, and there are no redundant modifiers. For example: new energy vehicles, materialistic philosophy.

[0151] d) It is a verb phrase, but it is not a sentence (interrogative sentence, exclamatory sentence, etc.). It refers to a specific activity or action with a clear meaning, and there is no proper noun or noun combination to express the meaning; and in order to express the meaning, any component of the combination is important and indispensable, and there are no redundant modifiers. For example: goat jumping, shopping.

[0152] The following is an exemplary description of the generation process of index tags corresponding to each newly added level:

[0153] Exemplarily, the target index structure includes at least one of a first newly added level, a second newly added level, and a third newly added level. Each newly added level provides information refinement of different dimensions, for example, the first newly added level focuses on phrase extraction, the second newly added level focuses on entity recognition, and the third newly added level classifies entities.

[0154] After obtaining multiple target search conditions, the electronic device can perform word segmentation and function word filtering on each target search condition respectively to obtain at least one phrase, and then use the phrase as an index label corresponding to the first new level. The word segmentation process can split the target search condition into multiple independent words or phrases. Function word filtering means removing words such as "of", "already", "in" that have no substantial meaning. For example, assume the target search condition is "the best time to buy an air conditioner". After word segmentation and function word filtering, the possible phrases are "air conditioner" and "the best time to buy", and these phrases will become the index labels in the first new level.

[0155] The electronic device can also perform entity recognition on each phrase to obtain the entity corresponding to the phrase; and use the entity corresponding to the phrase as an index label corresponding to the second new level. Entity recognition refers to recognizing a phrase as a named entity of a specific type. Continuing with the above example, in the target search condition "the best time to buy an air conditioner", "air conditioner" is recognized as an entity.

[0156] The electronic device can also classify the entities corresponding to each phrase to obtain the entity category corresponding to the phrase, and use the entity category corresponding to the phrase as an index label corresponding to the third new level. The classification process classifies entities into specific categories, such as electronic products, locations, events, etc. In the above example, the recognized entity "air conditioner" (belonging to the second new level) can be classified as "electronic products", and "electronic products" will become the index label in the third new level.

[0157] In this embodiment, by introducing new levels, the target index structure can be divided and organized more meticulously. It not only retains the core phrases of the user's query but also identifies and classifies specific entities and their categories at a deeper level. Such multi-level index labels help the search engine match the user's query more accurately and improve the retrieval efficiency. Since the new levels are automatically generated based on data mining and entity recognition, the target index structure can adapt to the changing hotspots and user behaviors on the search platform. Over time, the index structure can be automatically iterated and expanded, always maintaining the ability to efficiently organize and retrieve the latest information.

[0158] The following gives an exemplary description of the process of adding new nodes to the target index structure:

[0159] Exemplarily, the hierarchical relationship between different newly added levels described by the preset hierarchical relationship of the target index structure and the hierarchical relationship between at least one newly added level and the levels in at least two historical index structures may be: the upper level of the first newly added level includes the second newly added level and at least one of the designated levels in the at least two historical index structures, and the upper level of the second newly added level includes the third newly added level. In this embodiment, setting the hierarchical relationship between the newly added level and the historical level ensures the seamless integration of the newly added node with the existing structure of the target index structure, and ensures the smooth transition of the new and old data. Through the reasonable connection between the upper and lower nodes, the search engine can better understand and match the user's query and provide more relevant search results.

[0160] Continue to use Figure 3 The example described is based on the target index result integrating the category index structure, subject index structure and tag index structure. Please refer to Figure 6 The previous level of the first newly added level includes the second newly added level, the third level in the category index structure, the level in the tag index structure, and the level in the subject index structure; the previous level of the second newly added level includes the third newly added level; the third newly added level is also the highest level in the target index structure.

[0161] After obtaining the index tag corresponding to the third newly added level, the electronic device can add the index tag corresponding to the third newly added level as a third type of newly added node to the target index structure. The third type of newly added node has no upper level node.

[0162] After obtaining the index tag corresponding to the second newly added level, the electronic device can add the index tag corresponding to the second newly added level as a second-type newly added node to the target index structure, and determine the parent node of the second-type newly added node according to the preset hierarchical relationship to establish an edge between the second-type newly added node and its parent node; the parent node of the second-type newly added node is also the third-type newly added node where the entity category corresponding to the index tag in the second-type newly added node is located.

[0163] After obtaining the index tag corresponding to the first newly added level, the electronic device can add the index tag corresponding to the first newly added level as a first-type newly added node to the target index structure, and determine the parent node of the first-type newly added node according to the preset hierarchical relationship to establish an edge between the first-type newly added node and its parent node.

[0164] In this embodiment, the index structure can adapt to the changes in hot spots and user behavior in the search platform through automated data mining and dynamic generation of hierarchical nodes. The automatic generation of new levels and the integration with historical levels enable the target index structure to be continuously updated, adapt to new search needs and changes in content distribution, and always maintain efficient organization and retrieval capabilities for the latest information. This dynamic adaptability enables the target index structure to more flexibly respond to the explosive growth of information and the diversification of search needs. Through the definition of preset hierarchical relationships and the reasonable addition of hierarchical nodes, the target index structure can be more refined and hierarchically managed. This multi-level, multi-dimensional index tag can accurately describe and organize the content in the search platform, thereby improving the efficiency and accuracy of retrieval. In addition, the above-mentioned update method allows the flexible addition of new nodes and levels based on the existing index structure without the need for large-scale adjustment or reconstruction of the existing structure. This scalability can maintain the long-term availability and effectiveness of the index structure.

[0165] The parent node of the first type of newly added node can be determined by the following two implementation methods:

[0166] In a first implementation manner, after determining the target entity corresponding to the first type of newly added node, the electronic device may use the second type of newly added node where the target entity is located as the parent node of the first type of newly added node according to a preset hierarchical relationship.

[0167] In the second implementation, the electronic device can determine the candidate nodes in the target index structure that belong to the specified level in at least two historical index structures according to the preset hierarchical relationship; then traverse the index tags in all candidate nodes to detect whether the index tags in the first category of newly added nodes contain the index tags in the candidate nodes, or contain words with the same semantics as the index tags in the candidate nodes; if there is an index tag in the first category of newly added nodes that contains the index tag in a candidate node, or contains words with the same semantics as the index tag in a candidate node, then the candidate node is determined as the parent node of the first category of newly added nodes. In other words, if there are multiple parent nodes of a first category of newly added nodes, the index tags in these multiple parent nodes are synonyms or have the same semantics. This embodiment can automatically identify and establish the association between the new level nodes and the historical index structure nodes by traversing the candidate nodes in the historical index structure and detecting their semantic association with the newly added nodes, which can effectively avoid errors that may be caused by human operations, ensure that the relationship between the newly added nodes and the historical nodes has high accuracy and rationality, thereby improving the relevance of the entire index structure.

[0168] For example, assuming that there are two first-category newly added nodes "English novels" and "English adventures", the electronic device first determines the search scope, that is, the candidate nodes in the target index structure that belong to the specified level in at least two historical index structures, and then traverses the index tags in all candidate nodes. For example, there are the following five candidate nodes: "English", "Mandarin", "French", "German", "Japanese", etc. The electronic device detects the index tags of these candidate nodes, whether the two first-category newly added nodes "English novels" and "English adventures" contain the index tags in the candidate nodes, or contain words with the same semantics as the index tags in the candidate nodes. For example: If the index tag of a candidate node is "English", the first first-category newly added node "English novels" contains "English", and the second first-category newly added node "English adventure" contains words with the same semantics as "English", then the parent node of the two first-category newly added nodes can be determined as "English".

[0169] Exemplarily, in order to avoid node redundancy, before adding the index tag corresponding to the newly added level as a new node to the target index structure, the electronic device can detect whether there is a node in the target index structure that indicates the index tag corresponding to the newly added level; for example, the electronic device can scan all existing nodes in the target index structure, and compare whether the index tag corresponding to the newly added level is consistent with the index tags in the existing nodes; if so, it means that the index tag corresponding to the newly added level already exists, and the index tag corresponding to the newly added level can be discarded; if not, the step of adding the index tag corresponding to the newly added level as a new node to the target index structure is executed. Through the above-mentioned detection means, this embodiment can avoid the generation of redundant nodes, maintain the simplicity and efficiency of the target index structure, and ensure that the new index tag can be correctly reflected in the target index structure to avoid omissions and incompleteness.

[0170] In some embodiments, the target index structure includes a representation through a directed acyclic graph. In the process of generating the target index structure or updating the target index structure, the electronic device can detect whether there are edges in the target index structure that cause a loop. If so, the edges in the target index structure that cause a loop are deleted. An important feature of a directed acyclic graph (DAG) is that there are no loops, which ensures that starting from any node will not return to itself. By deleting the edges that cause a loop, the acyclicity of the graph is ensured, so that the logical consistency of the graph structure is guaranteed. In addition, the edges that form a loop may cause a circular path in the graph, which may cause an infinite loop during the traversal, query or update of the graph. Deleting these edges can avoid this situation.

[0171] For example, the target index structure of the search platform includes the nodes "electronic products" and "smartphones". The parent node of the node "smartphones" is the node "electronic products". After adding the new node "mobile devices" to the target index structure, a loop may be introduced, such as connecting "smartphones" under "electronic products" to "mobile devices" and then connecting "mobile devices" back to "electronic products". The electronic device detects this loop and deletes the edges that form the loop. The final directed acyclic graph can clearly represent the path from the root node to the nodes at each level, ensuring the efficiency of query and update operations.

[0172] In some embodiments, for non-top-level nodes in the target index structure, if there are non-top-level nodes that are not connected to the top-level nodes, a node may be set, such as the index label of the node is "others", and the parent nodes of these non-top-level nodes are set to this node, and edges to the "other" nodes are uniformly established. In this embodiment, by uniformly connecting all non-top-level nodes that are not connected to the top-level nodes to an "other" node, these nodes can be managed in one location, and the maintenance and updating of these nodes becomes more efficient and systematic, and the occurrence of isolated nodes or chaotic structures can be avoided, thereby making the entire graph structure easier to understand and operate.

[0173] In some embodiments, there is an index mapping relationship between the nodes (i.e., index tags) in the target index structure and several search items provided by the search platform. In other words, by querying the nodes in the target index structure, the target search items that meet the user's needs can be retrieved. After the target index structure is constructed, the target index structure can be deployed to the server 100 of the search platform so that the server 100 implements the search service based on the target index structure.

[0174] Exemplarily, the search platform provides several search items including notes posted on the search platform by user accounts in the search platform; the notes include at least one of text, image, video or audio. The nodes in the target index structure represent different index tags, which help users locate and retrieve related notes.

[0175] For example, a user posts a note about "Tangshan Food" on the platform. This note includes text descriptions and pictures. The index tags corresponding to this note are: "Food", "Tangshan", "Location", "Tangshan Food", etc. If the user wants to find notes related to "Tangshan Food", the electronic device can find all matching notes based on the "Tangshan Food" tag in the target index structure, and can retrieve all notes marked with "Tangshan Food", which include the user's experience description of Tangshan Food and related images.

[0176] In an exemplary search scenario, see Figure 7 , Figure 7 An interactive sequence diagram of search recommendation is shown.

[0177] In S701, in response to a user inputting a search condition in a search box, the terminal 200 generates a search request carrying the search condition.

[0178] Exemplarily, the search condition input by the user may be in the form of text, voice, image or other forms, and this implementation does not impose any limitation on this.

[0179] In S702 , the terminal 200 sends a search request carrying the search condition to the server 100 .

[0180] In S703, the server 100 receives a search request carrying the search condition, and then determines a target node related to the search condition from the target index structure, and obtains a target search item corresponding to the target node.

[0181] Exemplarily, the target node related to the search condition includes at least one of a first type of node and a second type of node.

[0182] The similarity between the index label in the first type of node and the search condition is higher than the preset threshold; the preset threshold can be specifically set according to the actual application scenario, and this embodiment does not impose any restrictions on this. The similarity between the index label of the first type of node and the search condition is high, which may directly correspond to the user's search intention. For example, when the user searches for "weight loss meal", the index label of the "weight loss recipe" node in the target index structure has a high similarity with the condition and becomes the first type of node.

[0183] The second type of node is a node in the target index structure that has a connection relationship with the first type of node, such as the second type of node is at least one of the upper node and the lower node of the first type of node. The second type of node is indirectly related to the search condition and still has search value. For example, the upper node "healthy diet" or the lower node "low-calorie meal" of "weight loss recipe" may become a second type of node. The upper and lower node relationship in the target index structure supports in-depth mining of search intent and helps the server 100 better understand the user's fuzzy search. For example, for a fuzzy search condition such as "weight loss meal", the server 100 can go deep into "low-calorie meal" to find more accurate content. Different lower-level nodes of the same node can be used to expand search results. For example, under the "healthy diet" node, "high-protein diet" content related to "weight loss meal" is recommended to increase the user's search options.

[0184] It can be seen that the upper and lower nodes in the target index structure support the downward exploration of search intent, improve fuzzy search (recall more precise targets for simple fuzzy search targets), can be used to achieve more precise search item recall, and different subordinate labels of the same node can support recommended search (expand the recall of search items similar to the search target).

[0185] The target search item corresponding to the target node obtained by server 100 may be a note posted by the user in the search platform. For example, based on the "weight loss recipe" node, server 100 may retrieve target notes such as "low-calorie dinner recipe" and "seven-day weight loss plan".

[0186] Example: Based on the "weight loss recipe" node, the server 100 may retrieve target search items such as "low-calorie dinner recipe" and "seven-day weight loss plan".

[0187] In S704 , the server 100 sends a search response including the target search term to the terminal 200 .

[0188] Exemplarily, before sending, the server 100 may sort the multiple target search terms to ensure that the user receives the most relevant and useful results.

[0189] In S705 , the terminal 200 displays the target search item.

[0190] Exemplarily, the terminal 200 displays the target search item to the user, which may include content in the form of text, images, videos, etc. The user can click to view detailed information or continue filtering and searching. Further, the user can operate on the displayed results, such as clicking, saving, sharing, or further searching. These interactive behaviors may trigger the server 100 to perform new searches or recommendations again.

[0191] Through the interactive process of search recommendation, the search conditions input by the user are accurately processed, and the server 100 provides search items that are highly relevant to the user's needs by analyzing the relevant nodes in the target index structure. This not only improves the accuracy of the search, but also expands the search scope through search intent exploration and recommended search, providing users with more choices, thereby improving the user's search experience and the stickiness of the platform.

[0192] In some embodiments, see Figure 8 The present application also provides an index tag determination method to determine the index tag of the newly released search term in the above target index structure. The method can be executed by an electronic device, which can be Figure 1 The server 100 in the embodiment may also be other computing devices in communication with the server 100. The index tag determination method includes:

[0193] In S801, in response to detecting a target search term published to a search platform, multiple candidate search terms similar to the target search term are determined from a number of search terms provided by the search platform; wherein each of the number of search terms corresponds to an index tag.

[0194] In this step, the electronic device detects that a new target search term has been published on the search platform. This search term can be text, image, video or audio content. From the existing search terms on the search platform, the electronic device will find multiple candidate search terms that are similar in content to the target search term, and these candidate search terms have been assigned index tags. By identifying similar candidate search terms, it can be ensured that the index tag of the target search term more accurately reflects its content.

[0195] In S802, a target node for indicating an index tag corresponding to a candidate search term is determined from a pre-constructed target index structure; wherein the target index structure is constructed based on the above-mentioned index structure construction method.

[0196] In this embodiment, the electronic device finds the target node corresponding to the index tag of the candidate search term from the pre-built target index structure. The target index structure is built based on the existing index tags and includes nodes at different levels. For example, if the index tag of the candidate search term is "programming tutorial", the electronic device will find the node describing "programming tutorial" in the target index structure.

[0197] In S803, based on the index tags corresponding to the plurality of candidate search terms and the index tags in other nodes having a connection relationship with the target node, an index tag corresponding to the target search term is determined.

[0198] In this step, the electronic device can analyze the index tags of the candidate search terms and the index tags in other nodes that have a connection relationship with the target node (the index tag representing the candidate search terms), so as to determine the most appropriate index tag corresponding to the target search term. By extracting index tags from the candidate search terms and other nodes related to the target node, it can be ensured that a wide range of tags related to the target search term are taken into account.

[0199] This embodiment detects the published target search terms and finds similar candidate search terms, determines relevant nodes from the existing target index structure, and determines the most suitable index tags corresponding to the target search terms based on the index tags corresponding to the candidate search terms and the index tags in the relevant nodes. This method can ensure the accuracy and consistency of the index tags, improve the classification and retrieval efficiency of the search terms, enable users to find relevant information more quickly, and avoid the tedious process of manual tag assignment. It has a high degree of automation and helps to improve the overall intelligence level and user satisfaction of the search platform.

[0200] In some embodiments, the electronic device may use index tags corresponding to multiple candidate search items and index tags in other nodes that have a connection relationship with the target node as candidate index tags for the target search item. In this embodiment, using index tags in other nodes that have a connection relationship with the target node (such as at least one of the upper node and the lower node of the target node) as candidate index tags for the target search item helps to expand the selection range of index tags and improve the accuracy of determining index tags.

[0201] Exemplarily, the target index structure is determined based on at least two historical index structures applied to the search platform; each historical index structure corresponds to a pre-trained index label recognition model, and the index label recognition model corresponding to each historical index structure is used to determine the index label of the search item in the historical index structure based on the input search item. The electronic device can input the target search item into the index label recognition model corresponding to each historical index structure to obtain the index label of the target search item in each historical index structure output by each index label recognition model; then the index label of the target search item in each historical index structure is also used as the candidate index label of the target search item, thereby expanding the selection range of the index label. This embodiment utilizes models of multiple historical index structures, and can obtain multiple index labels from different historical index structures, thereby increasing the source and selection range of index labels. By collecting labels from different models, the comprehensiveness of candidate labels can be ensured and the possibility of missing important labels can be reduced.

[0202] After determining the candidate index tags of the target search item, the electronic device can determine the index tag corresponding to the target search item based on the relevance between the target search item and each candidate index tag, for example, using a text similarity algorithm (such as cosine similarity) to measure the similarity between the target search item and the candidate tags. This embodiment can ensure that the target search item is accurately labeled by selecting tags with higher relevance, so that users can more easily find relevant information when searching. Accurate index tags enable the search platform to better match user queries, thereby improving search efficiency and user satisfaction.

[0203] Exemplarily, after obtaining all candidate index tags of the target search item, the electronic device can filter out candidate index tags with a correlation higher than a preset threshold from the candidate index tags of the target search item based on the correlation between the target search item and each candidate index tag. The preset threshold can be specifically set according to the actual application scenario, and this embodiment does not impose any restrictions on this. By filtering candidate index tags with high correlation, it can be ensured that the tag finally selected is highly correlated with the target search item, thereby improving the accuracy and matching degree of the tag.

[0204] Furthermore, the electronic device can determine whether there are at least two candidate index tags that are in a superior-subordinate relationship among the candidate index tags with a correlation higher than a preset threshold based on the target index structure; if so, delete the candidate index tag that is a superior among the at least two candidate index tags that are in a superior-subordinate relationship. By deleting the superior tag, label redundancy is avoided, the index structure is simplified, and the final index tag is made more targeted and accurate. Finally, the remaining candidate index tags are determined to be index tags corresponding to the target search item. Through the above steps, the electronic device can effectively screen and process index tags, ensure that the final determined tags are highly relevant to the target search item, and avoid redundant and unnecessary tags, which not only improves the accuracy and practicality of the index tags, but also optimizes the overall performance and user experience of the search platform.

[0205] For example, the target search item is the text information of "how to improve Python programming skills", and the candidate index tags include: "programming language", "Python", "programming skills", "Python programming", "programming skills", etc. The electronic device calculates the relevance of each candidate tag with the target search item. Assuming the preset threshold is 0.75, after calculation, the relevance of "Python" is 0.85, the relevance of "programming language" is 0.80, and the relevance of "programming skills" is 0.70. Tags with a relevance higher than 0.75 are "Python" and "programming language". Furthermore, the electronic device determines that "Python" and "programming language" are in a superior-subordinate relationship in the target index structure by querying the target index structure. Assuming that "programming language" is the superior tag of "Python", the electronic device deletes "programming language" and retains "Python" as the final index tag.

[0206] The various technical features in the above embodiments can be arbitrarily combined as long as there is no conflict or contradiction between the combinations of features. However, due to space limitations, they are not described one by one. Therefore, any combination of the various technical features in the above embodiments also falls within the scope of this specification.

[0207] In some embodiments, an embodiment of the present application further provides an electronic device, comprising: a processor; a memory for storing processor executable instructions; wherein the processor implements any of the above methods by running the executable instructions.

[0208] For example, Fig. 9 is a schematic structural diagram of an electronic device provided by an exemplary embodiment. Fig. 9At the hardware level, the device includes a processor 902, an internal bus 904, a network interface 906, a memory 908, and a non-volatile memory 910, and may also include hardware required for other scenarios. One or more embodiments of the present application can be implemented based on software, such as the processor 902 reading the corresponding computer program from the non-volatile memory 910 into the memory 908 and then running it. Of course, in addition to the software implementation, one or more embodiments of the present application do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0209] In some embodiments, the embodiments of the present application further provide a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, the steps of any of the methods described above are implemented.

[0210] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0211] In some embodiments, the embodiments of the present application further provide a computer program product, including a computer program, which implements the steps of any of the methods described above when executed by a processor.

[0212] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0213] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0214] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0215] The above description is merely a preferred embodiment of one or more embodiments of the present application and is not intended to limit one or more embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present application shall be included in the scope of protection of one or more embodiments of the present application.

Claims

1. A method for constructing an index structure, characterized in that: include: Acquire at least two historical index structures applied to the same search platform, each of the historical index structures comprising at least one level, each level comprising a plurality of index tags; wherein different historical index structures are used to indicate that a plurality of search items provided by the search platform are to be retrieved from different retrieval dimensions; Each index label in the at least two historical index structures is used as a node in the target index structure to be constructed, and edges between nodes belonging to different levels are established based on a preset hierarchical relationship of the target index structure to generate the target index structure; wherein the preset hierarchical relationship is used to describe the superior-subordinate relationship between each level in the at least two historical index structures.

2. The method according to claim 1, characterized in that The establishing of edges between nodes belonging to different levels based on the preset hierarchical relationship of the target index structure includes: Acquire hierarchical mapping information predetermined based on a preset hierarchical relationship of the target index structure, the hierarchical mapping information including upper index tags and / or lower index tags corresponding to each index tag in the at least two historical index structures; Based on the level mapping information, edges between nodes belonging to different levels are established.

3. The method according to claim 1, characterized in that The target index structure further includes at least one additional level other than the levels in the at least two historical index structures; The preset hierarchical relationship is also used to describe the superior-subordinate relationship between different newly added hierarchies, and the superior-subordinate relationship between at least one of the newly added hierarchies and the hierarchical relationships between the hierarchies in the at least two historical index structures; The method further comprises: Performing data mining on a number of search conditions received by the search platform to obtain a plurality of target search conditions; Based on the multiple target search conditions, generate an index tag corresponding to the newly added level; The index tag corresponding to the newly added level is added as a newly added node to the target index structure, and edges are established between the newly added node and other nodes in the target index structure based on the preset hierarchical relationship.

4. The method according to claim 3, characterized in that The generating, based on the multiple target search conditions, index tags corresponding to each of the newly added levels includes: Perform word segmentation and function word filtering on each of the target search conditions to obtain at least one phrase, and use the phrase as an index tag corresponding to the first newly added level; and / or, Performing entity recognition on the phrase to obtain an entity corresponding to the phrase, and using the entity corresponding to the phrase as an index label corresponding to the second newly added level; and / or, The entities corresponding to the phrases are classified to obtain entity categories corresponding to the phrases, and the entity categories corresponding to the phrases are used as index labels corresponding to the third newly added level.

5. The method according to claim 4, characterized in that The preset hierarchical relationship includes: the previous level of the first newly added level includes at least one of the second newly added level and the designated levels in the at least two historical index structures, and the previous level of the second newly added level includes the third newly added level; The step of adding the index tag corresponding to the newly added level as a newly added node to the target index structure, and establishing edges between the newly added node and other nodes in the target index structure based on the preset hierarchical relationship includes: Adding the index tag corresponding to the third newly added level as a third type of newly added node to the target index structure; Adding the index tag corresponding to the second newly added level as a second type of newly added node to the target index structure, and determining the parent node of the second type of newly added node according to the preset hierarchical relationship to establish an edge between the second type of newly added node and its parent node; The index tag corresponding to the first newly added level is added as a first type of newly added node to the target index structure, and the parent node of the first type of newly added node is determined according to the preset hierarchical relationship to establish an edge between the first type of newly added node and its parent node.

6. The method according to claim 5, characterized in that The determining the parent node of the first type of newly added node according to the preset hierarchical relationship includes: After determining the target entity corresponding to the first type of newly added node, taking the second type of newly added node corresponding to the target entity as the parent node of the first type of newly added node according to the preset hierarchical relationship; and / or, Determining, according to the preset hierarchical relationship, candidate nodes in the target index structure that belong to a specified level in the at least two historical index structures; A candidate node that meets the following conditions is determined as the parent node of the first type of newly added node: the index tag in the first type of newly added node contains the index tag in the candidate node, or the index tag in the first type of newly added node contains a word with the same semantics as the index tag in the candidate node.

7. The method according to claim 3, characterized in that The data mining is performed on the search conditions received by the search platform to obtain multiple target search conditions, including: Based on the first statistical feature of each of the search conditions among the plurality of search conditions, a plurality of candidate search conditions whose first statistical search feature satisfies a first set statistical condition are screened out from the plurality of search conditions; Based on the second statistical characteristics of each of the candidate search conditions in the plurality of search items, screening out from the plurality of candidate search conditions a plurality of search conditions to be checked whose second statistical characteristics satisfy a second set statistical condition; A quality check is performed on each of the search conditions to be checked to determine a target search condition that meets the quality requirements.

8. The method according to claim 7, characterized in that The first statistical feature of each of the search conditions includes at least one of the following: the number of intent words obtained by performing intent identification on each of the search conditions, and the search frequency ranking of each of the search conditions in at least one time period; The first set statistical condition includes at least one of the following: the number of intent words is greater than a preset number, and the search frequency ranking of each search condition in at least one time period is not lower than a set ranking; wherein different time periods indicate different set rankings; and / or, The second statistical feature of each of the candidate search conditions includes at least one of the following: the frequency of occurrence of each of the candidate search conditions in the several search items, the left information entropy, the right information entropy and the intimacy; wherein the left information entropy is used to describe the collocation of the left side of each of the candidate search conditions with other words, the right information entropy is used to describe the collocation of the right side of each of the candidate search conditions with other words, and the intimacy is used to describe the probability of each word in the candidate search condition appearing together in the several search items; Among them, the second set statistical condition includes at least one of the following: the occurrence frequency is greater than the set number of times, the left information entropy is greater than the set left entropy threshold, the right information entropy is greater than the set right entropy threshold, and the intimacy is greater than the set intimacy threshold.

9. The method according to claim 7, characterized in that: The step of performing a quality check on each of the search conditions to be checked to determine a target search condition that meets the quality requirements includes: Embed each of the search conditions to be checked into a preset prompt template to generate a prompt text corresponding to each of the search conditions to be checked; Inputting the prompt text into a first pre-trained language model, so that the first pre-trained language model determines whether the search condition to be checked meets the quality requirement indicated by the prompt text based on the prompt text, and outputs a first quality detection result corresponding to the search condition to be checked; If the first quality detection result corresponding to the search condition to be checked indicates that the search condition to be checked meets the quality requirement, the search condition to be checked is determined as the target search condition.

10. The method according to claim 9, characterized in that Also includes: If the first quality detection result corresponding to the search condition to be checked indicates that the search condition to be checked does not meet the quality requirement, input the prompt text into a second pre-trained language model, so that the second pre-trained language model determines whether the search condition to be checked meets the quality requirement indicated by the prompt text based on the prompt text, and outputs a second quality detection result corresponding to the search condition to be checked; wherein the first pre-trained language model and the second pre-trained language model are different; If the second quality detection result corresponding to the search condition to be checked indicates that the search condition to be checked meets the quality requirement, the search condition to be checked is determined as the target search condition; otherwise, the search condition to be checked is discarded.

11. The method according to claim 9 or 10, characterized in that: The quality requirements indicated by the prompt text include: the search conditions to be checked belonging to any one of a single noun, a combination of multiple nouns but not a sentence, a proper noun, and a verb phrase meet the quality requirements.

12. The method according to claim 3, characterized in that Before adding the index tag corresponding to the newly added level as a newly added node to the target index structure, the method further includes: Detecting whether there is a node in the target index structure that indicates an index tag corresponding to the newly added level; If yes, discard the index tag corresponding to the newly added level; If not, the step of adding the index tag corresponding to the newly added level as a newly added node to the target index structure is executed.

13. The method according to any one of claims 1 to 10 and 12, characterized in that: The target index structure is represented by a directed acyclic graph, and an edge between any two nodes having a connection relationship in the target index structure points from a lower node of the two nodes to a higher node of the two nodes; The method further comprises: deleting the edges in the target index structure that cause a loop; and / or, The several search items provided by the search platform include notes published on the search platform by user accounts in the search platform; wherein the notes include at least one of text, images, video or audio.

14. A method for determining an index tag, characterized in that: include: In response to detecting a target search term published to a search platform, determining a plurality of candidate search terms similar to the target search term from a plurality of search terms provided by the search platform; wherein each of the plurality of search terms corresponds to an index tag; Determine, from a pre-constructed target index structure, a target node for indicating an index tag corresponding to the candidate search term; wherein the target index structure is constructed based on the index structure construction method according to any one of claims 1 to 13; Based on the index tags corresponding to the multiple candidate search terms respectively and the index tags in other nodes having a connection relationship with the target node, the index tag corresponding to the target search term is determined.

15. The method according to claim 14, characterized in that The determining the index tag corresponding to the target search item based on the index tags respectively corresponding to the multiple candidate search items and the index tags in other nodes having a connection relationship with the target node includes: Using the index tags corresponding to the multiple candidate search items and the index tags in other nodes connected to the target node as candidate index tags for the target search item; Based on the relevance between the target search term and each of the candidate index tags, an index tag corresponding to the target search term is determined.

16. The method according to claim 15, characterized in that The target index structure is determined based on at least two historical index structures applied to the search platform; Each historical index structure corresponds to a pre-trained index tag recognition model, and the index tag recognition model corresponding to each historical index structure is used to determine the index tag of the search term in the historical index structure based on the input search term; The method further comprises: Inputting the target search term into the index label recognition model corresponding to each historical index structure to obtain the index label of the target search term in each historical index structure output by each index label recognition model; The index tags of the target search term in each historical index structure are used as candidate index tags of the target search term.

17. The method according to claim 15, characterized in that The step of determining the index tag corresponding to the target search item based on the relevance between the target search item and each of the candidate index tags includes: Based on the relevance between the target search term and each of the candidate index tags, filter out candidate index tags with relevance higher than a preset threshold from the candidate index tags of the target search term; Based on the target index structure, determining whether there are at least two candidate index tags in a superior-subordinate relationship among the candidate index tags whose relevance is higher than a preset threshold; If so, the candidate index tag belonging to the superior among the at least two candidate index tags belonging to the superior-subordinate relationship is deleted, and the remaining candidate index tags are determined to be index tags corresponding to the target search item.

18. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 17 by running the executable instructions.

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

20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 17 are implemented.