Advertisement search model construction method and device, electronic equipment and storage medium

By constructing a business rule prefix tree and rule-aware training data, a generative model is trained to generate ad identifiers that conform to the rules, which solves the problem of non-compliant ad generation in traditional models and improves the relevance and conversion rate of ads.

CN121168639BActive Publication Date: 2026-07-24BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
Filing Date
2025-09-03
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Traditional generative retrieval models in existing advertising search systems fail to fully consider business rules, resulting in the generation of a large number of ads that do not conform to the rules, serious waste of resources, low recall rate, and poor performance, especially in high-competition traffic scenarios.

Method used

A business rule prefix tree is constructed and a generative model is trained by combining rule-aware training data. By encoding the search region, time, and device into rule identifiers and concatenating them with search terms to form enhanced prompts, the generative model is trained to learn and output target ad identifiers bound to the rule identifiers. The business rule prefix tree and the generative model are then integrated to form an ad search model.

Benefits of technology

It significantly improved the relevance of recalled ads to user intent, reduced invalid exposures, optimized the accuracy of the ad conversion path, and increased ad click-through rate and conversion rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121168639B_ABST
    Figure CN121168639B_ABST
Patent Text Reader

Abstract

The present disclosure provides an advertisement search model construction method and device, electronic equipment and storage medium, relates to the technical field of computers, in particular to the fields of data processing, intelligent search, and can be used in application scenarios such as advertisement pushing. The specific implementation scheme is: constructing a business rule prefix tree according to the delivery rule of an advertisement database; generating rule-aware training data according to search logs; training a generative model using the rule-aware training data, so that the generative model learns to output a target advertisement identifier bound to a rule identifier; integrating the business rule prefix tree and the trained generative model to form an advertisement search model. This scheme generates an advertisement identifier by fusing business rule features through a model, significantly improves the relevance of recalled advertisements and user intent, reduces invalid exposure rate, and optimizes advertisement conversion link accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, particularly to the fields of data processing and intelligent search, and can be used in application scenarios such as advertising push. Specifically, it relates to advertising search model construction methods, devices, electronic devices, and storage media. Background Technology

[0002] Traditional generative retrieval models in current advertising search systems fail to fully consider business rules during the training and inference phases, relying mainly on post-processing business rules for filtering. This results in the model generating a large number of ads that do not conform to the rules, wasting resources and affecting the effectiveness of ad delivery, especially in high-competition traffic scenarios. Summary of the Invention

[0003] This disclosure provides a method, apparatus, electronic device, and storage medium for constructing an advertising search model.

[0004] According to a first aspect of this disclosure, a method for constructing an advertising search model is provided, comprising: constructing a business rule prefix tree based on the delivery rules of an advertising database; the delivery rules include delivery region, delivery time window, and delivery device; generating rule-aware training data based on search logs; the rule-aware training data includes search terms, search region, search time, and search device; wherein, generating the rule-aware training data based on search logs includes: encoding the search region, search time, and search device into rule identifiers; concatenating the search terms with the rule identifiers into enhanced prompts and binding them to target advertising identifiers; training a generative model using the rule-aware training data, so that the generative model learns to output target advertising identifiers bound to the rule identifiers; and integrating the business rule prefix tree with the trained generative model to form an advertising search model.

[0005] According to a second aspect of this disclosure, an advertising search method is provided, comprising: in response to a user's search instruction, acquiring search terms and target feature information; the target feature information including at least: search region, search time, and search device; encoding the target feature information into a rule identifier, and concatenating the search terms with the rule identifier into an enhanced prompt; inputting the enhanced prompt into an advertising search model, so that the advertising search model determines the final advertisement; wherein the advertising search model is trained using the method of the first aspect.

[0006] According to a third aspect of this disclosure, an advertising search model construction apparatus is provided, comprising: a rule processing module for generating a business rule prefix tree based on business rules corresponding to an original advertising database; the business rules include the delivery region, delivery time, and delivery device; a training data module for generating rule-aware training data based on search logs; the rule-aware training data includes search terms, search region, search time, and search device; wherein generating the rule-aware training data based on search logs includes: encoding the search region, search time, and search device into rule identifiers; concatenating the search terms with the rule identifiers into enhanced prompts and binding them to target advertising identifiers; a model training module for training a generative model using the rule-aware training data, so that the generative model learns to output target advertising identifiers bound to the rule identifiers; and a model integration module for integrating the business rule prefix tree with the trained generative model to form an advertising search model.

[0007] According to a fourth aspect of this disclosure, an advertising search apparatus is provided, comprising: an information acquisition module, configured to acquire search terms and target feature information in response to a user's search instruction; the target feature information includes at least: search region, search time, and search device; a prompt word generation module, configured to encode the target feature information into a rule identifier and concatenate the search terms with the rule identifier into an enhanced prompt word; and a model processing module, configured to input the enhanced prompt word into an advertising search model so that the advertising search model determines the final advertisement; wherein the advertising search model is trained using the method of the first aspect.

[0008] According to a fifth aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform any of the methods described in the embodiments of this disclosure.

[0009] According to a sixth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform any of the methods according to embodiments of this disclosure.

[0010] According to a seventh aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements any of the methods according to embodiments of this disclosure.

[0011] By adopting the solution disclosed herein, advertising identifiers are generated by fusing business rule features through model, which significantly improves the relevance of recall ads to user intent, reduces invalid exposure rate, and optimizes the accuracy of the advertising conversion link.

[0012] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0013] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0014] Figure 1 This is a flowchart illustrating the advertising search model construction method according to an embodiment of the present disclosure;

[0015] Figure 2 This is a flowchart illustrating an advertising search method according to an embodiment of the present disclosure;

[0016] Figure 3 This is another flowchart illustrating the advertising search method according to an embodiment of the present disclosure;

[0017] Figure 4 This is another schematic flowchart of the advertising search method according to an embodiment of the present disclosure;

[0018] Figure 5 This is a schematic diagram of the structure of an advertising search model construction apparatus according to an embodiment of the present disclosure;

[0019] Figure 6 This is a schematic diagram of the structure of an advertising search device according to an embodiment of the present disclosure;

[0020] Figure 7 This is a schematic diagram of a scenario for constructing an advertising search model according to an embodiment of the present disclosure;

[0021] Figure 8 This is a schematic diagram of a scenario for an advertising search method according to an embodiment of the present disclosure;

[0022] Figure 9 This is a structural diagram of an electronic device used to implement the advertising search model construction method and / or advertising search method of the embodiments of this disclosure. Detailed Implementation

[0023] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0024] In this document, the term "and / or" merely describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. The term "at least one" in this document indicates any combination of at least two of a plurality of elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C. The terms "first" and "second" in this document refer to and distinguish between multiple similar technical terms, not to restrict the order or to limit there to only two. For example, "first feature" and "second feature" refer to two categories / two features; the first feature can be one or more, and the second feature can also be one or more.

[0025] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.

[0026] Before introducing the technical solutions of the embodiments of this disclosure, the technical terms that may be used in this disclosure will be further explained:

[0027] Ad search refers to the process of finding and returning ad content that matches the targeting rules in an ad database based on user-input search terms or relevant contextual conditions. Specifically, ad search technology is often used to provide more precise ad targeting, thereby improving click-through rates and conversion rates.

