Advertisement delivery method, device, equipment, medium and program product

By using declarative configuration files and memory space isolation technology, combined with synchronous and asynchronous data access, the problems of inflexible task scheduling and database access security in the advertising system are solved, realizing an efficient and flexible advertising delivery process and improving system performance and availability.

CN121190132APending Publication Date: 2025-12-23BEIJING IQIYI TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511376421.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2025-12-23

AI Technical Summary

Technical Problem

The existing advertising system has inflexible task scheduling, cannot be adjusted quickly, and has thread safety issues when accessing the database under high concurrency. Furthermore, expanding to a new database requires code modifications, which affects the continuity of advertising services.

Method used

The ad delivery process is defined using a declarative configuration file. By parsing the configuration file, task nodes and data access policies are obtained, enabling pre-binding of tasks and data access policies. It supports hot deployment and memory space isolation, combines synchronous and asynchronous data access modes, and uses a circuit breaker algorithm to monitor the data source.

Benefits of technology

It improves the flexibility and efficiency of task scheduling, reduces the need for code modification, enhances system availability and performance, reduces end-to-end request processing latency, and strengthens error isolation capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121190132A_ABST
    Figure CN121190132A_ABST
Patent Text Reader

Abstract

The invention provides an advertisement putting method and device, equipment, a medium and a program product, relates to the technical field of advertisement systems, and aims to solve the problem of low flexibility of task scheduling in advertisement putting. The method comprises the following steps: receiving a first advertisement request sent by a client; determining a first declarative configuration file corresponding to the first advertisement request; the first declarative configuration file is analyzed, execution process information and a plurality of data access strategies corresponding to a plurality of task nodes in the execution process information in a one-to-one mode are obtained, and the data access strategies comprise to-be-accessed advertisement data sources and data scheduling strategies of the advertisement data sources; executing tasks corresponding to the plurality of task nodes according to the execution process information and the plurality of data access strategies to obtain an execution result; and sending the execution result to the client. According to the invention, the flexibility of task scheduling in advertisement putting can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of advertising system technology, and in particular to an advertising delivery method, apparatus, equipment, medium and program product. Background Technology

[0002] Existing advertising systems (especially real-time bidding (RTB) advertising) require handling complex business logic, including user profile queries, ad candidate set retrieval, bidding strategy calculation, and creative assembly. Some of these steps need to be executed sequentially, i.e., dependent on the results of the previous step, while others can be executed in parallel. Furthermore, these steps require access to multiple databases, such as Redis for caching user profiles, MongoDB for storing ad creatives, and MySQL for recording ad transactions. However, changes to advertising business logic require code modification and redeployment, making rapid adjustments difficult and resulting in low flexibility in task scheduling during ad delivery. Summary of the Invention

[0003] This application provides an advertising delivery method, apparatus, device, medium, and program product to address the problem of low flexibility in task scheduling during advertising delivery.

[0004] To solve the above-mentioned technical problems, this application is implemented as follows: In a first aspect, embodiments of this application provide an advertising delivery method, including: Receive the first advertisement request sent by the client; Determine the first declarative configuration file corresponding to the first advertising request; The first declarative configuration file is parsed to obtain execution flow information and multiple data access strategies corresponding to multiple task nodes in the execution flow information. The data access strategies include the advertising data source to be accessed and the data scheduling strategy of the advertising data source. Execute the tasks corresponding to the multiple task nodes according to the execution flow information and the multiple data access strategies, and obtain the execution results; The execution result is sent to the client.

[0005] Secondly, embodiments of this application provide an advertising delivery device, comprising: The receiving module is used to receive the first advertising request sent by the client; The determination module is used to determine the first declarative configuration file corresponding to the first advertisement request; The parsing module is used to parse the first declarative configuration file to obtain execution flow information and multiple data access strategies corresponding to multiple task nodes in the execution flow information. The data access strategies include the advertising data source to be accessed and the data scheduling strategy of the advertising data source. The first execution module is used to execute the tasks corresponding to the multiple task nodes according to the execution process information and the multiple data access strategies, and obtain the execution results; The sending module is used to send the execution result to the client.

[0006] Thirdly, embodiments of this application provide an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, it implements the steps of the advertising delivery method described in the first aspect above.

