An advertisement scheduling method for an AI intelligent programming platform interaction waiting time slot
By monitoring the lifecycle status of intelligent agent tasks and predicting waiting time slots, advertising content is dynamically matched to the waiting interaction area of the AI intelligent programming platform. This solves the problems of insufficient resource utilization in the waiting interface and imprecise advertising matching, achieving efficient advertising display and privacy protection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-25
- Publication Date
- 2026-07-24
AI Technical Summary
Existing AI-powered programming platforms suffer from insufficient utilization of interface resources during interactive waiting periods, lack of refined advertising content, easy obstruction of user input, and risk of leakage of trade secrets.
By monitoring the lifecycle state of intelligent agent tasks, predicting waiting time slots and generating advertising scheduling decisions, non-intrusive rendering technology is used to display advertisements in waiting interaction areas. Combined with user task semantics and compliance rules, dynamic matching and termination control of advertisements are achieved.
It improves the utilization rate of waiting time slot resources, avoids advertising interference with the programming experience, enhances the accuracy of advertising matching, protects code and project privacy, and achieves controllability and measurability of advertising delivery.
Smart Images

Figure CN122453464A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence interaction, and in particular to an advertising scheduling method for the waiting time slots of AI intelligent programming platforms. Background Technology
[0002] With the development of large language models and intelligent agent technologies, AI-powered intelligent programming platforms have gradually evolved from traditional code completion tools into comprehensive development environments capable of understanding natural language requirements, automatically generating code, calling tools, executing tests, building previews, and fixing errors. Users can describe product requirements, page styles, data interfaces, or business logic using natural language, and the platform's internal intelligent agents automatically complete requirement decomposition, file location, code generation, runtime debugging, result preview, and iterative optimization based on user intent. However, existing AI-powered intelligent programming platforms generally suffer from long waiting times and insufficient utilization of interface resources during interaction. When performing complex tasks, intelligent agents typically need to call large language models, retrieve context, read files, modify code, execute commands, analyze error logs, regenerate code, and build previews. These processes can last from several seconds to tens of seconds, or even longer. During this time, users usually only see loading animations, progress bars, text prompts, or blank waiting interfaces. Although this waiting time is brief, it accumulates significantly in high-frequency programming interaction scenarios, possessing high attention value and commercial potential.
[0003] Existing waiting interfaces typically only display prompts such as "Generating," "Thinking," or "Running normally," without fine-grained identification of waiting time slots or dynamic adjustment of displayed content based on waiting duration. Furthermore, directly using pop-ups, overlays, or full-screen ads can easily obstruct user input, obscure code, and affect result viewing, thus damaging the core experience of the intelligent programming platform. In addition, general advertising recommendation systems rely primarily on user profiles, page content, or historical click behavior, while key contexts in AI intelligent programming platforms include the current task type, code language, development framework, agent execution status, and estimated waiting time. Without understanding this context, ad content may be irrelevant to the user's current task, reducing click-through rates and acceptance. Moreover, intelligent programming platforms typically handle source code, interface information, configuration files, business logic, enterprise project files, and private repository content. Directly uploading user code or complete prompts for ad matching could lead to the leakage of trade secrets, personal information, or security-sensitive information. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide an advertising scheduling method for interactive waiting time slots of AI intelligent programming platforms, thus solving the deficiencies of the prior art.
[0005] The objective of this invention is achieved through the following technical solution: an advertising scheduling method for interactive waiting slots in AI intelligent programming platforms, the method comprising:
[0006] S1. Receive user requests to generate corresponding intelligent agent tasks, and monitor the lifecycle status of intelligent agent tasks during execution.
[0007] S2. Based on lifecycle state, task complexity, context length, model call queue, number of tool calls, historical response time, and current system load, predict the available waiting time slots before the agent returns the result;
[0008] S3. Generate ad scheduling decisions based on available waiting time slots, user task semantics, project context, ad candidate library, ad compliance rules, user preferences, and frequency control strategies;
[0009] S4. Without blocking the execution chain of the intelligent agent, changing the focus of the code editing area, or delaying the return of results, render the advertising content in the waiting interaction area of the AI intelligent programming platform.
[0010] S5. When the intelligent agent returns the result, or the user actively interrupts the task, or the waiting time slot ends, automatically terminate, fold, replace, or postpone the advertising content, and record the desensitized advertising exposure, clicks, dwell time, and conversion data.
[0011] The prediction process for available waiting time slots includes: quantifying lifecycle state, task complexity, context length, model call queue, number of tool calls, historical response time and current system load into feature values, then calculating the expected remaining waiting time before the agent returns the result, and then subtracting the result return safety buffer time and the advertisement loading / rendering time to obtain the final available waiting time slot;
[0012] The process of generating the advertising scheduling decision includes:
[0013] Let the ad candidate pool be , Let i represent the i-th advertisement, where i ranges from 1 to n. After filtering based on compliance rules, user preferences, and frequency control, the set of advertisements that can be placed is:
[0014] ,
[0015] in Indicates advertising Does it meet compliance rules? Indicates advertising Does it match user preferences? Indicates advertising Does it meet the frequency control requirements?
[0016] Encode user task semantics and project context into task vectors. , Representing user task semantics, Indicates the project context;
[0017] Encode the ad content into ad vectors. , Represents the ad vector;
[0018] The semantic relevance between computational tasks and advertisements is ;
[0019] Calculate the overall ranking score of the advertisements as follows: ,in, This indicates the overall ranking score of the advertisements. Indicates advertising semantic relevance, Indicates advertising Commercial revenue, Indicates advertising The expected interactive effect Indicates advertising User preference matching degree Indicates advertising Compliance risks Indicates advertising Interference risk Indicates advertising Frequency penalty , , , , , , They represent , , , , , , Weight parameters;
[0020] The advertisement with the highest overall score was ultimately selected as , This indicates the advertisement with the highest overall score;
[0021] Then based on the available waiting time slots The display format is determined as follows:
[0022] ,
[0023] in, Indicates the minimum display time. and These represent the thresholds for dividing short-time and medium-time waiting slots, and medium-time and long-time waiting slots, respectively.
[0024] Finally, the advertising scheduling decision is represented as follows:
[0025] ,
[0026] in, Indicates advertising scheduling decisions, Indicates whether to display an advertisement. This indicates the final selected advertisement. Indicates the display format, Indicates the display location. Indicates the display duration. Indicates the interaction method. This indicates the termination condition.
[0027] The available waiting time slots are calculated by a waiting time slot prediction model. The input features of the waiting time slot prediction model include at least: the length of the text requested by the user, the number of code files, the proportion of the context window occupied, the expected number of tokens to be called in the large language model, the number of intelligent agent tool calls, whether a test needs to be executed, whether a preview needs to be built, the current model service queue length, the average time of similar historical tasks, and the current network latency.
[0028] The waiting time slot prediction model outputs the estimated waiting time before the agent returns, and divides the waiting time slots into short-time waiting time slots, medium-time waiting time slots, and long-time waiting time slots according to the waiting time.
[0029] The advertising scheduling decision includes whether to display the advertisement, the display location, the display format, the display duration, the advertisement content type, the interaction method, and the termination conditions;
[0030] Short waiting slots correspond to lightweight ad prompts or brand exposure; medium waiting slots correspond to card-style ads, tool recommendation ads, or course recommendation ads; long waiting slots correspond to interactive ads, case study ads, video ads, or developer service guidance content.
[0031] The user task semantics are obtained by semantically encoding the user input content, current project type, code language, target framework, development scenario, and agent task type;
[0032] The advertising candidate library contains pre-defined industry tags, technology stack tags, user stage tags, advertising format tags, billing strategy tags, and compliance level tags. Ad recall is performed based on the similarity between the user task semantic vector and the advertising candidate content vector, and a comprehensive ranking score is generated by combining bidding, expected click-through rate, user preferences, frequency control, and compliance penalty items.
[0033] The comprehensive ranking score is determined by a combination of semantic relevance score, commercial revenue score, user acceptance score, expected interaction score, compliance risk penalty, interference risk penalty, and frequency exceeding penalty. One or more ad contents are selected from the ad candidate library according to the comprehensive ranking score, and the final ad arrangement is performed based on the waiting time slot length and display area capacity.
[0034] The waiting interaction area includes an agent loading area, a code generation progress area, a preview build waiting area, a sidebar recommendation area, a bottom status bar area, a task execution timeline area, or a transition card area before the result is returned; the advertising content is displayed in a non-intrusive manner, without covering the main input area of the code editor, without blocking user input, without taking up keyboard focus, without changing the content of the code file, and without affecting the code generation, compilation, testing, and deployment process.
[0035] The method also includes an ad pre-fetching mechanism:
[0036] When the agent enters the task queuing, context retrieval, or tool invocation state, the system asynchronously requests candidate ad content in the background and caches the ad material in the front-end local cache or edge cache. When the waiting time slot reaches the preset display threshold, the system directly reads the ad content from the cache for rendering, so as to reduce ad loading delay and avoid ad requests affecting the speed of agent result return.
[0037] The method also includes an advertising lifecycle control mechanism:
[0038] When any of the following conditions are met: the agent returns the final result, the agent enters a state requiring user confirmation, the user clicks to stop generation, the user switches projects, the user closes the waiting panel, the user starts editing code, the waiting time slot is insufficient to fully display the current advertisement, the advertisement loading is abnormal, or the advertisement content compliance verification fails, the system will automatically terminate or adjust the advertisement.
[0039] When the agent returns the result ahead of schedule, the system immediately collapses the ad content and prioritizes displaying the generated code, modification suggestions, bug fix results, or preview links; when the agent waits longer than the estimated time, the system replaces the short ad with a long ad or upgrades the brand prompt to an interactive recommendation card.
[0040] The method also includes privacy compliance control mechanisms:
[0041] The parameters of the advertising request are anonymized, retaining only coarse-grained task tags, technology stack tags, and waiting time slot types, while filtering out keys, tokens, database addresses, account passwords, personal information, company names, and private interface addresses in the code;
[0042] For enterprise users, the enterprise administrator can configure which platform services, partner services, or internal promotional content are allowed to be displayed. For any of the highly sensitive tasks involving payment, authentication, vulnerability patching, government data, medical data, financial data, or private repositories, personalized advertising will not be performed.
[0043] The method also includes an advertising attribution and strategy optimization mechanism:
[0044] A1. Recorded metrics include ad impressions, effective exposure duration, clicks, closes, redirects, conversions, waiting time slot type corresponding to ad display, task type corresponding to ad display, whether users continue to complete AI agent tasks after ad display, whether ads affect user interruption rate, and whether ads affect AI agent result viewing rate.
[0045] A2. Advertising and task scenarios For statistical purposes, metrics such as ad impressions, clicks, closes, conversions, dwell times, user interruptions, and result views are recorded. Based on the metrics from step A1, a strategy optimization score for the ad in a specific scenario is calculated, and this score is then fed back into the next round of ad recall and ranking processes.
[0046] The present invention has the following advantages:
[0047] 1. Improve the utilization rate of waiting time slots: Transform the originally idle waiting time in the AI intelligent programming platform into schedulable commercial display resources, thereby enhancing the overall commercial value of the platform.
[0048] 2. Avoid ads interfering with the programming experience: Through non-intrusive rendering, focus protection, result priority return, and automatic ad termination mechanisms, ads are prevented from obscuring code, blocking input, or delaying the display of agent results.
[0049] 3. Improve ad matching accuracy: The system not only considers user profiles, but also combines the current programming task, technology stack, project stage and agent execution status to make the ad content more closely match the developer's current needs.
[0050] 4. Protect code and project privacy: Ad matching only uses anonymized task tags, technology stack tags, and waiting slot types, and does not directly upload complete code, complete prompt words, project files, and sensitive configurations.
[0051] 5. Improve the controllability and measurability of ad placement: The system can record ad exposure, clicks, dwell time and conversion data, and achieve traceable attribution through waiting time slot identifiers and task session identifiers.
[0052] 6. Adaptable to enterprise-level AI programming platform scenarios: The system can set up an advertising whitelist for enterprise users, disable personalized ads, restrict third-party ads, or only display services within the platform, thereby meeting enterprise security and compliance requirements. Attached Figure Description
[0053] Figure 1 This is a schematic diagram of the process of the present invention. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, 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 a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of this application provided below with reference to the accompanying drawings is not intended to limit the scope of protection of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application. The present invention will be further described below with reference to the accompanying drawings.
[0055] like Figure 1 As shown, this invention specifically relates to an advertising scheduling method for interactive waiting slots in AI intelligent programming platforms, the method comprising:
[0056] S1. Receive natural language programming requests, code modification requests, run debugging requests, page generation requests, or project building requests from users in the AI intelligent programming platform, and generate corresponding intelligent agent tasks;
[0057] Users input natural language requests into the AI-powered programming platform, such as "Help me create a company website homepage," "Help me modify the style of this login page," "Run the project and fix errors," or "Generate front-end call code based on this API documentation." After receiving the user's request, the platform generates an intelligent agent task.
[0058] The intelligent agent task includes a task identifier, user session identifier, project identifier, task type, request text, context reference, code file scope, tool invocation permissions, and expected output type. Task types can include one or more of the following: page generation, component generation, backend interface development, database modeling, code interpretation, bug fixing, test generation, deployment configuration, documentation generation, and project refactoring.
[0059] S2. Monitor the lifecycle states of the intelligent agent's tasks during execution. These lifecycle states include one or more of the following: task queuing state, requirement understanding state, context retrieval state, planning state, code generation state, tool invocation state, compilation and testing state, preview and build state, bug fixing state, and result return state. The system assigns a state identifier to each state and records the start time, end time, state duration, and state output summary. This state data is used for both waiting slot prediction and controlling the triggering, termination, and reflow of ad displays.
[0060] S3. Based on lifecycle state, task complexity, context length, model call queue, number of tool calls, historical response time, and current system load, predict the available waiting time slots before the agent returns results;
[0061] The system first quantifies the lifecycle state, task complexity, context length, model call queue, number of tool calls, historical response time, and current system load into feature values. Then, it calculates the estimated remaining waiting time before the agent returns the result, and deducts the result return safety buffer time and the advertisement loading / rendering time to obtain the final available waiting time slot.
[0062] The specific implementation process is as follows:
[0063] Let the lifecycle state characteristics be The task complexity is Context length is The model call queue is The number of tool calls is Historical response time is The current system load is Then the estimated remaining waiting time is... Represented as:
[0064] ,
[0065] in, For preset weight parameters, , , , , , , They are respectively , , , , , , The corresponding weight parameters;
[0066] pass The available waiting time slots are calculated, i.e. ,in, This indicates that the result will be returned within a safe buffer period. Indicates the ad loading or rendering time. If the display time is less than the preset minimum, no advertisement will be displayed or only a brief notification will be shown; if If the time is greater than or equal to the preset minimum display time, then according to Generate advertising scheduling decisions.
[0067] Furthermore, the available waiting slots can be calculated through a waiting slot prediction model. The input features of the waiting slot prediction model include at least: the length of the text requested by the user, the number of code files, the proportion of context window occupancy, the expected number of tokens to be called from the large language model, the number of intelligent agent tool calls, whether a test needs to be executed, whether a preview needs to be built, the current model service queue length, the average time of similar historical tasks, and the current network latency.
[0068] The waiting time slot prediction model outputs the estimated waiting time before the agent returns, and divides the waiting time slots into short-time waiting time slots, medium-time waiting time slots, and long-time waiting time slots according to the waiting time.
[0069] S4. Generate ad scheduling decisions based on available waiting time slots, user task semantics, project context, ad candidate library, ad compliance rules, user preferences, and frequency control strategies;
[0070] The system first filters the candidate ad library, then calculates the comprehensive score of each candidate ad, and selects the ad generation scheduling decision with the highest score that is suitable for the current waiting time slot.
[0071] Specifically, it includes the following:
[0072] Let the ad candidate pool be , Let i represent the i-th advertisement, where i ranges from 1 to n. After filtering based on compliance rules, user preferences, and frequency control, the set of advertisements that can be placed is:
[0073] ,
[0074] in Indicates advertising Does it meet compliance rules? Indicates advertising Does it match user preferences? Indicates advertising Does it meet the frequency control requirements? A value of 1 indicates that it meets the requirements, and a value of 0 indicates that it does not.
[0075] Encode user task semantics and project context into task vectors. , Representing user task semantics, Indicates the project context;
[0076] Encode the ad content into ad vectors. ;
[0077] The semantic relevance between computational tasks and advertisements is ;
[0078] Then calculate the overall ranking score of the advertisements. ;
[0079] in Indicates advertising semantic relevance, Indicates advertising Commercial revenue, Indicates advertising The expected interactive effect Indicates advertising User preference matching degree Indicates advertising Compliance risks Indicates advertising Interference risk Indicates advertising Frequency penalty , , , , , , They represent , , , , , , The weight parameters.
[0080] The advertisement with the highest overall score was ultimately selected as ;
[0081] Then based on the available waiting time slots The display format is determined as follows:
[0082] ,
[0083] in Indicates the minimum display time. and These represent the thresholds for dividing short-time and medium-time waiting slots, and medium-time and long-time waiting slots, respectively.
[0084] The advertising scheduling decision is represented as follows:
[0085] ,
[0086] in, Indicates advertising scheduling decisions, Indicates whether to display an advertisement. This indicates the final selected advertisement. Indicates the display format, Indicates the display location. Indicates the display duration. Indicates the interaction method. This indicates the termination condition.
[0087] Furthermore, advertising scheduling decisions include whether to display an ad, the display location, the display format, the display duration, the ad content type, the interaction method, and the termination conditions;
[0088] Short waiting slots correspond to lightweight ad prompts or brand exposure; medium waiting slots correspond to card-style ads, tool recommendation ads, or course recommendation ads; long waiting slots correspond to interactive ads, case study ads, video ads, or developer service guidance content.
[0089] User task semantics are obtained by semantically encoding user input, current project type, coding language, target framework, development scenario, and agent task type.
[0090] The ad content in the ad candidate library is pre-labeled with industry tags, technology stack tags, user stage tags, ad format tags, billing strategy tags, and compliance level tags; ad recall is performed based on the similarity between the user task semantic vector and the ad candidate content vector, and a comprehensive ranking score is generated by combining bidding, expected click-through rate, user preferences, frequency control, and compliance penalty items.
[0091] Furthermore, each ad record in the ad candidate pool includes an ad identifier, advertiser identifier, ad title, ad description, ad creative, landing page URL, industry tags, technology stack tags, task stage tags, user role tags, billing method, campaign budget, campaign time range, compliance level, enterprise whitelist, prohibited scenarios, creative format, estimated click-through rate, and historical conversion rate. The system performs similarity recall based on task semantic vectors and ad content vectors, and combines this with advertiser bidding and display constraints to form a set of candidate ads.
[0092] The overall ranking score is determined by a combination of semantic relevance score, commercial benefit score, user acceptance score, expected interaction score, compliance risk penalty, interference risk penalty, and frequency exceeding penalty. One or more ad contents are selected from the ad candidate library according to the overall ranking score, and the final ad arrangement is performed based on the waiting time slot length and display area capacity.
[0093] S5. Without blocking the execution chain of the intelligent agent, changing the focus of the code editing area, or delaying the return of results, render the advertising content in the waiting interaction area of the AI intelligent programming platform.
[0094] Furthermore, the waiting interaction areas include the agent loading area, code generation progress area, preview build waiting area, sidebar recommendation area, bottom status bar area, task execution timeline area, or transition card area before result return. Ad content is displayed in a non-intrusive manner. During ad display, the system implements protective measures including: not covering the main input area of the code editor, not blocking user input, not preempting keyboard focus, not changing the code file content, not affecting the code generation, compilation, testing, and deployment process, and delaying the agent result return. Ad content has clear "Advertisement," "Sponsored," or "Promotion" labels.
[0095] Optional display locations include the agent waiting card area, below the code generation progress bar, the right auxiliary panel, the bottom status bar, the preview build waiting page, the task execution timeline, the agent's thought process folded area, and the lightweight prompt area before the result is returned.
[0096] S6. When the intelligent agent returns the result, or the user actively interrupts the task, or the waiting time slot ends, automatically terminate, fold, replace, or postpone the advertising content, and record the desensitized advertising exposure, clicks, dwell time, and conversion data.
[0097] S7. Ad pre-fetching mechanism: When the agent enters the task queuing, context retrieval, or tool call state, the system asynchronously requests ad candidate content in the background and caches the ad material in the front-end local cache or edge cache; when the waiting time slot reaches the preset display threshold, the system directly reads the ad content from the cache for rendering, so as to reduce ad loading delay and avoid ad requests affecting the agent's result return speed.
[0098] S8. Advertising lifecycle control mechanism;
[0099] When any of the following conditions are met: the agent returns the final result, the agent enters a state requiring user confirmation, the user clicks to stop generation, the user switches projects, the user closes the waiting panel, the user starts editing code, the waiting time slot is insufficient to fully display the current advertisement, the advertisement loading is abnormal, or the advertisement content compliance verification fails, the system will automatically terminate or adjust the advertisement.
[0100] When the agent returns the result ahead of schedule, the system immediately collapses the ad content and prioritizes displaying the generated code, modification suggestions, bug fix results, or preview links; when the agent waits longer than the estimated time, the system replaces the short ad with a long ad or upgrades the brand prompt to an interactive recommendation card.
[0101] S9, Privacy Compliance Control Mechanism;
[0102] The parameters of the advertising request are anonymized, retaining only coarse-grained task tags, technology stack tags, and waiting time slot types, while filtering out keys, tokens, database addresses, account passwords, personal information, company names, and private interface addresses in the code;
[0103] For enterprise users, enterprise administrators can configure which platform services, partner services, or internal promotional content are allowed to be displayed. For highly sensitive tasks involving payment, authentication, vulnerability repair, government data, medical data, financial data, or private repositories, personalized advertising will not be provided.
[0104] S10, Advertising Attribution and Strategy Optimization Mechanism;
[0105] The recorded metrics include ad impressions, effective exposure duration, clicks, closes, redirects, conversions, the type of waiting time slot corresponding to the ad display, the type of task corresponding to the ad display, whether users continue to complete the agent task after the ad display, whether the ad affects the user interruption rate, and whether the ad affects the agent result viewing rate.
[0106] The system uses advertisements and task scenarios As a statistical dimension, it records metrics such as ad impressions, clicks, closes, conversions, dwell times, user interruptions, and result viewings. Based on these metrics, it calculates the strategy optimization score for the ad in a specific scenario and then feeds this score back into the next round of ad recall and ranking.
[0107] Set up an advertisement In the mission scenario The following are the number of impressions, clicks, closes, conversions, user interruptions, and result views: , , , , , .
[0108] The click-through rate, close rate, conversion rate, interruption rate, and result view rate are respectively , , , , ;
[0109] The advertising strategy optimization score is calculated as follows:
[0110] ,
[0111] in, Indicates advertising In the mission scenario The strategy below optimizes the score. This represents the normalized score for the duration of stay. , , , , , They are respectively , , , , , The weight parameters.
[0112] The ad display priority weight in this scenario is updated based on the strategy optimization score:
[0113] ,
[0114] in, This indicates the updated display priority weight. This indicates the display priority weight before the update. Indicates the learning rate. Representing the task scenario Average optimization score for ads.
[0115] When an ad has an excessively high close rate or interruption rate in a certain task scenario, the system reduces its weight as follows:
[0116] ,
[0117]
[0118] When an ad has a high click-through rate or conversion rate in a specific task scenario, the system increases its weight as follows:
[0119] ,
[0120] ,
[0121] in, , , These are the first, second, and third preset thresholds, respectively. This is the weighting adjustment coefficient.
[0122] Therefore, the optimized advertising strategy is expressed as follows:
[0123] .
[0124] The system will update the weights Used for subsequent ad recall, ranking, display frequency, and display format selection. If a certain type of ad has a high close rate or interruption rate in bug fix waiting scenarios, its display priority in that scenario will be reduced; if a tool-recommended ad has a high click-through rate or conversion rate in React page generation scenarios, its recall and ranking weight in React page generation and similar scenarios will be increased.
[0125] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and improvements, and can be altered within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.
Claims
1. An advertising scheduling method for interactive waiting slots in AI intelligent programming platforms, characterized in that: The method includes: S1. Receive user requests to generate corresponding intelligent agent tasks, and monitor the lifecycle status of intelligent agent tasks during execution. S2. Based on lifecycle state, task complexity, context length, model call queue, number of tool calls, historical response time, and current system load, predict the available waiting time slots before the agent returns the result; S3. Generate ad scheduling decisions based on available waiting time slots, user task semantics, project context, ad candidate library, ad compliance rules, user preferences, and frequency control strategies; S4. Without blocking the execution chain of the intelligent agent, changing the focus of the code editing area, or delaying the return of results, render the advertising content in the waiting interaction area of the AI intelligent programming platform. S5. When the set conditions are met, automatically terminate, fold, replace, or postpone the advertising content, and record the desensitized advertising exposure, clicks, dwell time, and conversion data. The set conditions include any one of the following: the intelligent agent returns the result, the user actively interrupts the task, or the waiting time slot ends.
2. The advertising scheduling method for interactive waiting slots of an AI intelligent programming platform according to claim 1, characterized in that: The prediction process for available waiting time slots includes: quantifying lifecycle state, task complexity, context length, model call queue, number of tool calls, historical response time and current system load into feature values, then calculating the expected remaining waiting time before the agent returns the result, and then subtracting the result return safety buffer time and the advertisement loading / rendering time to obtain the final available waiting time slot; The process of generating the advertising scheduling decision includes: Let the ad candidate pool be , This represents the i-th advertisement, where i ranges from 1 to n. After filtering based on compliance rules, user preferences, and frequency control, the set of ads that can be placed is: , in Indicates advertising Does it meet compliance rules? Indicates advertising Does it match user preferences? Indicates advertising Does it meet the frequency control requirements? Encode user task semantics and project context into task vectors. , Representing user task semantics, Indicates the project context; Encode the ad content into ad vectors. , Represents the ad vector; The semantic relevance between computational tasks and advertisements is ; Calculate the overall ranking score of the advertisements as follows: ,in, This indicates the overall ranking score of the advertisements. Indicates advertising semantic relevance, Indicates advertising Commercial revenue, Indicates advertising The expected interactive effect Indicates advertising User preference matching degree Indicates advertising Compliance risks Indicates advertising Interference risk Indicates advertising Frequency penalty , , , , , , They represent , , , , , , Weight parameters; The advertisement with the highest overall score was ultimately selected as , This indicates the advertisement with the highest overall score; Then based on the available waiting time slots The display format is determined as follows: , in, Indicates the minimum display time. and These represent the thresholds for dividing short-time and medium-time waiting slots, and medium-time and long-time waiting slots, respectively. Finally, the advertising scheduling decision is represented as follows: , in, Indicates advertising scheduling decisions, Indicates whether to display an advertisement. This indicates the final selected advertisement. Indicates the display format, Indicates the display location. Indicates the display duration. Indicates the interaction method. This indicates the termination condition.
3. The advertising scheduling method for interactive waiting slots of an AI intelligent programming platform according to claim 1, characterized in that: The available waiting time slots are calculated by a waiting time slot prediction model. The input features of the waiting time slot prediction model include at least: the length of the text requested by the user, the number of code files, the proportion of the context window occupied, the expected number of tokens to be called in the large language model, the number of intelligent agent tool calls, whether a test needs to be executed, whether a preview needs to be built, the current model service queue length, the average time of similar historical tasks, and the current network latency. The waiting time slot prediction model outputs the estimated waiting time before the agent returns, and divides the waiting time slots into short-time waiting time slots, medium-time waiting time slots, and long-time waiting time slots according to the waiting time. The advertising scheduling decision includes whether to display the advertisement, the display location, the display format, the display duration, the advertisement content type, the interaction method, and the termination conditions; Short waiting slots correspond to lightweight ad prompts or brand exposure; medium waiting slots correspond to card-style ads, tool recommendation ads, or course recommendation ads; long waiting slots correspond to interactive ads, case study ads, video ads, or developer service guidance content.
4. The advertising scheduling method for interactive waiting slots of an AI intelligent programming platform according to claim 1, characterized in that: The user task semantics are obtained by semantically encoding the user input content, current project type, code language, target framework, development scenario, and agent task type; The advertising candidate library contains advertising content pre-labeled with industry tags, technology stack tags, user stage tags, advertising format tags, billing strategy tags, and compliance level tags; Ad recall is performed based on the similarity between the user task semantic vector and the ad candidate content vector, and a comprehensive ranking score is generated by combining bidding, expected click-through rate, user preference, frequency control and compliance penalty items.
5. The advertising scheduling method for interactive waiting slots of an AI intelligent programming platform according to claim 4, characterized in that: The comprehensive ranking score is determined by a combination of semantic relevance score, commercial revenue score, user acceptance score, expected interaction score, compliance risk penalty, interference risk penalty, and frequency exceeding penalty. One or more ad contents are selected from the ad candidate library according to the comprehensive ranking score, and the final ad arrangement is performed based on the waiting time slot length and display area capacity.
6. The advertising scheduling method for interactive waiting slots of an AI intelligent programming platform according to claim 1, characterized in that: The waiting interaction area includes an agent loading area, a code generation progress area, a preview build waiting area, a sidebar recommendation area, a bottom status bar area, a task execution timeline area, or a transition card area before the result is returned; the advertising content is displayed in a non-intrusive manner, without covering the main input area of the code editor, without blocking user input, without taking up keyboard focus, without changing the content of the code file, and without affecting the code generation, compilation, testing, and deployment process.
7. An advertising scheduling method for interactive waiting slots of an AI intelligent programming platform according to any one of claims 1-6, characterized in that: The method also includes an ad pre-fetching mechanism: When the agent enters the task queuing, context retrieval, or tool invocation state, the system asynchronously requests candidate ad content in the background and caches the ad material in the front-end local cache or edge cache. When the waiting time slot reaches the preset display threshold, the system directly reads the ad content from the cache for rendering, so as to reduce ad loading delay and avoid ad requests affecting the speed of agent result return.
8. An advertising scheduling method for interactive waiting slots of an AI intelligent programming platform according to any one of claims 1-6, characterized in that: The method also includes an advertising lifecycle control mechanism: When any of the following conditions are met: the agent returns the final result, the agent enters a state requiring user confirmation, the user clicks to stop generation, the user switches projects, the user closes the waiting panel, the user starts editing code, the waiting time slot is insufficient to fully display the current advertisement, the advertisement loading is abnormal, or the advertisement content compliance verification fails, the system will automatically terminate or adjust the advertisement. When the agent returns the result ahead of schedule, the system immediately collapses the advertisement content and prioritizes displaying the generated code, modification suggestions, bug fix results, or preview links. When the agent's waiting time exceeds the estimated time, the system will replace the short advertisement with a long advertisement, or upgrade the brand prompt to an interactive recommendation card.
9. An advertising scheduling method for interactive waiting slots of an AI intelligent programming platform according to any one of claims 1-6, characterized in that: The method also includes privacy compliance control mechanisms: The parameters of the advertising request are anonymized, retaining only coarse-grained task tags, technology stack tags, and waiting time slot types, while filtering out keys, tokens, database addresses, account passwords, personal information, company names, and private interface addresses in the code; For enterprise users, the enterprise administrator can configure which platform services, partner services, or internal promotional content are allowed to be displayed. For any of the highly sensitive tasks involving payment, authentication, vulnerability patching, government data, medical data, financial data, or private repositories, personalized advertising will not be performed.
10. An advertising scheduling method for interactive waiting slots of an AI intelligent programming platform according to any one of claims 1-6, characterized in that: The method also includes an advertising attribution and strategy optimization mechanism: A1. Recorded metrics include ad impressions, effective exposure duration, clicks, closes, redirects, conversions, waiting time slot type corresponding to ad display, task type corresponding to ad display, whether users continue to complete AI agent tasks after ad display, whether ads affect user interruption rate, and whether ads affect AI agent result viewing rate. A2. Advertising and task scenarios For statistical purposes, metrics such as ad impressions, clicks, closes, conversions, dwell times, user interruptions, and result views are recorded. Based on the metrics from step A1, a strategy optimization score for the ad in a specific scenario is calculated, and this score is then fed back into the next round of ad recall and ranking processes.