[0028] A prefix tree is a tree-like data structure typically used for efficiently storing and searching collections of strings. This structure reduces storage space usage while accelerating search and matching operations by merging common prefixes of strings. Specifically, in advertising search, prefix trees can efficiently organize and match advertising rules, such as encoding rule conditions as prefix paths for quickly finding ads that meet multiple search criteria.

[0029] In related technologies, the compliance of generated ads is mainly ensured by post-processing business rule filtering logic, as the model itself is unaware of rules such as geographic and time-based targeting. The model generates a large number of candidate ads that do not conform to business rules (such as geographic, time-based, and customer targeting), which are ultimately filtered out, resulting in wasted computing resources and latency budgets, especially in large-scale inference scenarios where costs are extremely high. Simultaneously, post-processing filtering inevitably compresses the available effective ad pool, reducing the number of ads actually usable for display while meeting targeting requirements, leading to a decrease in recall and impacting overall traffic monetization. Furthermore, the model and rule system are decoupled, making joint optimization difficult and limiting overall system performance improvement, especially in highly competitive traffic environments where the model + filtering combination is inferior to a controllable generation solution. Therefore, it suffers from severe resource waste, low recall efficiency, and is detrimental to overall system performance improvement.

[0030] In order to at least partially solve one or more of the above-mentioned problems and other potential problems, this disclosure proposes an advertising search model construction method. This solution generates advertising identifiers by integrating business rule features into the model, which significantly improves the relevance of recalled ads to user intent, reduces invalid exposure rate, and optimizes the accuracy of the advertising conversion link.

[0031] This disclosure provides a method for constructing an advertising search model. Figure 1 This is a flowchart illustrating an advertising search model construction method according to an embodiment of the present disclosure. This method can be applied to an advertising search model construction apparatus. The advertising search model construction apparatus is located in an electronic device. The electronic device includes, but is not limited to, fixed devices and / or mobile devices. For example, fixed devices include, but are not limited to, servers, which can be cloud servers or ordinary servers. Mobile devices include, but are not limited to, advertising push devices, which can be mobile phones, tablets, in-vehicle terminals, etc. In some possible implementations, the advertising search model construction method can also be implemented by a processor calling computer-readable instructions stored in memory. Figure 1 As shown, the method for building this advertising search model includes:

[0032] S101. Construct a business rule prefix tree based on the advertising database's delivery rules.

[0033] S102. Generate rule-aware training data based on the search logs.

[0034] S103. Train a generative model using rule-aware training data so that the generative model learns to output target ad identifiers bound to rule identifiers.

[0035] S104. Integrate the business rule prefix tree with the trained generative model to form an advertising search model.

[0036] Here, the delivery rules refer to the pre-set advertising display conditions by the advertiser, which can be used to control the scope of advertising delivery. In this embodiment of the disclosure, the delivery rules include at least the delivery region, the delivery time window, and the delivery device. The delivery region means that the advertisement can only be displayed in a specific geographical area. The delivery time window means that the advertisement can only be displayed within a specific time period. The delivery device means that the advertisement can only be displayed on a specific device.

[0037] Here, the business rule prefix tree is a data representation that organizes advertising rules into a tree structure. Each advertising rule can be encoded as a path in the tree, where nodes represent specific attributes of the rule.

[0038] In this embodiment, advertisements and their delivery rules, including dimensions such as region, time window, and device, can first be extracted from an advertising database. Then, the delivery rules can be encoded. Next, a prefix tree is constructed using the advertising rules as paths, with each rule's dimension value forming a prefix path level by level. Finally, the identifier of the target advertisement is stored at the last node of the path. The above is merely an illustrative example and does not constitute a limitation on all possible scenarios for constructing a business rule prefix tree; it is simply not exhaustive.

[0039] Here, the search log records information about a user's past search behavior, including search keywords, user location, time, and device information.

[0040] Here, the rule-aware training data is an enhanced dataset that combines user search behavior data and rule identifiers. Each piece of training data includes the user's search content and its contextual conditions related to advertising rules. In this embodiment of the disclosure, the rule-aware training data includes at least search terms, search region, search time, and search device. Search terms refer to the text entered by the user to retrieve target content. Search region refers to the geographical location information of the user when performing the search, as recorded in the search log. Search time refers to the point in time when the user performed the search. Search device refers to the type of device used by the user during the search.

[0041] In this embodiment, user search logs can be collected first, and search terms, location, time, and device information can be parsed out. Then, the location, time, and device values ​​can be converted into associated rule identifiers. Next, the search terms and rule identifiers are combined to form enhanced suggestion words. Then, target advertising identifiers can be bound to each search log record to generate sample data. Finally, a rule-aware training dataset can be constructed for model learning. The above is merely an illustrative example and does not represent all possible scenarios for generating rule-aware training data; it is simply not exhaustive.

[0042] Here, the rule identifier refers to the encoded value associated with the advertising delivery conditions. For example, each search region corresponds to a region identifier, each search time corresponds to a time identifier, and each search device corresponds to a device type identifier. The rule identifier is obtained by encoding and merging the region identifier, time identifier, and device type identifier.

[0043] Here, an advertisement identifier refers to a unique identifier for each advertisement. In this embodiment of the disclosure, the advertisement identifier may be an advertisement unique code (Identity Document, ID).

[0044] Here, the enhanced suggestion is an input composed of a search term and a rule identifier. For example, the enhanced suggestion could be {search term: "smartphone" + rule identifier: "region (parses as 01), 9:18 (maps to 20), mobile device (parses as 31)"}.

[0045] In this embodiment, the search region, search time, and search device can be encoded as rule identifiers. Then, the search terms and rule identifiers are concatenated to form enhanced prompts, which are then bound to target advertising identifiers. The above is merely an illustrative example and does not limit the possibilities for generating rule-aware training data; it is simply not exhaustive.

[0046] Here, a generative model is a deep learning model that can generate a target output based on the input, and it is particularly good at handling sequence-to-sequence tasks.

[0047] In this embodiment, rule-aware training data can be used as input, enhanced prompt words as input sequences, and ad icons as target outputs. A generative model then receives the enhanced prompt words and learns to generate a mapping relationship between them and the target ad icons. Through iterative training, the model parameters are optimized so that the model can accurately generate ad icons that conform to the rules. The above is merely an illustrative example and does not represent all possible scenarios for training the generative model; it is simply not exhaustive.

[0048] In this embodiment, a trained generative model can be integrated with a business rule prefix tree to form an advertising search model. This allows the advertising search model to quickly filter the range of advertisements matching the rule conditions using the prefix tree after inputting search terms and rule context, and then use the generative model to generate specific matching advertisement identifiers. Specifically, the integrated advertising search model can be directly applied when a user makes a search request. The above is merely an illustrative example and does not constitute a limitation on all possible scenarios for forming an advertising search model; it is simply not exhaustive.

[0049] The technical solution of this disclosure, by constructing a hierarchical business rule prefix tree, can quickly match combinations of rule conditions and narrow the matching range. By generating rule-aware training data, it can integrate user search terms and contextual conditions, improving data interpretation capabilities and allowing the model to perceive the constraints of the delivery rules during training. By training a generative model, the model can generate ad identifiers bound to the input rules, ensuring matching accuracy. Simultaneously, by learning the relationship between multi-dimensional rules and search terms, the model directly outputs rule-related ad identifiers during generation, without relying on complex post-matching logic. By integrating the business rule prefix tree with the trained generative model, only a portion of the ads filtered by the prefix tree needs to be considered during the generative inference stage, thereby reducing computational complexity and storage consumption. This allows the model to directly satisfy business rules at the model level, improving the compliance of ad recall. Furthermore, the business rule prefix tree, through its plug-in design, can quickly adjust rule conditions according to different dimensions, possessing the ability to quickly plug and play and dynamically update, facilitating personalized and precise advertising services. By generating ad identifiers by fusing business rule features with the model, the relevance of recalled ads to user intent is significantly improved, invalid exposure rates are reduced, and the accuracy of the ad conversion chain is optimized.