[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the advertising delivery method described in the first aspect above.

[0008] Fifthly, embodiments of this application provide a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the advertising delivery method as described in the first aspect above.

[0009] In this embodiment, a first advertising request sent by a client is received; a first declarative configuration file corresponding to the first advertising request is determined; the first declarative configuration file is parsed to obtain execution flow information and multiple data access strategies corresponding one-to-one with multiple task nodes in the execution flow information, wherein the data access strategies include the advertising data source to be accessed and the data scheduling strategy of the advertising data source; the tasks corresponding to the multiple task nodes are executed according to the execution flow information and the multiple data access strategies to obtain execution results; and the execution results are sent to the client. In this way, the task execution flow for advertising delivery can be defined through a declarative configuration file, allowing the flow logic to be adjusted without modifying the code, i.e., only the declarative configuration file needs to be modified to take effect, thereby improving the flexibility of task scheduling. Furthermore, since multiple task nodes in the execution flow information correspond one-to-one with multiple data access strategies, the task nodes and data access strategies are pre-bound, which can further improve the efficiency of task execution. Attached Figure Description

[0010] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a flowchart of an advertising delivery method provided in an embodiment of this application; Figure 2 This is one of the application flowcharts of an advertising delivery method provided in the embodiments of this application; Figure 3 This is the second application flowchart of an advertising delivery method provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of an advertising delivery device provided in an embodiment of this application. Detailed Implementation

[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0013] For ease of understanding, the following describes some aspects of the embodiments of this application: The advertising system in related technologies has the following pain points: In terms of task scheduling, changes to advertising business logic require code modification and redeployment, which cannot be quickly adjusted through configuration. Task scheduling is not flexible enough, and the task scheduling framework in related technologies is difficult to support dynamically nested task structures, such as custom retry strategies after a task fails in a parallel task group. Moreover, the configuration is not intuitive enough, making it difficult to iterate advertising business logic quickly. Regarding database access, thread safety issues exist when concurrency is high. Traditional connection pool management is prone to resource contention in multi-threaded environments, such as connection leakage. Synchronous access mode can cause thread blocking when the database response is slow, reducing throughput. Furthermore, different databases have different access protocols, and expanding to a new database requires code modification and service restart, affecting the continuity of advertising services and making it impossible to dynamically add data at runtime.

[0014] This application proposes an advertising delivery method, apparatus, device, medium, and program product to address the problem of low flexibility in task scheduling during advertising delivery.

[0015] See Figure 1 , Figure 1 This is a flowchart of an advertising delivery method provided in an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps: Step 101: Receive the first advertisement request sent by the client.

[0016] In this step, the aforementioned client can be a terminal device, webpage, or application (App), etc. The aforementioned first advertising request can be an advertising delivery request initiated by the client, which may specifically include user information, advertising space information, device information, advertising type, page content, etc., wherein user information may include user profile, user identifier, etc.

[0017] For example, when a user opens an app on their phone, the app sends a first ad request to the advertising system, requesting to display relevant ads.

[0018] Step 102: Determine the first declarative configuration file corresponding to the first advertisement request.

[0019] In this step, the first declarative configuration file mentioned above is a rules file defined using a declarative language (such as YAML or JSON) that describes the process and strategy for ad delivery, rather than hard-coded logic.

[0020] Specifically, the aforementioned determination of the first declarative configuration file corresponding to the first advertising request can be based on the parameter information included in the first advertising request, such as determining the corresponding declarative configuration file based on the user type and the advertising slot type.

[0021] It is understandable that the above method can be applied to an advertising system. The advertising system can pre-store multiple declarative configuration files. The parameter information included in the first advertising request has a preset matching relationship with the first declarative configuration file. Therefore, the first declarative configuration file can be determined from multiple declarative configuration files based on the first advertising request.

[0022] Step 103: Parse the first declarative configuration file to obtain execution flow information and multiple data access strategies corresponding to multiple task nodes in the execution flow information. The data access strategies include the advertising data source to be accessed and the data scheduling strategy of the advertising data source.

[0023] In this step, the first declarative configuration file is parsed. Specifically, this can be done by running a topology parsing algorithm to parse the process definitions in the first declarative configuration file, including stages, parallel groups, and nesting, and generating specific execution process information.

[0024] The execution process information mentioned above may include multiple task nodes and the dependencies between the multiple task nodes, wherein each of the multiple task nodes is used to indicate a task, such as obtaining user profiles or ad recall.

[0025] The aforementioned data access strategy can be used to instruct each task node how to obtain data, such as reading user profiles from Redis or querying ad candidate sets from a database. It can also include settings such as synchronous mode, asynchronous mode, connection pool configuration, and retry strategy.

[0026] It is understandable that there is a one-to-one correspondence between multiple task nodes and multiple data access policies, and the correspondence can be loaded from the first declarative configuration file.

[0027] Step 104: Execute the tasks corresponding to the multiple task nodes according to the execution process information and the multiple data access strategies to obtain the execution results.

[0028] In this step, the execution result can be the final output of the ad delivery, which may include an ad list, sorting results, etc.

[0029] Step 105: Send the execution result to the client.

[0030] In this step, the execution result is sent to the client so that the client can display advertisements to the user.

[0031] For example, suppose a user browses a sports product page on an e-commerce app, and the advertising system performs the following steps: The client sends the first advertising request, which includes the user ID and the page type as sports products; Match the declarative configuration file corresponding to the sports product; The declarative configuration file is parsed to generate execution flow information and data access strategies. The execution flow information is user profiling → ad recall → ad ranking. According to the data access strategy, retrieve the user profile (interest = "sports") from Redis; Retrieve ads tagged with "sports" from the database (ads A, B, and C); The model is invoked to sort the ads, and the output is: Ad B > Ad A > Ad C; The list of ads is returned to the client and displayed to the user.

[0032] In this embodiment, a first advertising request sent by a client is received; a first declarative configuration file corresponding to the first advertising request is determined; the first declarative configuration file is parsed to obtain execution flow information and multiple data access strategies corresponding one-to-one with multiple task nodes in the execution flow information, wherein the data access strategies include the advertising data source to be accessed and the data scheduling strategy of the advertising data source; the tasks corresponding to the multiple task nodes are executed according to the execution flow information and the multiple data access strategies to obtain execution results; and the execution results are sent to the client. In this way, the task execution flow for advertising delivery can be defined through a declarative configuration file, allowing the flow logic to be adjusted without modifying the code, i.e., only the declarative configuration file needs to be modified to take effect, thereby improving the flexibility of task scheduling. Furthermore, since multiple task nodes in the execution flow information correspond one-to-one with multiple data access strategies, the task nodes and data access strategies are pre-bound, which can further improve the efficiency of task execution.

[0033] Optionally, the step of executing the tasks corresponding to the multiple task nodes according to the execution flow information and the multiple data access strategies to obtain the execution result includes: A first memory space corresponding to the first advertising request is created based on the first advertising request; Within the first memory space, the tasks corresponding to the multiple task nodes are executed according to the execution flow information and the multiple data access strategies to obtain the execution results; Release the first memory space.

[0034] Specifically, the aforementioned first memory space may be a memory space specifically allocated for the first advertising request, which can be used to store temporary data generated during the execution process.

[0035] The aforementioned release of the first memory space can be used to reclaim memory space and free up system resources.

[0036] Understandably, after creating the first memory space, the original request parameters corresponding to the first ad request can be loaded into the global channel (Shared Context Lane) of the first memory space. The global channel can be used to pass key shared data (such as original request parameters and core user profile information) between the sequentially executed stages in the process (such as entering coarse ranking after the recall stage is completed), ensuring that the necessary context is accurately obtained by subsequent tasks.

[0037] It's important to note that by creating a first memory space corresponding to the first ad request, different ad requests can correspond to different memory spaces. Task groups corresponding to different ad requests can execute in parallel within these different memory spaces without interfering with each other. This memory space can be called a task sandbox, which creates an independent, temporary runtime environment for each parallel task group (e.g., a concurrent multi-path recall strategy) or nested subtasks within a process. Each sandbox possesses its own copy of the data and state required for execution. After the results of subtasks are aggregated or processed within the sandbox, they are merged into the sandbox or global channel as needed. Sandbox resources are immediately reclaimed after the task ends.

[0038] The aforementioned task sandbox mechanism ensures that the states of parallel tasks or nested subtasks do not interfere with each other. The failure, delay, or exception of a task or subtask is usually confined within its sandbox, preventing pollution of the global state or dragging down the entire request processing flow. In other words, it has excellent fault tolerance and also greatly simplifies the complexity of parallel programming and result processing.

[0039] In this embodiment, by creating a first memory space corresponding to the first advertising request and executing tasks corresponding to multiple task nodes within the first memory space, data conflicts with other requests can be avoided, and the execution environments of different advertising requests can be isolated, thereby improving error isolation capabilities and the efficiency of complex process processing. Furthermore, by releasing the first memory space after execution, efficient utilization of system resources can be ensured.

[0040] Optionally, the step of executing the tasks corresponding to the multiple task nodes in the first memory space according to the execution flow information and the multiple data access strategies to obtain the execution result includes: The execution of the multiple task nodes is driven according to the dependency relationships indicated by the execution flow information; Based on the data access strategy corresponding to the first task node, obtain the data information corresponding to the first task node, where the first task node is any one of the plurality of task nodes; Upon completion of the final task node in the execution process information, the execution result is obtained, which is used to indicate the response result of the first advertisement request.

[0041] Specifically, the aforementioned dependencies can be used to indicate the execution order among the multiple task nodes. Driving the execution of the multiple task nodes according to the dependencies indicated by the execution flow information can be understood as automatically scheduling task nodes and executing the tasks corresponding to each task node based on the execution order indicated by the dependencies.

[0042] The aforementioned final task node can be the last task node to be executed in the execution flow information. The completion of the final task node can mean that all subtasks or dependent tasks of the final task node have been executed, and thus all task nodes in the execution flow information have been executed.

[0043] In this implementation, multiple task nodes are driven to execute according to the dependency relationship indicated by the execution flow information. Based on the data access strategy corresponding to the first task node, the data information corresponding to the first task node is obtained. When the final task node is completed, the execution result is obtained. This ensures that the task flow is executed sequentially or in parallel and that the data information is obtained according to the corresponding data access strategy, thereby improving the efficiency of advertising.

[0044] Optionally, obtaining the data information corresponding to the first task node based on the data access strategy corresponding to the first task node includes: When the data access policy corresponding to the first task node indicates the synchronization mode, obtain the address information of the advertising data source from the connection pool corresponding to the first task node; Obtain the data information corresponding to the first task node from the advertising data source; When the data access strategy corresponding to the first task node indicates asynchronous mode, the first task node is submitted to the event queue until the first task node completes execution and the data information is obtained.

[0045] Specifically, the aforementioned synchronization mode can mean that the task node needs to wait for the data to be acquired before it can continue to execute subsequent steps.

[0046] The connection pool mentioned above can be a pre-configured database connection resource pool, and the address information of the advertising data source mentioned above can be the address of the database, such as the IP and port of Redis or the URL of MySQL.

[0047] The above-mentioned method of obtaining the data information corresponding to the first task node from the advertising data source can be to connect to the corresponding advertising data source based on the obtained address information and read the data information required by the first task node from the advertising data source.

[0048] The asynchronous mode described above refers to a scenario where the first task node does not wait for data retrieval to complete, but instead submits the task to an event queue for asynchronous processing by other threads or processes. This event queue can be a queue used to store tasks awaiting processing, such as Kafka or a local thread pool.

[0049] The above-mentioned submission of the first task node to the event queue until the first task node is completed can be achieved by placing the execution request of the first task node into the event queue, which is then processed asynchronously by a background thread, and continuously listening to the event queue until the task corresponding to the first task node is completed, and obtaining the required data information from the result.

[0050] In this implementation, the combination of synchronous and asynchronous modes is indicated by the data access strategy, which can achieve a balance between real-time performance and concurrency in the ad delivery process, thereby improving the overall performance of ad delivery and user experience.

[0051] Optionally, after obtaining the address information of the advertising data source from the connection pool corresponding to the first task node, the method further includes: The advertising data source is monitored using a circuit breaker algorithm; If the advertising data source triggers a preset circuit breaker condition, the advertising data source will be circuit breaker processed.

[0052] Specifically, the aforementioned circuit breaker algorithm can be an algorithm used to monitor the health status of the system, determining whether the current request needs to be interrupted to prevent the spread of the fault. The aforementioned preset circuit breaker conditions can be abnormal steps, slow response, etc. The aforementioned circuit breaker processing can interrupt the current request to prevent the spread of the fault, specifically including degradation processing, i.e., returning default values ​​or cached data, temporarily stopping sending requests to the data source, and attempting to reconnect after the circuit breaker is triggered.

[0053] For example, if a data source is detected to trigger a circuit breaker condition, the circuit breaker determination algorithm activates the circuit breaker, and subsequent requests to access that source are immediately rejected or downgraded according to a preset strategy. The circuit breaker status is recorded, and the system attempts to use a downgraded service or the default value.

[0054] In this embodiment, the advertising data source is monitored by using a circuit breaker determination algorithm. When the advertising data source triggers the preset circuit breaker condition, the advertising data source is processed by circuit breaker, which can prevent the entire advertising system from crashing due to the failure of a single data source and ensure the continuity of advertising delivery through circuit breaker processing.

[0055] Optionally, the method further includes: Obtain a second declarative configuration file, which is an updated version of the first declarative configuration file; If the first ad request has not been completed, the first ad request is executed based on the first declarative configuration file.

[0056] Specifically, obtaining the second declarative configuration file can be done by reading it from a configuration center or storage system, or by receiving a second declarative configuration file uploaded by the administrator. This second declarative configuration file can be used to describe the latest logic of the ad delivery process; specifically, it can be a modified or expanded version based on the original first declarative configuration file.

[0057] In this embodiment, by obtaining the second declarative configuration file, the first advertising request is executed based on the first declarative configuration file if the first advertising request has not been completed. This allows the incomplete advertising request to continue using the old configuration, avoiding task interruption due to configuration changes. Consequently, it can support hot updating of configuration files during system runtime without restarting the service, thereby improving the availability and maintainability of the system.

[0058] For example, the above-described advertising delivery method can be applied to an advertising delivery system, which includes an integrated configuration engine, an intelligent retrieval process engine, an adaptive multi-source I / O scheduler, and a real-time collaboration and resource governance hub. The aforementioned integrated configuration engine defines the advertising retrieval process and resource strategies. The system's architecture is based on a unified configuration system (such as YAML / JSON), which outlines the skeleton of the advertising retrieval process and the data resource access rules supporting its operation. Specifically, the advertising task flow topology uses declarative syntax to precisely define the serial order between retrieval stages (such as recall, coarse ranking, and fine ranking), the parallel processing groups within each stage (such as multi-path recall strategies), and complex nested structures. The multi-source IO access strategy configures a dedicated data access mode for each key task unit (such as user profile acquisition, advertising index query, and real-time feature extraction). Access modes include synchronous query and asynchronous retrieval. Synchronous query is suitable for tasks with strong consistency requirements, such as real-time bidding service calls, while asynchronous retrieval is suitable for high-throughput tasks, such as batch feature pre-computation. Connection parameters include database or cache connection pools, timeout settings, retry strategies, etc. Resource isolation ensures that resources requested by different strategies and priorities do not interfere with each other.

[0059] By adopting a strategy binding mechanism, each task node is precisely associated with a specific IO strategy before execution. When the engine parses the advertising process, it not only knows the tasks that need to be executed, but also automatically associates them with how to schedule resources, achieving a seamless integration of computing efficiency and data access efficiency.

[0060] The aforementioned intelligent retrieval process engine is used to parse and orchestrate the core links. Among them, the topology parsing engine is the command center for efficient execution of ad retrieval, and specifically includes the following functions: Dynamic dependency resolution: Automatically identifies and constructs complex chain dependencies and parallel execution paths between different stages of the advertising retrieval process; Adaptive task orchestration: Constructs a flexible and expandable execution chain tree to adapt to different advertising scenarios (such as search ads or feed ads); Supports deeply nested strategies, for example, in the recall stage, the results of multiple parallel recall strategies need to be integrated serially in the coarse ranking stage; Intelligent context management: Global channels are used to pass key shared contexts, such as original request parameters and basic user profiles, between serial links; Isolation sandboxes are used to create temporary independent spaces for parallel tasks (such as concurrently calling multiple recall models) to prevent state pollution.

[0061] The aforementioned adaptive multi-source I / O scheduler can be used to ensure data access performance and reliability. Addressing the stringent requirements of timeliness and stability for advertising retrieval, the data access layer adopts a synchronous / asynchronous intelligent dual-mode design, specifically including the following functions: Synchronous / Asynchronous Intelligent Adaptation: Synchronous mode can be based on thread pool management to ensure strong consistency and low latency for critical real-time requests (such as sending RTB requests to the bidding engine); Asynchronous mode can be based on event-driven operation to significantly improve the throughput of non-critical paths or batch data reading (such as asynchronously loading cold features); Multi-dimensional Resource Isolation Guarantee: Each request is executed in an independent session to avoid mutual interference; The connection pool adopts a partition isolation design to ensure resource protection.

[0062] The aforementioned real-time collaboration and resource governance hub includes a central collaboration controller, which acts as the glue connecting task flows and data flows, and specifically includes the following functions: Two-way coordinated drive: Tracks task progress and intelligently preloads key data resources required for the next stage (such as pre-fetching features required by the fine-ranking model); Real-time feedback of IO processing results and automatic triggering of subsequent tasks (such as triggering coarse-ranking after recall results are ready); Lossless traffic and high availability design, hot deployment of policies: Automatically creates shadow resource pools and execution environments when updating configurations or models, achieving seamless traffic switching for policy deployment; Fault self-healing: Automatically isolates abnormal data sources (such as slow feature libraries) through circuit breaking, ensuring smooth core links.

[0063] Figure 2 and Figure 3 This is an application flowchart of an advertising placement method provided in an embodiment of this application, such as... Figure 2 and Figure 3 As shown, the execution steps of the above advertising delivery method applied to the system are as follows: Step 1: Request Reception and Initialization (Engine Entry Point): 1. The system receives user advertising requests; 2. The engine creates a unique request ID and an independent execution session sandbox for the current request; 3. Load the original request parameters into the global channel of the session sandbox; Step 2: Configure loading and topology resolution (intelligent search process engine): 4. Determine the applicable ad task flow topology configuration file based on the request context (such as ad placement type, user type); 5. Run the topology parsing algorithm to parse the process definition (including stages, parallel groups, and nesting) in the configuration file and generate the specific execution path; 6. Based on the nodes in the path graph, load the corresponding bound data access strategies (synchronous / asynchronous mode, connection pool configuration, retry strategy, etc.) from the configuration file. Step 3: Task Node Execution: 7. Based on the parsed execution flow information, the engine drives the execution of task nodes according to dependencies, such as user profile acquisition: The central coordinator calls the multi-source I / O scheduler to perform data access based on the data access policy of the task node; The multi-source I / O scheduler selects synchronous or asynchronous mode based on its strategy: Synchronous mode: Obtain connection resources from the corresponding partition connection pool, execute queries / calls directly, return the results to the engine, and block while waiting.

[0064] Asynchronous mode: Submit asynchronous tasks to the event queue, and the engine continues to execute other parallelizable tasks (if any). After the I / O is completed, the event callback triggers the engine. The central coordinator writes the acquired data into the context of the current node in the sandbox environment. For data that needs to be shared in the global channel (such as user basic profiles), the global channel maintenance algorithm is responsible for updating the global channel. Sandbox management ensures that different tasks within a parallel group are context-independent; Step 4: Process Implementation and Exception Handling 8. Proceed through the process step by step according to the execution flow information, process each serial or parallel node, and continuously monitor data source calls using the circuit breaker algorithm; 9. If a data source is detected to trigger a circuit breaker condition (such as abnormal steps or slow response), the circuit breaker determination algorithm activates the circuit breaker. Subsequent requests to access that source will be immediately rejected or downgraded according to the policy, and the circuit breaker status will be recorded. The system will then attempt to use a downgraded service or the default value.

[0065] Step 5: Results Integration and Return: 10. When the final node in the execution process information (such as result assembly) is completed.

[0066] 11. The engine extracts necessary data from the global channel and the final node sandbox to assemble the final ad response result; 12. The engine releases the session sandbox and related resources for this request; 13. Return the final advertising results to the client; Step 6: Hot deployment of policies (operation and maintenance process): 14. The administrator submits the updated process or resource policy configuration file; 15. The engine loads and verifies the new configuration while keeping the old configuration running; 16. The engine creates the corresponding shadow execution environment and shadow resource pool (connection pool, etc.); 17. New requests are gradually routed to the new configuration process for execution, while old requests run in the old process until completion; 18. After all old requests have been processed, the old resource pool and old process engine are seamlessly released, completing the hot switch.

[0067] In this implementation, the system establishes a unified declarative configuration system. The configuration not only clearly defines the entire task topology of ad retrieval (such as serial, parallel, and nested task structures), but also precisely defines the specific data sources (such as user profile databases, ad indexes, real-time features, etc.) and their dedicated access strategies (such as using synchronous or asynchronous modes, specific connection parameters, timeout retry rules, and circuit breaker protection thresholds) required by each key task node in the process. Most importantly, through the strategy binding mechanism in the configuration, the task nodes—what they do—are closely linked to the data access strategies—how to efficiently and reliably obtain the required resources.

[0068] The aforementioned system enhances the flexibility and agility of ad delivery. Changes to business strategies (such as adding recall channels or altering feature combinations) or resource strategies (such as adjusting connection pool size for a specific database) take effect immediately with only configuration file modifications, achieving hot deployment. This eliminates the traditional cycle of modifying, compiling, and deploying code, improving response time to minutes. Simultaneously, this pre-bound strategy ensures the execution engine knows optimally how to acquire data from the outset, laying the foundation for efficient execution. Furthermore, the multi-source I / O scheduler features customizable synchronous / asynchronous I / O access capabilities, providing thread-safe access interfaces that significantly optimize performance and improve resource utilization. End-to-end request processing latency is reduced by an average of over 40%, with particularly strong protection during the highly latency-critical bidding phase, consistently remaining below 20ms. Moreover, by establishing a fine-grained context management and execution environment isolation system, and employing global channels and parallel / nested architecture patterns, the system's error isolation capability is improved by 90%, and its efficiency in handling complex processes is increased by 50%.

[0069] See Figure 4 , Figure 4 This is a schematic diagram of the structure of an advertising delivery device provided in an embodiment of this application, as shown below. Figure 4As shown, the advertising delivery device 400 includes: Receiver module 401 is used to receive the first advertisement request sent by the client; The determining module 402 is used to determine the first declarative configuration file corresponding to the first advertising request; The parsing module 403 is used to parse the first declarative configuration file to obtain execution flow information and multiple data access strategies corresponding to multiple task nodes in the execution flow information. The data access strategies include the advertising data source to be accessed and the data scheduling strategy of the advertising data source. The first execution module 404 is used to execute the tasks corresponding to the multiple task nodes according to the execution process information and the multiple data access strategies, and obtain the execution results; The sending module 405 is used to send the execution result to the client.

[0070] Optionally, the first execution module 404 includes: A creation unit is used to create a first memory space corresponding to the first advertising request based on the first advertising request; An execution unit is configured to execute the tasks corresponding to the multiple task nodes within the first memory space according to the execution flow information and the multiple data access strategies, and obtain the execution results; A release unit is used to release the first memory space.

[0071] Optionally, the execution unit is specifically used for: The execution of the multiple task nodes is driven according to the dependency relationships indicated by the execution flow information; Based on the data access strategy corresponding to the first task node, obtain the data information corresponding to the first task node, where the first task node is any one of the plurality of task nodes; Upon completion of the final task node in the execution process information, the execution result is obtained, which is used to indicate the response result of the first advertisement request.

[0072] Optionally, obtaining the data information corresponding to the first task node based on the data access strategy corresponding to the first task node includes: When the data access policy corresponding to the first task node indicates the synchronization mode, obtain the address information of the advertising data source from the connection pool corresponding to the first task node; Obtain the data information corresponding to the first task node from the advertising data source; When the data access strategy corresponding to the first task node indicates asynchronous mode, the first task node is submitted to the event queue until the first task node completes execution and the data information is obtained.

[0073] Optionally, after obtaining the address information of the advertising data source from the connection pool corresponding to the first task node, the step of obtaining the data information corresponding to the first task node based on the data access strategy corresponding to the first task node further includes: The advertising data source is monitored using a circuit breaker algorithm; If the advertising data source triggers a preset circuit breaker condition, the advertising data source will be circuit breaker processed.

[0074] Optionally, the advertising delivery device 400 further includes: The acquisition module is used to acquire a second declarative configuration file, which is an updated version of the first declarative configuration file; The second execution module is used to execute the first advertising request based on the first declarative configuration file if the first advertising request has not been completed.

[0075] It should be noted that the advertising delivery device provided in this application embodiment is a device capable of executing the above-described advertising delivery method. Therefore, all implementation methods in the above-described advertising delivery method embodiments are applicable to this device and can achieve the same or similar beneficial effects. To avoid repetition, this embodiment will not elaborate further.

[0076] This application also provides an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, it implements the various processes of the above-described advertising delivery method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0077] This application also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described advertising delivery method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0078] This application also provides a computer program product, including computer instructions. When executed by a processor, the computer instructions implement the various processes of the above-described advertising delivery method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0079] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0080] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0081] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. An advertising placement method, characterized in that, include: Receive the first advertisement request sent by the client; Determine the first declarative configuration file corresponding to the first advertising request; The first declarative configuration file is parsed to obtain execution flow information and multiple data access strategies corresponding to multiple task nodes in the execution flow information. The data access strategies include the advertising data source to be accessed and the data scheduling strategy of the advertising data source. Execute the tasks corresponding to the multiple task nodes according to the execution flow information and the multiple data access strategies, and obtain the execution results; The execution result is sent to the client.