[0050] In some embodiments, a business rule prefix tree is constructed based on the ad delivery rules of the ad database, including: generating a targeting strategy triple for each ad in the ad database: <region code, time window code, device type code>; constructing the prefix tree node path level by level based on the targeting strategy triple, wherein a first-level node is established using the region code as the root node branch identifier; a second-level node is established using the time window code as the second-level node branch identifier under the same region code branch; a third-level node is established using the device type code as the third-level node branch identifier under the same region code and time window code branches; and storing a set of ad identifiers that satisfy the current path rules in the leaf nodes, sorted in descending order by ad quality score. Ad identifiers under the same path can participate in the quality score calculation based on click-through rate weights.

[0051] Here, the targeting strategy triple is a set consisting of three dimensions used to describe the rules for ad delivery. In this embodiment, the targeting strategy triple includes a geographic code, a time window code, and a device type code. The geographic code is an encoding format used to represent geographical location; it can be assigned a unique code to each region based on preset regional divisions. The time window code is an encoded representation of a time period, mapping actual time to a defined time window interval. The device type code is an encoding value of the device type parsed from the user agent string, used to distinguish the device used by the user; it can classify devices into types such as mobile devices, desktop devices, and tablet devices, and then assigns a unique code to each device type.

[0052] In this embodiment, the delivery rules for each advertisement, including region, time window, and device, can first be extracted from the advertising database. Then, using pre-defined encoding rules, the delivery rules are converted into encoded values. Finally, a triplet is generated for each advertisement's corresponding encoded value. The above is merely an illustrative example and does not constitute a limitation on all possible cases for generating targeting strategy triplets; it is simply not exhaustive.

[0053] Here, the prefix tree node path is a path composed of a hierarchical tree structure, used to represent the layer-by-layer matching logic of advertising rules.

[0054] Here, branch identifiers are markers used in the prefix tree to distinguish different rule nodes. For example, each branch identifier corresponds to a value of a rule condition matching.

[0055] In this embodiment, starting from the root node, each triple corresponds to a unique path structure. Specifically, a regional branch can be created under the root node, using the regional code as an identifier. Subsequently, a second-level node can be branched out under the regional node, corresponding to the time window code. Next, the final branch node is formed under the time window node, corresponding to the device type code. Finally, a complete path can be constructed on the prefix tree for each advertisement triple. The above is merely an illustrative example and is not intended to limit all possible cases of constructing prefix tree node paths; it is simply not exhaustive.

[0056] Here, the leaf node is the last node in the prefix tree, located at the end of the path, and is used to store the set of advertisement identifiers that satisfy the current path rules. In this embodiment of the disclosure, all advertisements matched by a specific rule path are stored in this leaf node.

[0057] Here, the ad quality score is an indicator that measures the quality of an ad. It can be calculated by combining multiple factors, such as ad content relevance, user click-through rate, and ad conversion rate. In this embodiment, ads with higher quality scores will be shown to users more frequently.

[0058] Here, click-through rate (CTR) weighting is one of the important parameters in calculating the ad quality score. It represents the frequency with which the ad is clicked by users during historical campaigns and is used to measure the ad's attractiveness and effectiveness. In this embodiment, ads with higher CTRs are given priority in being shown to users.

[0059] In this embodiment, the terminal leaf node of each path stores a set of ad identifiers that satisfy the rules of the path, i.e., a list of ads that meet the conditions of the region, time window, and device. Specifically, the ad identifiers can be stored in descending order according to their calculated quality scores, so that the most attractive ads are displayed first when a user searches. For example, the ad quality score can be calculated based on the ad's historical performance, while incorporating click-through rate (CTR) weight into the quality score calculation; for example, Quality Score = CTR Weight × Historical Ad Performance Score. The above is merely an illustrative example and is not intended to limit all possible scenarios for storing the ad identifier set; it is simply not exhaustive.

[0060] In this way, the prefix tree organizes rules layer by layer by region, time window, and device, significantly reducing storage redundancy in delivery rules while simplifying the complexity of rule search. Through a hierarchical path retrieval mechanism, users can quickly locate matching rule branches during searches; compared to traditional full table scans in databases, the prefix tree significantly speeds up matching. Each path is specific to the delivery conditions, refining the ad classification and matching process to ensure that the ads displayed to users are fully consistent with their context. Ads in the leaf nodes are sorted using ad quality scores, prioritizing ads with high click-through rates and strong relevance. Users see more relevant ads, increasing ad acceptance. Click-through rate, as a key factor in the quality score, increases the chances of advertisers displaying high-quality ads; this mechanism more easily attracts advertisers to place high-quality ads, increasing platform revenue.

[0061] In some embodiments, encoding the search region, search time, and search device into a rule identifier includes: parsing the search region into a preset region code; mapping the search time to a preset recent delivery time window to obtain a time window code; parsing the user agent string of the search device into a preset device type code; and combining the region code, time window code, and device type code to generate a fixed-length rule identifier.

[0062] In this embodiment, the user's search location information can be obtained first. For example, the search location can come from the user's device's Internet Protocol (IP) address or location service. Then, according to a preset mapping relationship, a mapping is performed based on a geographic location database to obtain the corresponding location code. The above is merely an illustrative example and is not intended to limit all possible scenarios for obtaining the location code; it is simply not exhaustive.

[0063] In this embodiment, the timestamp of the user's search can be obtained first. By comparing the user's search time with a preset time window, the nearest time window is matched to obtain the corresponding event window code. For example, when the user's search timestamp is 13:44, the nearest time window that can be matched is 13:00-14:00, and the code corresponding to this time window can be used as the time window code for this search. The above is only an illustrative example and is not intended to limit all possible cases of obtaining the time window code; it is simply not exhaustive.

[0064] Here, the User Agent (UA) string is a character sequence emitted by the user device, used to identify the user's device type, operating system, browser, and other information.

[0065] In this embodiment, the User Agent (UA) string sent by the user device can be obtained first. Then, a device type parsing tool can be used to parse the UA string and extract the device type. For example, regular expressions or third-party libraries can be used for parsing. If the UA string contains the characters "Mobile" or "Android", it is parsed as a mobile device; if the UA string contains the characters "Windows NT" or "Macintosh", it is parsed as a desktop device; if the UA string contains the characters "iPad" or "Tablet", it is parsed as a tablet device. Finally, the encoding corresponding to the parsed device type can be used as the device type code for this search. The above is only an illustrative example and is not intended to limit all possible cases of obtaining the device type code; it is simply not exhaustive.

[0066] In this embodiment, the domain code, time window code, and device type code can be concatenated in a fixed order to form a fixed-length string, which is then used as the final rule identifier. Each identifier uniquely identifies an advertising delivery rule. The above is merely an illustrative example and does not constitute a limitation on all possible scenarios for generating rule identifiers.

[0067] In this way, uniformly encoding search criteria into rule identifiers simplifies complex condition matching problems into string matching operations, significantly improving matching efficiency. Generating fixed-length identifiers from three dimensions—region, time, and device—ensures data consistency while facilitating efficient storage and retrieval. Through a pre-defined mapping table of region codes, time window codes, and device type codes, redundant place names, time expressions, and device descriptions are uniformly converted into an encoded format, saving storage space and processing time. Using search region, time, and device dimensions to jointly constrain ad matching rules ensures that ads are strongly relevant to the user's environment, resulting in more precise ad targeting. This helps advertisers improve click-through rates and conversion rates while reducing the resource waste of broad ad placement.

[0068] In some embodiments, a generative model is trained using rule-aware training data to enable the generative model to learn to output target ad identifiers bound to rule identifiers, including: constructing positive samples based on search terms, rule identifiers and corresponding target ad identifiers; constructing negative samples based on search terms, interfering rule identifiers different from the rule identifiers and / or non-target ad identifiers; and training the generative model using a contrastive loss function based on the positive and negative samples to enhance the generative model's dependence on the binding relationship between rule identifiers and target ad identifiers.

[0069] Here, the target ad identifier refers to the ad ID corresponding to the ad that matches the user's search terms and their corresponding rule identifiers.

[0070] Here, positive samples are valid data points used to train the model. In this embodiment of the disclosure, a positive sample includes at least a search term, a correct rule identifier, and a target advertisement identifier associated with it.

[0071] In this embodiment, the actual search term can be obtained first, and then the correct rule identifier can be generated from the contextual information such as the search region, search time, and search device corresponding to the search term. Next, the target ad identifier bound to the search term and rule identifier can be extracted from the advertising database, thereby establishing a one-to-one correspondence between the search term, rule identifier, and target ad identifier to obtain a positive sample. The above is merely an illustrative example and is not intended to limit all possible scenarios for constructing positive samples; it is simply not exhaustive.

[0072] Here, the interference rule identifier is a random or unrelated rule identifier that is different from the real rule identifier, indicating that there is no encoding of the real delivery rule.

[0073] Here, a non-targeted ad identifier is an ad identifier that is not related to the rule identifier or search term.

[0074] Here, negative samples are data points used to train the model to avoid erroneous associations. In this embodiment of the disclosure, negative samples include at least search terms, interference rule identifiers, or non-target advertisement identifiers.

[0075] In this embodiment, the actual search term can be obtained first, and then a random interference rule identifier can be generated. Next, a non-target ad identifier can be randomly selected from the advertising database, thereby establishing a one-to-one correspondence between the search term, the interference rule identifier, and the non-target ad identifier to obtain a negative sample. The above is merely an illustrative example and is not intended to limit all possible scenarios for constructing negative samples; it is simply not exhaustive.

[0076] Here, the contrastive loss function is an optimization objective function used to distinguish between positive and negative samples. In this embodiment of the disclosure, the contrastive loss function compares the binding relationship output value of positive samples with the incorrect binding relationship output value of negative samples, ensuring that the model outputs a higher score for positive samples and a lower score for negative samples.

[0077] In this embodiment, positive and negative samples can be input into a generative model to output an ad identifier. Next, a contrastive loss function can be used to calculate the model's scores on the positive and negative samples. For example, for positive samples, the model produces a high confidence score; for negative samples, the model produces a low confidence score. The loss function is then used to maximize the difference between the positive and negative sample scores, and the model parameters are optimized through multiple rounds of iterative training, making the model's generated results more accurately bind the rule identifier and the target ad identifier. Finally, the generative model after multiple rounds of iteration is used as the trained generative model. The above is merely an illustrative example and does not represent all possible cases for training a generative model; it is simply not exhaustive.

[0078] Thus, constructing positive samples ensures the model correctly learns the binding between rule identifiers and target ad identifiers. Constructing negative samples by introducing interfering rule identifiers and non-target ad identifiers helps the model distinguish between genuine and incorrect rules, improving rule recognition accuracy. By using a contrastive loss function to learn and optimize positive and negative samples based on score differences, the model can clearly distinguish different data points, thereby improving accuracy and robustness. This avoids the model generating incorrect ad identifiers or failing to recognize ad identifiers constrained by rules. The construction of negative samples provides the model with more scenarios and interfering data, allowing it to adapt to complex rule environments. For example, when users have similar search conditions but different rule identifiers, the model can still effectively identify the correct ad. Through reinforcement learning of the binding relationship between rule identifiers, the generative model can accurately generate target ad identifiers that meet the rule conditions, avoiding incorrect delivery due to rule mismatches. This not only improves user experience but also increases advertiser revenue.

[0079] In some embodiments, the advertising search model construction method further includes: reconstructing a business rule prefix tree in response to detecting a change in preset conditions of the delivery rules; and integrating the reconstructed business rule prefix tree with a generative model to update the advertising search model.

[0080] Here, a set of monitoring metrics or triggering rules defined by preset conditions are used to detect changes occurring in the advertising delivery rule environment and determine whether it is necessary to rebuild the business rule prefix tree. In this embodiment of the disclosure, changes in preset conditions may include changes in advertising delivery rules, the addition or removal of advertisements, changes in user behavior, adjustments to rule priorities, etc.

[0081] In this embodiment, the advertising database can be scanned periodically to detect changes in advertising rules or delivery configurations. An event-driven monitoring mechanism can be used to perceive changes in advertising configurations or the impact of dynamic factors in real time. Once a change is detected, it is checked whether the change meets preset conditions, and a decision is made on whether to trigger rule reconstruction. Further, if the change meets the preset conditions, outdated branches or nodes in the existing business rule prefix tree can be removed first, and then the latest targeting strategy triples for all advertisements can be inserted into the prefix tree level by level. Simultaneously, the advertising quality score can be recalculated based on real-time click-through rate data, and the advertising set can be sorted. The above is merely an illustrative example and does not constitute a limitation on all possible scenarios for reconstructing the business rule prefix tree; it is simply not exhaustive.

[0082] In this embodiment, the set of ad identifiers in the leaf nodes of the prefix tree can first be rebound to the rule identifiers of the generative model. Subsequently, the generative model can be trained using the latest ad rules in the prefix tree with soft correction. Specifically, a small validation set can be used to verify whether the model can correctly generate updated target ad identifiers during the query process and to ensure ad matching accuracy. The above is merely an illustrative example and does not constitute a limitation on all possible scenarios for updating the ad search model; it is simply not exhaustive.

[0083] In this way, by detecting changes in preset conditions, the system can quickly respond to dynamic updates in the advertising business environment, ensuring that the ad delivery rules are up-to-date when users search. For example, when an advertiser modifies the delivery time window, the system can update the prefix tree in real time and allow the generative model to adjust its ad output. Reconstructing the prefix tree ensures that the ad rule structure remains consistent with the latest business configuration, guaranteeing that the generative model accesses the latest rule environment. For example, when click-through rate data affects ad ranking, the updated prefix tree can improve ad accuracy. Dynamically integrating the reconstructed rule prefix tree with the generative model ensures that the model can adapt to changes in ad rules and environmental anomalies, enhancing the model's flexibility. After reconstructing the prefix tree, if an advertiser adds ads or adjusts the delivery time window due to rule changes, this can be quickly reflected in the model's recommendation output, helping advertisers efficiently reach their target users.