2. The method according to claim 1, characterized in that, The step of executing the tasks corresponding to the multiple task nodes according to the execution flow information and the multiple data access strategies, and obtaining the execution results, includes: A first memory space corresponding to the first advertising request is created based on the first advertising request; Within the first memory space, the tasks corresponding to the multiple task nodes are executed according to the execution flow information and the multiple data access strategies to obtain the execution results; Release the first memory space.

3. The method according to claim 2, characterized in that, The step of executing the tasks corresponding to the multiple task nodes within the first memory space according to the execution flow information and the multiple data access strategies to obtain the execution result includes: The execution of the multiple task nodes is driven according to the dependency relationships indicated by the execution flow information; Based on the data access strategy corresponding to the first task node, obtain the data information corresponding to the first task node, where the first task node is any one of the plurality of task nodes; Upon completion of the final task node in the execution process information, the execution result is obtained, which is used to indicate the response result of the first advertisement request.

4. The method according to claim 3, characterized in that, The step of obtaining data information corresponding to the first task node based on the data access strategy corresponding to the first task node includes: When the data scheduling strategy in the data access strategy corresponding to the first task node indicates the synchronization mode, the address information of the advertising data source is obtained from the connection pool corresponding to the first task node; Obtain the data information corresponding to the first task node from the advertising data source; When the data access strategy corresponding to the first task node indicates asynchronous mode, the first task node is submitted to the event queue until the first task node completes execution and the data information is obtained.