[0084] This disclosure provides an advertising search method. Figure 2This is a flowchart illustrating an advertising search method according to an embodiment of the present disclosure. This advertising search method can be applied to an advertising search device. The advertising search device is located in an electronic device. The electronic device includes, but is not limited to, fixed devices and / or mobile devices. For example, fixed devices include, but are not limited to, servers, which can be cloud servers or ordinary servers. For example, mobile devices include, but are not limited to, advertising push devices, which can be mobile phones, tablets, in-vehicle terminals, etc. In some possible implementations, the advertising search method can also be implemented by a processor calling computer-readable instructions stored in memory. Figure 2 As shown, the advertising search method includes:

[0085] S201. In response to the user's search command, obtain search terms and target feature information.

[0086] S202. Encode the target feature information into a rule identifier, and concatenate the search term with the rule identifier to form an enhanced prompt word.

[0087] S203. Input the enhanced prompts into the advertising search model so that the advertising search model can determine the final advertisement.

[0088] Here, a search command is an action triggered by the user on the search interface. In this embodiment of the disclosure, the search command can be a text search command, a voice search command, or an automatically triggered search command, etc.

[0089] Here, target feature information refers to a set of contextual information related to the user's current search behavior. In this embodiment of the disclosure, target feature information includes at least the search region, search time, and search device.

[0090] In this embodiment, useful search keywords can first be extracted from user search behavior. Then, search-related contextual information can be extracted from the user's device and environment. For example, the user's device's Global Positioning System (GPS) data or IP address can be extracted, and the mapped geographical location can be used as the search region. Simultaneously, based on the system's current timestamp, the precise time is recorded and then mapped to the time window required by the rule, which is used as the search time. Next, the user's device type is parsed using a regular expression through the User Agent (UA) string, and the obtained device type is used as the search device. Finally, the search region, search time, and search device are integrated into target feature information. The above is merely an illustrative example and does not limit the possibilities of obtaining search terms and target feature information; it is simply not exhaustive.

[0091] In this embodiment, the user's location can first be mapped to a region code, and the time window corresponding to the timestamp can be mapped to a time window code. Then, the user's device type can be converted to a device type code. Subsequently, search terms and rule identifiers can be concatenated to form more semantically rich and contextually meaningful prompts. Specifically, the prompt format can be optimized according to specific business needs, such as adding separators or fixed templates. The above is merely an illustrative example and is not intended to limit all possible scenarios for obtaining enhanced prompts; it is simply not exhaustive.

[0092] Here, the final advertisement is the optimal advertising result generated by the advertising search model based on the user's input conditions. In this embodiment of the disclosure, the final advertisement can be a single advertisement or a collection of multiple advertisements.

[0093] In this embodiment, enhanced prompts can be input into an advertising search model. The model parses the enhanced prompts and matches them against a rule identifier tree or ad vector representation in the advertising database. Then, it re-ranks the ads based on metrics such as click-through rate, conversion rate, and quality score, prioritizing ads that best match the user's needs. Finally, the target ads or a set of target ads that meet the criteria are selected as the final ads and the results are returned. This is merely an illustrative example and does not represent all possible scenarios for obtaining the final ads; it is simply not exhaustive.

[0094] The technical solution of this disclosure, by extracting search region, time, and device information, can provide more relevant advertisements based on the user's location and usage scenario. Hint words containing rule identifiers can accurately target the needs of users with different characteristics, avoiding indiscriminate advertising and improving the efficiency of users obtaining the advertisements they need. The advertising search model enhances contextual parsing capabilities through target feature information, providing advertisements that meet actual needs, are highly adapted to user scenarios, and improve ad click-through rates and conversion rates.

[0095] In some embodiments, encoding target feature information into rule identifiers includes: parsing the search region into a preset region code; mapping the search time to a preset recent delivery time window to obtain a time window code; parsing the user agent string of the search device into a preset device type code; and combining the region code, time window code, and device type code to generate a fixed-length rule identifier.

[0096] Here, the specific steps of parsing the search region into a preset region code, mapping the search time to a preset recent delivery time window to obtain a time window code, parsing the user agent string of the search device into a preset device type code, and combining the region code, time window code, and device type code to generate a fixed-length rule identifier can all be referred to the above descriptions and will not be repeated here.

[0097] In this way, uniformly encoding search criteria into rule identifiers simplifies complex condition matching problems into string matching operations, significantly improving matching efficiency. Generating fixed-length identifiers from three dimensions—region, time, and device—ensures data consistency while facilitating efficient storage and retrieval. Through a pre-defined mapping table of region codes, time window codes, and device type codes, redundant place names, time expressions, and device descriptions are uniformly converted into an encoded format, saving storage space and processing time. Using search region, time, and device dimensions to jointly constrain ad matching rules ensures that ads are strongly relevant to the user's environment, resulting in more precise ad targeting. This helps advertisers improve click-through rates and conversion rates while reducing the resource waste of broad ad placement.

[0098] In some embodiments, the advertising search model is configured to perform the following operations: matching rule identifiers based on a business rule prefix tree to filter an available set of advertisements from an advertising database; reasoning about enhanced prompts based on a generative model to output a target advertisement identifier; and determining the final advertisement from the available set of advertisements based on the target advertisement identifier.

[0099] Here, the advertising database is a collection that stores all advertising information, including relevant advertising data and delivery rules. In this embodiment of the disclosure, each advertisement may include an advertisement ID, advertisement content, business rules, quality score, and historical data.

[0100] In this embodiment, the rule identifier can be used as input first, and a step-by-step matching can be performed in the business rule prefix tree to find the leaf node corresponding to the matching path. Subsequently, the set of ad IDs stored in the leaf node can be obtained, and this set can be used as the available ad set. The above is merely an illustrative example and is not intended to limit all possible cases for filtering the available ad set; it is simply not exhaustive.

[0101] Here, the target ad identifier is the ad ID inferred by the generative model based on the input enhanced prompts, representing the ad that best matches the user's search terms and rule identifiers.

[0102] In this embodiment of the disclosure, the generative model receives enhanced prompt words and parses their components. Subsequently, the generative model can infer the advertisement identifier that best matches the prompt word conditions by learning weights and rule awareness from the advertisement database. The above is merely an illustrative example and is not intended to limit all possible cases of obtaining the target advertisement identifier; it is simply not exhaustive.

[0103] In this embodiment, an advertisement matching the target advertisement ID can be searched within the available advertisement set. If the advertisement ID matches, that advertisement is used as the final advertisement. Specifically, if the target advertisement ID is not in the available advertisement set, the target advertisement is not output, and a default result or an empty result is used instead. Finally, the advertisement content corresponding to the target advertisement ID is output as the final advertisement. The above is merely an illustrative example and is not intended to limit all possible cases in determining the final advertisement; it is simply not exhaustive.

[0104] Thus, using a business rule prefix tree for rapid matching can efficiently filter out the set of advertisements that conform to the rules, reducing complexity. Enhanced prompts, combined with search terms and target feature information, effectively constrain the output range of the generative model, making the generation more context-sensitive and accurate.

[0105] In some embodiments, matching rule identifiers based on a business rule prefix tree and filtering available ad sets from an ad database includes: retrieving leaf nodes that match the rule identifiers in the business rule prefix tree; and extracting the ad sets bound to the leaf nodes as available ad sets.

[0106] In this embodiment, the rule identifier can first be decomposed into a region code, a time code, and a device type code according to the encoding rules. Then, the prefix tree can be searched layer by layer downwards according to the order of the rule identifiers. For example, after matching by region code in the first layer, matching by time code in the second layer, and finally matching by device type code in the third layer, until the path is determined and the final leaf node is found. The above is merely an illustrative example and is not intended to limit all possible cases for retrieving leaf nodes; it is simply not exhaustive.

[0107] In this embodiment, the bound set of ad IDs can be read first from the leaf nodes. Then, based on the IDs of the ad sets, the detailed content of the corresponding ads is loaded from the ad database. Finally, all ads matching the rule identifiers are organized into a set for subsequent processing. The above is merely an illustrative example and is not intended to limit all possible cases for determining the available ad set; it is simply not exhaustive.

[0108] Thus, the hierarchical structure of the prefix tree enables efficient layer-by-layer retrieval of rule identifiers, quickly finding ad sets that conform to complex constraints. Extracting ad sets from leaf nodes ensures that the output ads only belong to the constraints of user features, avoiding the delivery of irrelevant ads and improving ad matching accuracy. The ad sets filtered by rule identifiers are highly matched with user intent and feature information, effectively improving ad click-through rates and conversion rates.

[0109] In some embodiments, reasoning about enhanced prompts based on a generative model and outputting a target ad identifier includes: inputting enhanced prompts into a generative model; and constraining the generative model to output a target ad identifier from the set of ad identifiers corresponding to the available ad set.

[0110] In this embodiment of the disclosure, enhanced prompts can be input into a generative model. Specifically, the enhanced prompts can also be converted into vector form or embedded representation, or other input formats suitable for generative models. The above is merely illustrative and is not intended to limit all possible cases of inputting enhanced prompts; it is simply not exhaustive.

[0111] In this embodiment, the ad identifier output by the generative model can be compared with ad identifiers in the available ad set to generate an intersection result. Only ads in the intersection result are considered valid target ads. Subsequently, the optimal ad identifier can be further determined based on the intersection result. For example, the ads in the intersection can be ranked according to the generative model's preference weights for candidate ads, and the ad identifier with the highest ranking can be used as the target ad identifier. In particular, if the intersection is empty, a default result is output. The above is only an illustrative example and is not intended to limit all possible cases of obtaining the target ad identifier; it is simply not exhaustive.

[0112] In this way, by understanding the user's search intent through semantic reasoning and generating candidate ads by combining rule identifiers and contextual constraints, the weakness of traditional keyword matching methods that are limited to a single dimension is overcome. By combining generative models with business rules, the advantages of semantic understanding of the model are retained, while the generated results can be effectively controlled, thereby improving matching accuracy and business adaptability.

[0113] In this embodiment of the disclosure, before outputting the final advertisement, the advertisement search model construction method further includes: verifying whether the target advertisement identifier exists in the available advertisement set; if it does not exist, triggering the generative model to re-infer or returning the preset default advertisement.

[0114] In this embodiment, the target ad identifier output by the generative model can be compared one by one with the ad identifiers in the available ad set. If the target ad identifier exists in the set, the ad is confirmed to be available, and the subsequent process of outputting the final ad can continue. The above is only an illustrative example and is not intended to limit all possible cases of verifying the target ad identifier; it is simply not exhaustive.

[0115] In this embodiment, the target ad identifier output by the generative model can be compared one by one with the ad identifiers in the available ad set. If the target ad identifier does not exist in the set, the result output by the generative model does not conform to the business rules, and enhanced prompt words need to be input into the generative model to re-determine the priority of the ad identifier and generate it. In particular, a default ad set can be pre-set, where the default ads are unrelated to the user's target features and have broad adaptability. Subsequently, if the target ad identifier does not exist in the set, ads can be retrieved from the default ad set and displayed to the user. The above is only an illustrative example and is not intended to limit all possible situations of search failure; it is simply not exhaustive.

[0116] Thus, the verification process ensures that the target ad identifier is strictly restricted by business rules, thereby preventing the generative model from inferring results that do not conform to the advertising rules. The re-inference process, through further filtering and restrictions, improves the final ad accuracy, contributing to increased user satisfaction. Returning to the default ad provides a security solution for the advertising platform, ensuring that ads are continuously displayed to users, thereby avoiding issues such as no ads being displayed or empty pages due to generative model anomalies.

[0117] In some implementations, the encoding rule for the rule identifier is: region code × 100 + time window code × 10 + device type code. Here, the region code refers to the regional code; in the time window code, 1 represents weekday daytime, 2 represents weekday nighttime, 3 represents weekend daytime, and 4 represents weekend nighttime. Specifically, to improve the accuracy of ad delivery, a city field can be added to the enhanced prompts to perform more detailed reasoning based on the city while maintaining geographical restrictions.

[0118] Figure 3 Another flowchart illustrating the advertising search method according to an embodiment of this disclosure is shown, such as... Figure 3 As shown, a business rule prefix tree is established based on the advertiser's placement business rules. These rules include the placement region, placement time window, and placement device.

[0119] Specifically, the user entered the search term "epoxy flooring," and the search location was identified as City A, the search time as 11 PM on Saturday, and the search device as an iOS device. According to the rule identifier encoding rules, City A belongs to a certain region, and the region code for that region is 1; 11 PM on Saturday is a rest day night, so the time window code is 4; and the device type code for the iOS device is 1. After processing, the rule identifier is 141.

[0120] Furthermore, an enhanced prompt input advertising search model is constructed based on search terms, city, and rule identifiers.

[0121] Furthermore, the advertising search model matches each rule identifier sequentially based on the business rule prefix tree to obtain a set of available ads. Then, a generative model uses Prompt to infer from this set of available ads, outputting the final ad ID as 429535874.

[0122] Figure 4 Another flowchart illustrating the advertising search method according to an embodiment of this disclosure is shown, such as... Figure 4 As shown, after constructing a Prompt based on the search term "water light injection effect", the city A, and the rule identifier 114, it is input into the advertising search model for processing, and finally the advertisement of XX Medical Beauty Hospital in City A is obtained, with ID 548322549.

[0123] It should be understood that Figure 3 and Figure 4 The schematic diagrams shown are merely illustrative and not limiting, and are scalable; those skilled in the art can use them as a basis. Figure 3 and Figure 4 Even with various obvious changes and / or substitutions to the examples, the resulting technical solutions still fall within the scope of this disclosure.

[0124] This disclosure provides an advertising search model construction apparatus, such as... Figure 5 As shown, the device may include: a rule processing module 501, used to generate a business rule prefix tree based on business rules corresponding to the original advertising database; the business rules include the delivery region, delivery time, and delivery device; a training data module 502, used to generate rule-aware training data based on search logs; the rule-aware training data includes search terms, search region, search time, and search device; wherein, generating rule-aware training data based on search logs includes: encoding the search region, search time, and search device into rule identifiers; concatenating the search terms with the rule identifiers into enhanced prompts and binding them to target advertising identifiers; a model training module 503, used to train a generative model using the rule-aware training data, so that the generative model learns to output target advertising identifiers bound to the rule identifiers; and a model integration module 504, used to integrate the business rule prefix tree with the trained generative model to form an advertising search model.

[0125] In some embodiments, the rule processing module 501 includes: a targeting strategy generation submodule, used to generate a targeting strategy triplet for each advertisement in the advertisement database: <region code, time window code, device type code>; a path construction submodule, used to construct a prefix tree node path step by step according to the targeting strategy triplet, wherein a first-level node is established using the region code as the root node branch identifier; a second-level node is established using the time window code as the second-level node branch identifier under the same region code branch; and a third-level node is established using the device type code as the third-level node branch identifier under the same region code and time window code branches; and an advertisement identifier storage submodule, used to store a set of advertisement identifiers that satisfy the current path rules in the leaf nodes, and store them in descending order of advertisement quality score; wherein advertisement identifiers under the same path participate in the quality score calculation according to the click-through rate weight.