5. The method according to claim 4, characterized in that, After obtaining the address information of the advertising data source from the connection pool corresponding to the first task node, the method further includes: The advertising data source is monitored using a circuit breaker algorithm; If the advertising data source triggers a preset circuit breaker condition, the advertising data source will be circuit breaker processed.

6. The method according to claim 1, characterized in that, The method further includes: Obtain a second declarative configuration file, which is an updated version of the first declarative configuration file; If the first ad request has not been completed, the first ad request is executed based on the first declarative configuration file.

7. An advertising delivery device, characterized in that, include: The receiving module is used to receive the first advertising request sent by the client; The determination module is used to determine the first declarative configuration file corresponding to the first advertisement request; The parsing module is used to parse the first declarative configuration file to obtain execution flow information and multiple data access strategies corresponding to multiple task nodes in the execution flow information. The data access strategies include the advertising data source to be accessed and the data scheduling strategy of the advertising data source. The first execution module is used to execute the tasks corresponding to the multiple task nodes according to the execution process information and the multiple data access strategies, and obtain the execution results; The sending module is used to send the execution result to the client.

8. An electronic device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the advertising delivery method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the advertising delivery method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the advertising delivery method as described in any one of claims 1 to 6.

Citation Information

Cited By

  • Marketing user portrait dynamic updating method based on multi-source data fusion

    CN122240935A