[0126] In some embodiments, the training data module 502 includes: a first region parsing submodule, used to parse the search region into a preset region code; a first time mapping submodule, used to map the search time to a preset recent delivery time window to obtain a time window code; a first device parsing submodule, used to parse the user agent string of the search device into a preset device type code; and a first combination generation submodule, used to combine the region code, time window code, and device type code to generate a fixed-length rule identifier.

[0127] In some embodiments, the model training module 503 includes: a positive sample construction submodule for constructing positive samples based on search terms, rule identifiers, and corresponding target ad identifiers; a negative sample construction submodule for constructing negative samples based on search terms, interfering rule identifiers different from the rule identifiers, and / or non-target ad identifiers; and a model training submodule for training a generative model using a contrastive loss function based on the positive and negative samples to enhance the generative model's dependence on the binding relationship between the rule identifiers and the target ad identifiers.

[0128] In some embodiments, the advertising search model building apparatus further includes: a rule reconstruction module 505. Figure 5 (Not shown in the image), used to reconstruct the business rule prefix tree in response to the detection of a change in preset conditions in the delivery rules; Model Update Module 506 ( Figure 5 (Not shown in the image) is used to integrate the reconstructed business rule prefix tree with the generative model to update the advertising search model.

[0129] The specific functions and examples of each module and submodule of the apparatus in this disclosure can be found in the relevant descriptions of the corresponding steps in the above method embodiments, and will not be repeated here.

[0130] The advertising search model building apparatus in this embodiment can quickly match rule condition combinations and narrow down the matching range by constructing a hierarchical business rule prefix tree. By generating rule-aware training data, it can integrate user search terms and contextual conditions, improving data interpretation capabilities and allowing the model to perceive the constraints of the delivery rules during training. By training a generative model, the model can generate ad identifiers bound to the input rules, ensuring matching accuracy. Simultaneously, by learning the relationship between multi-dimensional rules and search terms, the model directly outputs rule-related ad identifiers during generation, without relying on complex post-matching logic. By integrating the business rule prefix tree with the trained generative model, only a portion of the ads filtered by the prefix tree needs to be considered during the generative inference stage, thereby reducing computational complexity and storage consumption. This allows the model to directly satisfy business rules at the model level, improving the compliance of ad recall. Furthermore, the business rule prefix tree, through its plug-in design, can quickly adjust rule conditions according to different dimensions, possessing rapid plug-and-play and dynamic update capabilities, facilitating personalized and precise advertising services.

[0131] This disclosure provides an advertising search device, such as... Figure 6 As shown, the device may include: an information acquisition module 601, used to acquire search terms and target feature information in response to a user's search command; the target feature information includes at least: search region, search time, and search device; a prompt word generation module 602, used to encode the target feature information into rule identifiers and concatenate the search terms with the rule identifiers into enhanced prompt words; and a model processing module 603, used to input the enhanced prompt words into an advertising search model so that the advertising search model can determine the final advertisement; wherein, the advertising search model is trained using the image generation model training method described above.

[0132] In some embodiments, the prompt word generation module 602 includes: a second region parsing submodule, used to parse the search region into a preset region code; a second time mapping submodule, used to map the search time to a preset recent delivery time window to obtain a time window code; a second device parsing submodule, used to parse the user agent string of the search device into a preset device type code; and a second combination generation submodule, used to combine the region code, time window code, and device type code to generate a fixed-length rule identifier.

[0133] In some embodiments, the advertising search model is configured to perform the following operations: matching rule identifiers based on a business rule prefix tree to filter an available set of advertisements from an advertising database; reasoning about enhanced prompts based on a generative model to output a target advertisement identifier; and determining the final advertisement from the available set of advertisements based on the target advertisement identifier.

[0134] In some embodiments, the process of the advertising search model matching rule identifiers based on a business rule prefix tree to filter out an available set of advertisements from the advertising database includes: retrieving leaf nodes that match the rule identifiers in the business rule prefix tree; and extracting the set of advertisements bound to the leaf nodes as the available set of advertisements.

[0135] In some embodiments, the process of an advertising search model reasoning about enhanced prompts based on a generative model and outputting a target advertising identifier includes: inputting enhanced prompts into a generative model; and constraining the generative model to output a target advertising identifier from the set of advertising identifiers corresponding to the available set of advertisements.

[0136] In some embodiments, the model processing module 603 includes: an output verification submodule, used to verify whether the target ad identifier exists in the available ad set before outputting the final ad; if it does not exist, the generative model is triggered to re-infer or a preset default ad is returned.

[0137] The specific functions and examples of each module and submodule of the apparatus in this disclosure can be found in the relevant descriptions of the corresponding steps in the above method embodiments, and will not be repeated here.

[0138] The advertising search device in this embodiment can extract search region, time, and device information to provide more relevant advertisements based on the user's location and usage scenario. Hints containing rule identifiers can accurately target the needs of users with different characteristics, avoiding indiscriminate advertising and improving the efficiency of users obtaining the advertisements they need. The advertising search model enhances contextual analysis capabilities through target feature information, providing advertisements that meet actual needs, are highly adapted to user scenarios, and improve ad click-through rates and conversion rates.

[0139] This disclosure provides a scenario illustration of an advertising search model construction method, such as... Figure 7 As shown.

[0140] As previously described, the advertising search model construction method provided in this disclosure is applied to electronic devices. Electronic devices are intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers.

[0141] Specifically, the electronic device may perform the following operations:

[0142] Based on the ad delivery rules in the ad database, a business rule prefix tree is constructed. The delivery rules include at least the delivery region, delivery time window, and delivery device. Rule-aware training data is generated based on search logs. This training data includes at least search terms, search region, search time, and search device. Generating the rule-aware training data from the search logs includes: encoding the search region, search time, and search device into rule identifiers; concatenating search terms with rule identifiers to form enhanced prompts and binding them to target ad identifiers; training a generative model using the rule-aware training data to learn and output target ad identifiers bound to the rule identifiers; and integrating the business rule prefix tree with the trained generative model to form an ad search model.

[0143] It should be understood that Figure 7 The scene diagrams shown are merely illustrative and not restrictive; those skilled in the art can interpret them based on... Figure 7 Even with various obvious changes and / or substitutions to the examples, the resulting technical solutions still fall within the scope of this disclosure.

[0144] This disclosure provides a scenario illustration of an advertising search method, such as... Figure 8 As shown.

[0145] As previously described, the advertising search method provided in this disclosure is applied to an electronic device. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. This electronic device may be installed in or connected to an autonomous vehicle.

[0146] Specifically, the electronic device may perform the following operations:

[0147] In response to the user's search command, the system obtains search terms and target feature information; the target feature information includes at least: search region, search time, and search device; the target feature information is encoded into rule identifiers, and the search terms are concatenated with the rule identifiers to form enhanced prompts; the enhanced prompts are input into the advertising search model so that the advertising search model can determine the final advertisement.

[0148] It should be understood that Figure 8 The scene diagrams shown are merely illustrative and not restrictive; those skilled in the art can interpret them based on... Figure 8 Even with various obvious changes and / or substitutions to the examples, the resulting technical solutions still fall within the scope of this disclosure.

[0149] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0150] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0151] Figure 9 A schematic block diagram of an example electronic device 900 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0152] like Figure 9 As shown, device 900 includes a computing unit 901, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 902 or a computer program loaded from storage unit 908 into random access memory (RAM) 903. RAM 903 may also store various programs and data required for the operation of device 900. The computing unit 901, ROM 902, and RAM 903 are interconnected via bus 904. Input / output (I / O) interface 905 is also connected to bus 904.

[0153] Multiple components in device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of monitors, speakers, etc.; storage unit 908, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0154] The computing unit 901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as the advertising search model building method and / or advertising search method. For example, in some embodiments, the advertising search model building method and / or advertising search method can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by computing unit 901, one or more steps of the advertising search model construction method and / or advertising search method described above can be performed. Alternatively, in other embodiments, computing unit 901 can be configured to execute the advertising search model construction method and / or advertising search method by any other suitable means (e.g., by means of firmware).

[0155] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0156] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0157] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory (EPROM), flash memory, optical fiber, compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0158] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) or liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0159] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0160] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0161] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0162] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for constructing an advertising search model, comprising: Based on the ad delivery rules in the ad database, construct a business rule prefix tree; The deployment rules include at least the deployment area, deployment time window, and deployment equipment; Based on search logs, rule-aware training data is generated; the rule-aware training data includes at least search terms, search regions, search times, and search devices; wherein, generating rule-aware training data based on search logs includes: encoding the search regions, search times, and search devices into rule identifiers; concatenating the search terms with the rule identifiers into enhanced prompts and binding them to target ad identifiers; A generative model is trained using the rule-aware training data, so that the generative model learns to output the target advertisement identifier bound to the rule identifier; The business rule prefix tree is integrated with the trained generative model to form the advertising search model; The step of constructing a business rule prefix tree based on the advertising database's delivery rules includes: Generate a targeting strategy triple for each ad in the advertising database: <region code, time window code, device type code>; The prefix tree node path is constructed step by step according to the triplets of the orientation strategy. The first-level node is established by using the region code as the root node branch identifier; the second-level node is established by using the time window code as the second-level node branch identifier under the same region code branch; and the third-level node is established by using the device type code as the third-level node branch identifier under the same region code and time window code branch. The leaf nodes store a set of ad identifiers that satisfy the current path rules, and sort them in descending order by ad quality score.

2. The method according to claim 1, wherein, The step of encoding the search region, the search time, and the search device into rule identifiers includes: The search region is parsed into a preset region code; The search time is mapped to a preset recent delivery time window to obtain a time window code; The user agent string of the search device is parsed into a preset device type code; The region code, the time window code, and the device type code are combined to generate a fixed-length rule identifier.

3. The method according to claim 1, wherein, The step of training a generative model using the rule-aware training data, so that the generative model learns to output the target advertisement identifier bound to the rule identifier, includes: Based on the search terms, the rule identifiers, and the corresponding target ad identifiers, construct positive samples; Based on the search terms, interfering rule identifiers that are different from the rule identifiers, and / or non-target ad identifiers, negative samples are constructed. Based on the positive and negative samples, the generative model is trained using a contrastive loss function to enhance the generative model's reliance on the binding relationship between the rule identifier and the target ad identifier.

4. The method according to claim 1, wherein, The method further includes: In response to detecting a change in the preset conditions of the delivery rule, the business rule prefix tree is reconstructed; The reconstructed business rule prefix tree is integrated with the generative model to update the advertising search model.

5. An advertising search method, comprising: Responding to the user's search instructions, it obtains search terms and target feature information; The target feature information includes at least: search area, search time, and search device; The target feature information is encoded into a rule identifier, and the search term is concatenated with the rule identifier to form an enhanced suggestion term; The enhanced prompts are input into the advertising search model to determine the final advertisement; wherein the advertising search model is trained by the method of any one of claims 1 to 4.

6. The method according to claim 5, wherein, Encoding the target feature information into a rule identifier includes: The search region is parsed into a preset region code; The search time is mapped to a preset recent delivery time window to obtain a time window code; The user agent string of the search device is parsed into a preset device type code; The region code, the time window code, and the device type code are combined to generate a fixed-length rule identifier.

7. The method according to claim 5, wherein, The advertising search model is configured to perform the following operations: The rule identifiers are matched based on the business rule prefix tree to filter out the available ad set from the ad database; Based on the generative model, the enhanced prompt words are inferred, and the target advertisement identifier is output; The final advertisement is determined from the set of available advertisements based on the target advertisement identifier.

8. The method according to claim 7, wherein, The process of matching the rule identifier based on the business rule prefix tree to filter the available ad set from the ad database includes: Retrieve the leaf node that matches the rule identifier in the business rule prefix tree; Extract the set of advertisements bound to the leaf nodes as the available set of advertisements.

9. The method according to claim 7, wherein, The process of reasoning about the enhanced prompt words based on the generative model and outputting the target advertisement identifier includes: Input the enhanced prompt words into the generative model; The generative model is constrained to output the target ad identifier from the set of ad identifiers corresponding to the available ad set.

10. The method according to claim 7, wherein, Before outputting the final advertisement, the method further includes: Verify whether the target ad identifier exists in the available ad set; If it does not exist, the generative model is triggered to re-infer or return to the preset default advertisement.

11. An advertising search model building apparatus, comprising: The rule processing module is used to generate a business rule prefix tree based on the business rules corresponding to the original advertising database; The business rules include the delivery area, delivery time, and delivery device; The training data module is used to generate rule-aware training data based on search logs. The rule-aware training data includes search terms, search regions, search times, and search devices. The step of generating rule-aware training data based on search logs includes: encoding the search region, search time, and search device into rule identifiers; concatenating the search terms with the rule identifiers into enhanced prompts and binding them to target ad identifiers. The model training module is used to train a generative model using the rule-aware training data, so that the generative model learns to output the target advertisement identifier bound to the rule identifier; The model integration module is used to integrate the business rule prefix tree with the trained generative model to form the advertising search model; The rule processing module includes: a targeting strategy generation submodule, used to generate a targeting strategy triplet for each advertisement in the advertising database: <region code, time window code, device type code>; a path construction submodule, used to construct a prefix tree node path level by level according to the targeting strategy triplet, wherein the region code is used as the root node branch identifier to establish a first-level node; under the same region code branch, the time window code is used as the second-level node branch identifier to establish a second-level node; under the same region code and time window code branch, the device type code is used as the third-level node branch identifier to establish a third-level node; and an advertisement identifier storage submodule, used to store the set of advertisement identifiers that satisfy the current path rules at the leaf nodes, and store them in descending order of advertisement quality score.

12. An advertising search device, comprising: The information acquisition module is used to acquire search terms and target feature information in response to the user's search instructions; The target feature information includes at least: search area, search time, and search device; The prompt word generation module is used to encode the target feature information into a rule identifier, and concatenate the search term with the rule identifier to form an enhanced prompt word; A model processing module is used to input the enhanced prompt words into an advertising search model so that the advertising search model can determine the final advertisement; wherein the advertising search model is trained by the method of any one of claims 1 to 4.

13. An electronic device, comprising: At least one processor; as well as A memory that is communicatively connected to at least one processor; wherein, The memory stores instructions that can be executed by at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein, Computer instructions are used to cause a computer to perform the method according to any one of claims 1-7.

15. A computer program product comprising a computer program stored on a storage medium, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1-7.