A multi-platform advertisement aggregation SDK unified access and management system
By analyzing cross-platform operational status and adjusting personalized resources, the performance interference and resource competition issues in the multi-platform advertising aggregation SDK were resolved, enabling reasonable allocation and efficient utilization of resources and improving the stability and performance of advertising services.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHENGDU KUNYOU TECHNOLOGY CO LTD
- Filing Date
- 2026-03-25
- Publication Date
- 2026-06-19
AI Technical Summary
Existing multi-platform advertising aggregation SDK access and management methods suffer from performance interference and resource contention conflicts, making it difficult to grasp the SDK's running status in real time and accurately, resulting in unreasonable resource allocation and difficulty in timely optimization.
By receiving the runtime status data stream of the multi-platform advertising aggregation SDK, performing cross-platform runtime status correlation analysis and abnormal pattern extraction, identifying performance interference and resource contention conflict patterns, generating personalized resource control strategies, dynamically adjusting the resource allocation of the host application, capturing response behavior in real time, and iteratively optimizing resource coordination strategies.
It enables efficient resource allocation for SDK instances from different advertising platforms, avoiding resource waste and conflicts, and improving the stability and performance of the multi-platform advertising aggregation SDK.
Smart Images

Figure CN122243577A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital advertising service technology, and more specifically, to a unified access and management system for a multi-platform advertising aggregation SDK. Background Technology
[0002] In today's digital marketing environment, advertising has become a crucial revenue stream for many applications. To expand advertising reach and improve ad performance, many host applications integrate SDKs from multiple different advertising platforms. However, existing methods for integrating and managing multi-platform ad aggregation SDKs present numerous challenges.
[0003] On the one hand, different advertising platform SDKs run independently within the host application, each with its own runtime performance metrics, ad request and population mechanisms, and exception handling methods. When multiple advertising platform SDKs run simultaneously, the lack of an effective collaborative management mechanism can easily lead to performance interference and resource contention conflicts between different SDK instances. For example, one advertising platform SDK may excessively consume computing resources, causing other SDKs to run slowly or even lag, affecting the performance and user experience of the entire host application.
[0004] On the other hand, existing management methods struggle to monitor the operational status of various advertising platform SDKs in real time and accurately, making it impossible to dynamically adjust resource allocation based on actual conditions. Once an unreasonable resource allocation occurs, modifications can only be made through manual intervention, which is inefficient and fails to guarantee the accuracy and timeliness of adjustments. Furthermore, there is a lack of effective analysis and handling methods for anomalies in different advertising platform SDKs, hindering the timely detection and optimization of potential problems. Summary of the Invention
[0005] In view of the aforementioned problems, and in conjunction with the first aspect of the present invention, embodiments of the present invention provide a unified access and management method for a multi-platform advertising aggregation SDK, the method comprising:
[0006] Receive a multi-platform advertising aggregation SDK runtime status data stream from the host application integration environment. The multi-platform advertising aggregation SDK runtime status data stream includes runtime performance metrics, advertising requests and fill events, and exception error logs reported by each advertising platform SDK instance embedded in the host application.
[0007] Perform cross-platform runtime status correlation analysis and abnormal pattern extraction on the runtime status data stream of the multi-platform advertising aggregation SDK to identify performance interference patterns and resource contention conflict patterns generated by SDK instances of different advertising platforms in collaborative working state, and generate a set of cross-platform SDK runtime interference patterns.
[0008] Based on the set of cross-platform SDK running interference modes, a pre-built host application environment resource coordinator is invoked to dynamically adjust and optimize the quotas of computing resources, memory resources and network resources in the host application integration environment, generating a set of personalized resource control strategies for each advertising platform SDK instance.
[0009] Based on the set of personalized resource control strategies, resource control instructions are issued to the corresponding advertising platform SDK instance, and the response behavior data stream of the advertising platform SDK instance after executing the resource control instructions is captured in real time to generate the resource control response behavior trajectory.
[0010] By integrating the set of cross-platform SDK operation interference modes with the resource regulation response behavior trajectory, the impact of the set of personalized resource regulation strategies on the overall stability of the multi-platform advertising aggregation SDK is evaluated, and the regulation strategy generation logic of the host application environment resource coordinator is iteratively optimized to generate an adaptive resource coordination model for the host application integration environment.
[0011] Furthermore, embodiments of the present invention also provide a unified access and management system for multi-platform advertising aggregation SDKs, including:
[0012] A processor; a machine-readable storage medium for storing machine-executable instructions of the processor; wherein the processor is configured to execute the aforementioned unified access and management method for the multi-platform advertising aggregation SDK by executing the machine-executable instructions.
[0013] Based on the above, by receiving the runtime status data stream of the multi-platform advertising aggregation SDK from the host application integration environment, and performing cross-platform runtime status correlation analysis and abnormal pattern extraction processing on the runtime status data stream, it can accurately identify the performance interference patterns and resource contention conflict patterns generated by different advertising platform SDK instances in collaborative working states, generating a cross-platform SDK runtime interference pattern set, effectively solving the problem of difficulty in discovering potential problems between different SDKs in existing technologies. Based on the cross-platform SDK runtime interference pattern set, a pre-built host application environment resource coordinator is invoked to dynamically adjust and optimize the scheduling of various resources within the host application integration environment, generating a personalized resource control strategy set for each advertising platform SDK instance, realizing the rational allocation and efficient utilization of resources, and avoiding resource waste and conflicts. Resource control instructions are issued to the corresponding advertising platform SDK instances according to the personalized resource control strategy set, and the response behavior data stream is captured in real time to generate resource control response behavior trajectories, enabling timely knowledge of the effect of resource control. Finally, by integrating the set of cross-platform SDK runtime interference modes with resource regulation response behavior trajectories, the impact of personalized resource regulation strategy sets on the overall stability of the multi-platform advertising aggregation SDK is evaluated. Furthermore, the regulation strategy generation logic of the host application environment resource coordinator is iteratively optimized to generate an adaptive resource coordination model for the host application integration environment. This model can automatically adjust resource allocation strategies according to actual conditions, continuously improving the stability and performance of the multi-platform advertising aggregation SDK and providing the host application with higher quality and more stable advertising services. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of the execution flow of the unified access and management method for multi-platform advertising aggregation SDK provided in the embodiments of the present invention.
[0015] Figure 2 This is a schematic diagram of exemplary hardware and software components of the unified access and management system for the multi-platform advertising aggregation SDK provided in this embodiment of the invention. Detailed Implementation
[0016] Figure 1 This is a flowchart illustrating a unified access and management method for a multi-platform advertising aggregation SDK provided in one embodiment of the present invention, which will be described in detail below.
[0017] Step S110: Receive the runtime status data stream of the multi-platform advertising aggregation SDK from the host application integration environment. The runtime status data stream of the multi-platform advertising aggregation SDK includes runtime performance metrics, advertising requests and fill events, and exception error logs reported by each advertising platform SDK instance embedded in the host application.
[0018] First, a host application is built that runs on a mobile or desktop operating system. This host application integrates a multi-platform ad aggregation SDK, which in turn dynamically loads native SDK instances provided by multiple different ad platforms, such as native SDK instances from a first ad platform, a second ad platform, and a third ad platform.
[0019] Each ad platform SDK instance runs independently in a background thread of the host application, responsible for communicating with its respective ad server, requesting ads, and processing the returned ad creatives. During operation, each ad platform SDK instance periodically generates runtime status data. This runtime status data is encapsulated into a uniformly formatted record and reported directly through inter-process communication mechanisms, such as using local sockets or shared memory queues. Each runtime status record contains multiple fields: the first field is the ad platform SDK instance identifier, used to uniquely identify the source of the reported data; for example, the first ad platform SDK instance identifier is a string consisting of the platform name and a random number; the second field is a timestamp, accurate to the millisecond level, derived from the system clock of the device where the host application resides; the third field is a status type label, used to distinguish whether this record belongs to runtime performance metrics, ad requests and fill events, or exception error logs.
[0020] When the status type label indicates a runtime performance metric, the log will include the instance's current CPU utilization percentage, current memory usage (in bytes), and current network bandwidth usage (in bytes per second). When the status type label indicates an ad request and population event, the log will include a unique request identifier for the ad request, the timestamp of the request, the status code for successful or failed ad population, and the ad creative type when population was successful. When the status type label indicates an exception / error log, the log will include the error code, error description text string, and a call stack summary for the instance at the time of the error.
[0021] Therefore, the system continuously receives the above-mentioned running status records from all advertising platform SDK instances and organizes these records into a continuous data stream in chronological order, namely the multi-platform advertising aggregation SDK running status data stream.
[0022] Step S120: Perform cross-platform operation status correlation analysis and abnormal pattern extraction processing on the multi-platform advertising aggregation SDK operation status data stream, identify the performance interference patterns and resource competition conflict patterns generated by different advertising platform SDK instances in the collaborative working state, and generate a cross-platform SDK operation interference pattern set.
[0023] Step S121: Parse the multi-platform advertising aggregation SDK running status data stream and extract the advertising platform SDK instance identifier, timestamp mark and status type label associated with each running status record.
[0024] The accumulated multi-platform ad aggregation SDK runtime status data stream is divided into fixed time windows, such as 60 seconds per window. For each raw runtime status record falling within the current time window, a parsing operation is performed. The parsing operation first reads the ad platform SDK instance identifier field in the record header to obtain a unique identifier of the record's source, such as the first ad platform SDK instance identifier. Next, it reads the timestamp tag field in the record header to obtain the precise time point when the record was generated, such as a specific millisecond-level timestamp value. Then, it reads the status type tag field in the record header to obtain the type of the record, such as an enumeration value that could be "performance," "event," or "error." After parsing, these three core fields, along with the remaining payload content of the record, are combined to form a structured internal event object, which is temporarily stored in memory for use in subsequent steps.
[0025] Step S122: Cluster the running status records of different advertising platform SDK instance identifiers under the same timestamp to generate multiple cross-platform instantaneous status snapshot units.
[0026] All internal event objects obtained after parsing in step S121 are grouped according to their timestamps. Since timestamps are accurate to the millisecond level, but in actual operation, multiple records from different advertising platform SDK instances may arrive simultaneously within the same millisecond, all internal event objects with identical millisecond-level timestamps are merged into one set. Each of these sets represents the concurrent running state of all advertising platform SDK instances at that specific millisecond moment, and is called a cross-platform instantaneous state snapshot unit.
[0027] For example, at the timestamp T_ms (milliseconds), the snapshot unit contains performance metrics records from the first advertising platform SDK instance, error log records from the second advertising platform SDK instance, and event records from the third advertising platform SDK instance. If there are no records within a certain millisecond, no snapshot unit is generated for that moment. Ultimately, for the entire 60-second time window, a series of cross-platform instantaneous state snapshot units arranged chronologically will be obtained.
[0028] Step S123: In each cross-platform instantaneous state snapshot unit, analyze the runtime performance metrics corresponding to the SDK instance identifiers of different advertising platforms. The runtime performance metrics include CPU utilization, memory usage, and network bandwidth usage.
[0029] For each cross-platform instantaneous state snapshot unit generated in step S122, iterate through all internal event objects originating from different advertising platform SDK instance identifiers within that unit. Filter out event objects with the status type label "performance". For each of these performance event objects, extract the CPU utilization percentage, memory usage (in bytes), and network bandwidth usage (in bytes per second). These values represent the real-time consumption of host application resources by each advertising platform SDK instance at the moment corresponding to that snapshot unit.
[0030] Step S124: Compare the runtime performance metrics of each advertising platform SDK instance identifier within the same cross-platform instantaneous state snapshot unit, and calculate the correlation coefficient of metric changes between any two advertising platform SDK instance identifiers. The correlation coefficient of metric changes reflects whether an increase in the runtime performance metric of one advertising platform SDK instance identifier is accompanied by a decrease in the runtime performance metric of another advertising platform SDK instance identifier.
[0031] Step S1241: Obtain the runtime performance index time series of the first and second advertising platform SDK instance identifiers within the same continuous monitoring time period from the cross-platform instantaneous state snapshot unit. The runtime performance index time series consists of central processing unit occupancy values sampled at the same fixed interval.
[0032] To calculate correlations, it's insufficient to rely solely on a single instantaneous snapshot; it's necessary to examine trends over a period. Therefore, for the current analysis time window, such as a 60-second window, for the two advertising platform SDK instance identifiers to be compared (e.g., the first and second advertising platform SDK instance identifiers), all performance event records corresponding to each instance identifier are extracted from all cross-platform instantaneous state snapshot units within this window. These records are then sorted in ascending order of timestamp to form a time series. Since the snapshot units are not strictly equal in interval, for computational convenience, the two original sequences can be resampled at fixed time intervals, such as every 100 milliseconds. For each 100-millisecond interval, if there are multiple records within that interval, the average is taken; otherwise, linear interpolation is used to fill in the gaps. This results in two CPU utilization time series of equal length and aligned time points, denoted as sequence X and sequence Y, each containing N sampling points.
[0033] Step S1242: Calculate the average value of the CPU utilization rate in the runtime performance index time series of the first advertising platform SDK instance identifier to obtain the average value of the CPU utilization rate index for the first advertising platform SDK instance identifier; similarly, calculate the average value of the CPU utilization rate in the runtime performance index time series of the second advertising platform SDK instance identifier to obtain the average value of the CPU utilization rate index for the second advertising platform SDK instance identifier.
[0034] The CPU utilization values of all N data points in sequence X are summed, and then the sum is divided by the number of sampling points N to obtain the average value of sequence X, denoted as the mean X. Similarly, the CPU utilization values of all N data points in sequence Y are summed, and then the sum is divided by the number of sampling points N to obtain the average value of sequence Y, denoted as the mean Y.
[0035] Step S1243: For the CPU utilization rate metric, iterate through each aligned time point, calculate the difference between the CPU utilization rate value of the first advertising platform SDK instance identifier at that time point and its corresponding average metric value, and obtain the metric deviation of the first advertising platform SDK instance identifier for the CPU utilization rate metric at that time point; similarly, calculate the metric deviation of the second advertising platform SDK instance identifier for the CPU utilization rate metric at that time point.
[0036] For each time point index i, i ranging from 1 to N, calculate the difference between the value X_i of sequence X at that point and the mean X, obtaining the deviation dx_i, which is equal to X_i minus the mean X. Simultaneously, calculate the difference between the value Y_i of sequence Y at that point and the mean Y, obtaining the deviation dy_i, which is equal to Y_i minus the mean Y.
[0037] Step S1244: Calculate the sum of the products of the metric deviations of the first advertising platform SDK instance identifier and the metric deviations of the second advertising platform SDK instance identifier at all time points.
[0038] For each time point i, multiply dx_i by dy_i to obtain the product dx_i multiplied by dy_i. Then, sum the products of all N time points to obtain a total value, denoted as the covariance numerator Cov_xy, that is, Cov_xy is equal to the sum of all dx_i multiplied by dy_i.
[0039] Step S1245: Calculate the sum of squares of the metric deviations of the first advertising platform SDK instance at all time points, and then calculate the square root of the sum of squares of the metric deviations of the first advertising platform SDK instance.
[0040] For each time point i, calculate the square of dx_i, i.e., multiply dx_i by dx_i. Then, sum the squares of dx_i at all N time points to obtain the sum of squares of the deviations of the sequence X, denoted as the sum of squares X. Next, calculate the square root of the sum of squares X to obtain the denominator of the standard deviation of the sequence X, denoted as the standard deviation X_denom. That is, the standard deviation X_denom is equal to the square root of the sum of squares X.
[0041] Step S1246: Calculate the sum of squares of the metric deviations of the second advertising platform SDK instance identifier at all time points, and then calculate the square root of the sum of squares of the metric deviations of the second advertising platform SDK instance identifier.
[0042] For each time point i, calculate the square of dy_i, i.e., dy_i multiplied by dy_i. Then, sum the squares of dy_i at all N time points to obtain the sum of squares of the deviations of the sequence Y, denoted as the sum of squares Y. Next, calculate the square root of the sum of squares Y to obtain the denominator of the standard deviation of the sequence Y, denoted as the standard deviation Y_denom. That is, the standard deviation Y_denom is equal to the square root of the sum of squares Y.
[0043] Step S1247: Divide the sum of the products of the first advertising platform SDK instance identifier's metric deviation and the second advertising platform SDK instance identifier's metric deviation by the product of the square root of the sum of squares of the first advertising platform SDK instance identifier's metric deviation and the square root of the sum of squares of the second advertising platform SDK instance identifier's metric deviation. The resulting quotient is the correlation coefficient between the first and second advertising platform SDK instance identifiers regarding the CPU utilization rate metric.
[0044] The correlation coefficient r_cpu is calculated as follows: its value equals the covariance numerator Cov_xy divided by the product of the standard deviations X_denom and Y_denom. In other words, r_cpu equals Cov_xy divided by the product of the standard deviations X_denom and Y_denom (within parentheses). The value of r_cpu ranges from -1 to +1. A value close to -1 indicates that the two sequences have opposite trends, i.e., one increases while the other decreases, suggesting resource competition. A value close to +1 indicates that they change in the same direction, possibly influenced by the same external factor. A value close to 0 indicates that their changes are uncorrelated.
[0045] Step S1248: Repeat the above process to calculate the correlation coefficient between the first and second advertising platform SDK instance identifiers regarding the memory usage index, and the correlation coefficient between the first and second advertising platform SDK instance identifiers regarding the network bandwidth usage index.
[0046] Replace the CPU utilization value processed in steps S1241 to S1247 with the memory usage value, and repeat all calculations to obtain the correlation coefficient r_mem for the change in memory usage. Similarly, replace it with the network bandwidth usage value to obtain the correlation coefficient r_net for the change in network bandwidth usage.
[0047] Step S1249: Determine whether the correlation coefficients of the changes in the three indicators—CPU utilization, memory usage, and network bandwidth usage—exceed the preset negative correlation threshold; if the correlation coefficient of any indicator exceeds its corresponding negative correlation threshold, it is determined that there is a resource contention conflict between the two corresponding advertising platform SDK instance identifiers.
[0048] A negative correlation threshold is pre-defined for each performance metric. For example, the threshold is set to -0.6 for CPU utilization, -0.5 for memory usage, and -0.7 for network bandwidth usage. The calculated r_cpu, r_mem, and r_net are compared with their respective negative correlation thresholds. If r_cpu is less than -0.6, r_mem is less than -0.5, or r_net is less than -0.7, a resource contention conflict is determined between the first advertising platform SDK instance identifier and the second advertising platform SDK instance identifier, provided any one of these conditions is met.
[0049] Step S125: When the correlation coefficient of the indicator change exceeds the preset negative correlation threshold, it is determined that there is a resource competition conflict between the two corresponding advertising platform SDK instance identifiers, and the timestamp of the resource competition conflict is recorded to generate a resource competition conflict record.
[0050] Based on the determination result of step S1249, whenever a pair of advertising platform SDK instance identifiers with resource contention are found, a resource contention conflict record is generated. This record contains three core fields: the first field is the identifier of the first advertising platform SDK instance involved in the conflict; the second field is the identifier of the second advertising platform SDK instance involved in the conflict; and the third field is a timestamp indicating the occurrence of the conflict, which can be the midpoint between the start time of the time window and the period of greatest conflict. This record is stored for subsequent statistical analysis.
[0051] Step S126: In each cross-platform instantaneous state snapshot unit, analyze the abnormal error logs reported by the SDK instance identifiers of different advertising platforms, and extract the error codes and error description texts from the abnormal error logs.
[0052] For each cross-platform instantaneous state snapshot unit, iterate through all its internal event objects again. This time, filter out event objects with the status type label "Error". For each error event object, extract its error code, such as an integer value, and the error description text string, such as "memory allocation failed" or "connection timeout".
[0053] Step S127: Perform semantic analysis on the error codes and error description text in the exception error log to identify error types related to resource request failure, callback function execution timeout, and thread blocking.
[0054] The extracted error description text is then subjected to keyword matching or simple natural language processing techniques. For example, if the error description text contains keywords such as "memory allocation failed" or "unable to allocate memory," it is categorized as a "resource request failed" type. If it contains keywords such as "timeout" or "failed to respond within the specified time," it is categorized as a "callback function execution timeout" type. If it contains keywords such as "deadlock," "thread blocking," or "unable to acquire lock," it is categorized as a "thread blocking" type. In this way, each error event object is labeled with an error type.
[0055] Step S128: When one advertising platform SDK instance reports a resource request failure error within the same cross-platform instantaneous state snapshot unit, and another advertising platform SDK instance reports a callback function execution timeout error within a similar time window, it is determined that there is performance interference between the two advertising platform SDK instance instances. Record the two advertising platform SDK instance instances corresponding to the performance interference and the timestamp of the performance interference occurrence to generate a performance interference record.
[0056] For the same cross-platform instantaneous state snapshot unit, check if there exists a pair of advertising platform SDK instance identifiers where one instance identifier reported an error event of type "resource allocation failure," while the other instance identifier reported an error event of type "callback function execution timeout" within the same snapshot unit, or within several snapshot units before and after it (e.g., within 100 milliseconds). If such a pair exists, it is determined that there is a performance interference between them, meaning that the resource allocation failure of the first instance may have caused the callback execution timeout of the second instance. Generate a performance interference record containing the identifiers of the two instances and the timestamp of the interference occurrence.
[0057] Step S129: Statistically summarize all resource contention conflict records and performance interference records collected within a certain time window, and abstract the frequently occurring pairs of advertising platform SDK instance identifiers and their resource contention conflict and performance interference characteristics in a pattern-based manner.
[0058] Aggregate and analyze all resource contention conflict records and performance interference records collected over a longer time window, such as the past hour. Calculate the frequency of each pair of advertising platform SDK instance identifier combinations. For example, records show that the pair of first and second advertising platform SDK instance identifiers resulted in 50 resource contention conflicts and 30 performance interferences within one hour. Combinations with frequencies exceeding a preset threshold are extracted as potential interference patterns. For each of these high-frequency combinations, further summarize their specific characteristics at the time of occurrence. For example, summarize the average values and fluctuation ranges of r_cpu, r_mem, and r_net calculated from all conflict records, as well as the typical error code sequences involved in all interference records.
[0059] Step S1210: Define a pattern name, the combination of advertising platform SDK instance identifiers involved, a typical performance indicator change curve, and a typical error log sequence for each pattern-abstracted interference pattern, and store all pattern-abstracted interference patterns in a structured manner to generate the cross-platform SDK running interference pattern set.
[0060] For each high-frequency combination and its summarized characteristics identified in step S129, a structured interference pattern is defined. This interference pattern includes the following components: a pattern name, such as "Resource Competition Pattern between First Platform and Second Platform"; the combination of advertising platform SDK instance identifiers involved, such as the first advertising platform SDK instance identifier and the second advertising platform SDK instance identifier; typical performance indicator change curves, which can be described by a set of parameters, such as a mean correlation coefficient of CPU utilization of -0.7 and a mean correlation coefficient of memory usage of -0.6; and a typical error log sequence, such as when a conflict occurs, the first advertising platform SDK instance identifier may continuously report "Memory Allocation Failure" errors, followed by the second advertising platform SDK instance identifier reporting a "Callback Timeout" error. All defined interference patterns are persistently stored in JSON or a similar structured data format, forming a cross-platform SDK runtime interference pattern set.
[0061] Step S130: Based on the cross-platform SDK running interference mode set, call the pre-built host application environment resource coordinator to dynamically adjust and optimize the quotas of computing resources, memory resources and network resources in the host application integration environment, and generate a set of personalized resource control strategies for each advertising platform SDK instance.
[0062] Step S131: Extract a cross-platform SDK operation interference mode from the set of cross-platform SDK operation interference modes, and parse the combination of advertising platform SDK instance identifiers involved in the cross-platform SDK operation interference mode and the typical performance index change curves corresponding to the cross-platform SDK operation interference mode.
[0063] From the set of cross-platform SDK runtime interference modes generated in step S1210, one interference mode is read sequentially. The JSON data of this mode is parsed to obtain the "Combination of Ad Platform SDK Instance Identifiers Involved" field, yielding a set of instance identifiers, such as the first ad platform SDK instance identifier and the second ad platform SDK instance identifier. Simultaneously, the "Typical Performance Metric Change Curve" field is parsed to obtain a set of parameters describing the curve, such as the mean CPU utilization correlation coefficient of -0.7 during the conflict, and the peak and mean values of each performance metric for this combination at the time of the conflict, extracted from historical data.
[0064] Step S132: Query the current global resource view of the host application integration environment. The global resource view includes the total computing resource quota, total memory resource quota, and total network resource quota available to the host application.
[0065] By calling application programming interfaces (APIs) provided by the operating system or runtime environment, such as querying memory information through ActivityManager and CPU usage through the CpuUsage API in Android, the total resource limit allowed for the current host application can be obtained. The total computing resource quota can be represented by the number of available CPU cores or the maximum thread pool size; the total memory resource quota can be represented by the maximum heap memory in bytes; and the total network resource quota can be represented by the maximum number of concurrent connections or the bandwidth limit. This information is then integrated into a current global resource view.
[0066] Step S133: Based on the combination of advertising platform SDK instance identifiers involved in the cross-platform SDK operation interference mode, query the historical resource consumption baseline of the advertising platform SDK instance corresponding to each advertising platform SDK instance identifier. The historical resource consumption baseline includes the average computing resource consumption, average memory resource consumption, and average network resource consumption of the advertising platform SDK instance under interference-free conditions.
[0067] For each advertising platform SDK instance identifier parsed in step S131, a pre-established and continuously updated historical resource consumption baseline database is queried. This historical resource consumption baseline database stores the average resource consumption level of each instance during long-term operation without detected interference patterns. For example, for the first advertising platform SDK instance identifier, its historical resource consumption baseline might be recorded as: average CPU utilization A1, average memory usage B1 bytes, and average network bandwidth usage C1 bytes per second. Similarly, for the second advertising platform SDK instance identifier, its baseline is average CPU utilization A2, average memory usage B2 bytes, and average network bandwidth usage C2 bytes per second.
[0068] Step S134: Compare the typical performance index change curve with the historical resource consumption baseline, identify the advertising platform SDK instance that experiences abnormal fluctuations in resource consumption when interference occurs, and mark it as the target control instance.
[0069] Step S1341: Obtain the typical performance index change curve, which describes the curve shape of the CPU utilization, memory usage and network bandwidth usage of each advertising platform SDK instance identifier in the involved advertising platform SDK instance identifier combination as a function of time during the interference occurrence period.
[0070] From the interference pattern parsed in step S131, obtain more detailed curve shape data. This could be a set of time-series sampling points describing the specific numerical changes in CPU utilization, memory usage, and network bandwidth usage of the first and second advertising platform SDK instances before, during, and after the interference event.
[0071] Step S1342: Extract the average CPU utilization of the advertising platform SDK instance corresponding to each advertising platform SDK instance identifier under normal, interference-free conditions from the historical resource consumption baseline.
[0072] From the baseline data queried in step S133, extract the average CPU utilization A1, average memory usage B1, and average network bandwidth usage C1 of the first advertising platform SDK instance, and the average CPU utilization A2, average memory usage B2, and average network bandwidth usage C2 of the second advertising platform SDK instance.
[0073] Step S1343: During the time period when the interference occurs, sample the change curves of the typical performance indicators at a fixed time granularity to obtain the sampled performance indicator values of CPU utilization, memory usage and network bandwidth usage for each advertising platform SDK instance identifier.
[0074] Set a fixed sampling interval, for example, once every 100 milliseconds. Perform equal-interval sampling over the entire interference period described in the typical performance metric change curve, for example, from the interference start time T_start to the interference end time T_end. For the first advertising platform SDK instance, obtain the CPU utilization sampling value sequence A1_sampled, the memory usage sampling value sequence B1_sampled, and the network bandwidth usage sampling value sequence C1_sampled. Each sequence contains M sampling points. Perform the same operation on the second advertising platform SDK instance to obtain sequences A2_sampled, B2_sampled, and C2_sampled.
[0075] Step S1344: For each advertising platform SDK instance identifier, calculate the average value of each performance indicator sample value during the interference period, including CPU utilization, memory usage, and network bandwidth usage.
[0076] For the sampled value sequence A1_sampled of the first advertising platform SDK instance, calculate the arithmetic mean of all M values to obtain the mean A1_avg_interfere. Similarly, calculate the mean B1_avg_interfere of B1_sampled and the mean C1_avg_interfere of C1_sampled. For the second advertising platform SDK instance, calculate the means A2_avg_interfere, B2_avg_interfere, and C2_avg_interfere.
[0077] Step S1345: Identify the average value of each performance indicator sampled during the interference period for each advertising platform SDK instance, compare it with the average value of the corresponding performance indicator in its historical resource consumption baseline, and calculate the percentage increase of the average value of each performance indicator sampled relative to its baseline average value.
[0078] For the first advertising platform SDK instance, calculate the percentage increase in CPU utilization, P_cpu1, which is equal to A1_avg_interfere minus A1 (divided by A1) and multiplied by 100%. Calculate the percentage increase in memory usage, P_mem1, which is equal to B1_avg_interfere minus B1 (divided by B1) and multiplied by 100%. Calculate the percentage increase in network bandwidth usage, P_net1, which is equal to C1_avg_interfere minus C1 (divided by C1) and multiplied by 100%. Perform the same calculations for the second advertising platform SDK instance to obtain P_cpu2, P_mem2, and P_net2.
[0079] Step S1346: Set resource consumption fluctuation thresholds for CPU utilization, memory usage, and network bandwidth usage.
[0080] Three thresholds are preset: CPU utilization fluctuation threshold TH_cpu, for example, 20%; memory usage fluctuation threshold TH_mem, for example, 15%; and network bandwidth usage fluctuation threshold TH_net, for example, 30%. These thresholds are used to determine whether resource consumption is abnormal.
[0081] Step S1347: When the percentage increase of the average value of any performance indicator sample value relative to its baseline average value exceeds the corresponding resource consumption fluctuation threshold during the interference period of any advertising platform SDK instance identifier, the advertising platform SDK instance identifier is initially determined to be a candidate advertising platform SDK instance identifier with abnormal resource consumption fluctuation.
[0082] Check the three growth percentages P_cpu1, P_mem1, and P_net1 of the first advertising platform SDK instance. If P_cpu1 is greater than TH_cpu, or P_mem1 is greater than TH_mem, or P_net1 is greater than TH_net, then mark the first advertising platform SDK instance as a candidate. Similarly, check the second advertising platform SDK instance.
[0083] Step S1348: Further analyze the typical performance index change curves corresponding to the cross-platform SDK running interference mode corresponding to the candidate advertising platform SDK instance identifier, observe whether the curves corresponding to the performance indexes that increase beyond the threshold appear in a sequence exceeding the preset number of consecutive high-value sampling points during the interference period.
[0084] For each instance marked as a candidate, such as the first advertising platform SDK instance, assuming its P_cpu1 exceeds TH_cpu, its typical CPU utilization change curve sample value sequence A1_sampled is traced back. This sequence is scanned, and the number of consecutive high-value sampling points is counted. A high value can be defined as exceeding a certain percentage, such as exceeding 120% of the baseline average A1. A threshold for the number of consecutive high-value sampling points is set, for example, 5 consecutive sampling points (corresponding to 500 milliseconds). If there is a continuous range of sampling points in A1_sampled with more than 5 points, and the values of these points are all higher than 120% of A1, then the fluctuation of this instance is confirmed to be not an instantaneous spike, but a continuous anomaly.
[0085] Step S1349: If the candidate advertising platform SDK instance identifier shows a curve corresponding to a performance indicator that increases beyond a threshold, and a sequence of more than a preset number of consecutive high-value sampling points appears within the interference period, then the advertising platform SDK instance identifier is finally confirmed as an advertising platform SDK instance identifier with abnormal fluctuations in resource consumption during the interference.
[0086] Combining the conditions in steps S1347 and S1348, if both conditions are met, the first advertising platform SDK instance is ultimately confirmed as an instance with abnormal fluctuations in resource consumption during the interference. Its identifier is upgraded from "candidate" to "target control instance".
[0087] Step S13410: Repeat the comparison and analysis process for all advertising platform SDK instance identifiers involved in the cross-platform SDK operation interference mode, identify all advertising platform SDK instance identifiers with abnormal fluctuations in resource consumption, collect all identified advertising platform SDK instance identifiers with abnormal fluctuations in resource consumption, and generate an initial list of target control instances.
[0088] After completing steps S1341 to S1349 for all instance identifiers involved in the current interference mode, namely the first and second advertising platform SDK instance identifiers, all the finally confirmed instance identifiers are put into a list, called the initial list of target control instances.
[0089] Step S13411: Check if there are multiple advertising platform SDK instance identifiers in the initial list of the target control instances that have abnormally increased resource consumption in the same cross-platform SDK running interference mode.
[0090] If the initial list of target control instances contains both the first advertising platform SDK instance identifier and the second advertising platform SDK instance identifier, it indicates that both instances have experienced abnormal growth due to interference, which may be caused by competition between them.
[0091] Step S13412: If multiple advertising platform SDK instance identifiers show abnormal growth at the same time, further analyze the percentage increase of the average value of each performance indicator sample value of these advertising platform SDK instance identifiers relative to their baseline average value, and select one or two advertising platform SDK instance identifiers with the highest overall growth as the main target control instance.
[0092] Calculate the overall growth score for each instance. This can be simply achieved by weighting and summing the growth percentages of P_cpu, P_mem, and P_net. The weights can be set according to the importance of the resources, for example, CPU weight 0.5, memory weight 0.3, and network weight 0.2. For the first advertising platform SDK instance, the score Score1 equals 0.5 multiplied by P_cpu1 plus 0.3 multiplied by P_mem1 plus 0.2 multiplied by P_net1. For the second advertising platform SDK instance, the score Score2 equals 0.5 multiplied by P_cpu2 plus 0.3 multiplied by P_mem2 plus 0.2 multiplied by P_net2. Compare Score1 and Score2; the instance with the higher score is marked as the primary target control instance, and the instance with the lower score is marked as the secondary target control instance. If only one instance shows abnormal growth, that instance is the primary target control instance.
[0093] Step S13413: The final output is a tagging result containing the primary target control instance identifier and the secondary target control instance identifier.
[0094] The analysis results of step S13412 are encapsulated and output as a data structure, which clearly indicates which instance is the primary control object that needs priority resource compensation under the current interference mode, and which instance may be a secondary object that needs appropriate restriction.
[0095] Step S135: Calculate the deviation ratio between the peak resource consumption of the target control instance during the interference and the average value in its historical resource consumption baseline; based on the deviation ratio and the average value in its historical resource consumption baseline, calculate the resource compensation amount required for the target control instance, thereby generating a preliminary compensatory resource quota recommendation, which includes an increased computing resource quota, an increased memory resource quota, and an increased network resource quota.
[0096] For the advertising platform SDK instance marked as the primary target for control, such as the first advertising platform SDK instance, identify the peak values reached during the interference period from its typical performance metric change curves. For example, the peak CPU utilization is Peak_cpu, the peak memory usage is Peak_mem, and the peak network bandwidth usage is Peak_net. Calculate the CPU utilization deviation ratio Dev_cpu, which is equal to Peak_cpu minus A1 divided by A1. The memory deviation ratio Dev_mem is equal to Peak_mem minus B1 divided by B1. The network deviation ratio Dev_net is equal to Peak_net minus C1 divided by C1. The initial resource compensation amount can be calculated as follows: the required increase in computing resource quota Delta_cpu is equal to A1 multiplied by Dev_cpu multiplied by an adjustment factor Alpha, where Alpha is a coefficient slightly greater than 1, such as 1.2, to ensure sufficient buffering. Delta_mem is equal to B1 multiplied by Dev_mem multiplied by Alpha. Delta_net equals C1 multiplied by Dev_net and then multiplied by Alpha. These three Delta values constitute the initial compensatory resource quota recommendation.
[0097] Step S136: Check whether the sum of the preliminary compensatory resource quota recommendations exceeds the amount of available redundant resources in the current global resource view of the host application integration environment.
[0098] The initial recommended increase in total resources is calculated. First, the available redundant resources in the current global resource view are queried, which is the total quota minus the sum of resources allocated and used by all current instances, to obtain available CPU redundancy (Redundant_cpu), available memory redundancy (Redundant_mem), and available network redundancy (Redundant_net). Then, Delta_cpu, Delta_mem, and Delta_net are compared with Redundant_cpu, Redundant_mem, and Redundant_net, respectively. If Delta_cpu is less than or equal to Redundant_cpu, Delta_mem is less than or equal to Redundant_mem, and Delta_net is less than or equal to Redundant_net, it indicates that the redundant resources are sufficient and can directly meet the requirement.
[0099] Step S137: If the sum of the preliminary compensatory resource quota suggestions does not exceed the amount of available redundant resources in the current global resource view of the host application integration environment, then the preliminary compensatory resource quota suggestions are directly converted into a formal resource control strategy for the target control instance.
[0100] If all conditions in step S136 are met, then Delta_cpu, Delta_mem, and Delta_net can be used as the content of the formal resource control strategy. This strategy specifies that a specified number of CPU quotas, memory quotas, and network bandwidth quotas will be added to the target control instance, namely the first advertising platform SDK instance. The strategy can be set to take effect immediately, or it can take effect when the interference pattern is detected to reappear.
[0101] Step S138: If the sum of the preliminary compensatory resource quota recommendations exceeds the amount of available redundant resources in the current global resource view of the host application integration environment, then initiate the resource rebalancing negotiation process, identify the advertising platform SDK instances corresponding to the advertising platform SDK instance identifiers other than the target control instance in the advertising platform SDK instance identifier combination involved in the cross-platform SDK operation interference mode, and analyze whether the advertising platform SDK instances corresponding to these advertising platform SDK instance identifiers other than the target control instance have resource utilization lower than their historical resource consumption baseline during the interference.
[0102] If the conditions in step S136 are not met, for example, Delta_cpu is greater than Redundant_cpu, it indicates that overall resources are insufficient. In this case, resources need to be reclaimed from other sources. The resource rebalancing negotiation process begins. First, examine the other instances involved in the current interference mode, namely the second advertising platform SDK instance. Check the resource consumption of this instance during the interference period. The average values A2_avg_interfere, B2_avg_interfere, and C2_avg_interfere of the second instance during the interference period have been obtained from step S1344. Compare these values with the second instance's own baselines A2, B2, and C2. Calculate whether its resource utilization is lower than the baseline. For example, if A2_avg_interfere is less than A2, it indicates that the CPU utilization of the second instance is actually lower than its normal level during the interference period, and there may be idle resources.
[0103] Step S139: For the advertising platform SDK instances whose resource utilization is lower than their historical resource consumption baseline (excluding the target control instance), calculate the amount of resources that can be released and generate resource reclamation suggestions for the advertising platform SDK instances corresponding to the advertising platform SDK instances other than the target control instance.
[0104] If the second instance's consumption in a certain metric is lower than its baseline, such as CPU consumption A2_avg_interfere being a certain percentage lower than the baseline A2, then it's advisable to reclaim some resources from its current allocation. The amount of CPU resources that can be released, Reclaim_cpu, can be calculated based on the baseline and the current actual consumption. For example, Reclaim_cpu equals A2 minus A2_avg_interfere multiplied by a conservative coefficient Beta, where Beta is less than 1 (e.g., 0.8), to avoid excessive reclamation that could cause problems for the second instance. Similarly, Reclaim_mem and Reclaim_net are calculated. This generates a resource reclamation recommendation for the second advertising platform SDK instance, suggesting a reduction of Reclaim_cpu, Reclaim_mem, and Reclaim_net from its current quota.
[0105] Step S1310: Summarize the amount of resources that can be released in the resource reclamation proposal, match it with the resource demand for the excess portion, reduce the preliminary compensatory resource quota proposal, generate a feasible compensatory resource quota adjustment scheme, convert the feasible compensatory resource quota adjustment scheme into a formal resource control strategy for the target control instance, and convert the resource reclamation proposal for the advertising platform SDK instance corresponding to the other advertising platform SDK instance identifiers (excluding the target control instance) into the corresponding formal resource control strategy.
[0106] The reclaimable resources calculated in step S139, Reclaim_cpu, Reclaim_mem, and Reclaim_net, are added to the original redundant resources to obtain the new total available resources, i.e., New_available_cpu equals Redundant_cpu plus Reclaim_cpu. Then, it is checked whether the initial requirement Delta_cpu is less than or equal to New_available_cpu. If so, the initial suggestion can be reduced to generate a feasible adjustment plan. For example, the final CPU increment allocated to the first instance might be Delta_cpu_final, which could be equal to Delta_cpu, or if still insufficient, all available resources might be allocated. Simultaneously, the resource reclamation suggestion for the second instance is transformed into a formal resource control strategy, requiring it to release Reclaim_cpu, Reclaim_mem, and Reclaim_net resources.
[0107] Step S1311: Traverse all cross-platform SDK operation interference modes in the cross-platform SDK operation interference mode set, repeat the above steps, and generate formal resource control strategies for the target control instance and other related advertising platform SDK instance identifiers identified in each cross-platform SDK operation interference mode. All formal resource control strategies for advertising platform SDK instances corresponding to different advertising platform SDK instance identifiers constitute the personalized resource control strategy set.
[0108] For each interference mode in the cross-platform SDK runtime interference mode set, execute steps S131 to S1310 once. Each execution generates a batch of formal resource control strategies for a specific instance. Collect all generated strategies to form a personalized resource control strategy set. Each strategy in this personalized resource control strategy set specifies which advertising platform SDK instance it is for, what type of resources to adjust, the adjustment amount, and under what conditions it takes effect.
[0109] Step S140: Based on the set of personalized resource control strategies, issue resource control instructions to the corresponding advertising platform SDK instance, and capture the response behavior data stream of the advertising platform SDK instance after executing the resource control instructions in real time to generate a resource control response behavior trajectory.
[0110] Step S141: Read a formal resource control strategy from the set of personalized resource control strategies.
[0111] From the set of personalized resource control strategies generated in step S1311, read one strategy record sequentially. This strategy record contains the target advertising platform SDK instance identifier, a list of resource types that need to be adjusted, the adjustment amount for each resource, and the triggering conditions for the strategy.
[0112] Step S142: Analyze the specific content of the formal resource regulation strategy. The specific content of the formal resource regulation strategy includes the resource type to be adjusted, the amount of change in resource quota, and the triggering conditions for the strategy to take effect.
[0113] Parse the read policy record. Identify the type of resource to be adjusted, such as CPU resources, memory resources, or network resources. Specify the amount of resource quota change, such as increasing the CPU quota by Delta_cpu_final. Specify the triggering condition for the policy to take effect, such as "take effect immediately" or "take effect when resource contention between the first and second platforms is detected to recur."
[0114] Step S143: Based on the type of resource to be adjusted and the operating system or runtime framework adopted by the host application integration environment, translate the formal resource control strategy into resource control instructions; the resource control instructions include resource control instructions for setting the thread pool size, resource control instructions for adjusting the upper limit of the memory allocation pool, resource control instructions for modifying network connection timeout parameters, and resource control instructions for limiting the number of concurrent advertising requests.
[0115] Depending on the type of the target resource, different underlying operations are invoked. If the resource to be adjusted is a CPU resource, this can be translated into an instruction to set the thread pool size. For example, the `setCorePoolSize` or `setMaximumPoolSize` methods of Java's `ThreadPoolExecutor` can be used to adjust the size of the thread pool used by the target instance. If the resource to be adjusted is a memory resource, this can be translated into an instruction to adjust the upper limit of the memory allocation pool. For example, in Android, this can be done by setting the upper limit of the Dalvik virtual machine's Java heap, or by adjusting the object allocation pool for a specific instance. If the resource to be adjusted is a network resource, this can be translated into an instruction to modify network connection timeout parameters, such as adjusting `OkHttpClient.connectTimeout`, or into an instruction to limit the number of concurrent ad requests, i.e., setting a semaphore at the ad request scheduler level to limit the number of concurrent requests.
[0116] Step S144: Send the resource control instruction to the advertising platform SDK instance corresponding to the designated advertising platform SDK instance identifier through the inter-process communication interface or function call hook provided by the host application integration environment.
[0117] Step S1441: Analyze the specific content of the formal resource regulation strategy and determine the target resource type that needs to be adjusted.
[0118] First, clarify which type of resource needs to be adjusted. For example, if the target resource type is determined to be computing resources, then the corresponding thread pool adjustments will follow.
[0119] Step S1442: For computing resource adjustment, the formal resource control strategy is translated into a resource control instruction for setting the thread pool size. The resource control instruction for setting the thread pool size includes the process identifier, thread pool attribute identifier, and new thread pool size value of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier.
[0120] If the target resource type is a computing resource, a command is generated to set the thread pool size. This command needs to include three elements: the process identifier of the target advertising platform SDK instance, used to locate the correct process; the thread pool attribute identifier, such as "core thread pool" or "maximum thread pool", used to specify which thread pool attribute to modify; and the new thread pool size value, which is the specific value converted from the adjustment amount parsed from the strategy.
[0121] Step S1443: For memory resource adjustment, the formal resource control strategy is translated into a resource control instruction to adjust the upper limit of the memory allocation pool. The resource control instruction to adjust the upper limit of the memory allocation pool includes the process identifier of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier, the memory pool handle identifier, and the new memory pool upper limit value.
[0122] If the target resource type is a memory resource, an instruction is generated to adjust the upper limit of the memory allocation pool. This instruction includes: the process identifier of the target advertising platform SDK instance; the memory pool handle identifier, used to identify which memory pool is to be adjusted, such as the Java heap, the native heap, or a specific object pool; and the new memory pool upper limit value, in bytes.
[0123] Step S1444: For network resource adjustment, the formal resource control strategy is translated into a resource control instruction to modify the network connection timeout parameter. The resource control instruction to modify the network connection timeout parameter includes the process identifier of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier, the network connection manager identifier, and the new connection timeout in milliseconds.
[0124] If the target resource type is a network resource and the adjustment is made to the connection timeout, a command to modify the network connection timeout parameter is generated. This command includes: the process identifier of the target advertising platform SDK instance; the network connection manager identifier, used to identify the HTTP client or connection pool object used by the instance; and the new connection timeout in milliseconds.
[0125] Step S1445: Adjust network resources and translate the formal resource control strategy into a resource control instruction that limits the number of concurrent advertising requests. The resource control instruction that limits the number of concurrent advertising requests includes the process identifier of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier, the advertising request scheduler identifier, and the new maximum number of concurrent requests.
[0126] If the target resource type is a network resource and the adjustment is to the concurrency level, then an instruction to limit the number of concurrent ad requests is generated. This instruction includes: the process identifier of the target ad platform SDK instance; the ad request scheduler identifier, which identifies the component within the instance responsible for sending and coordinating ad requests; and the new maximum number of concurrent requests.
[0127] Step S1446: Query the system type and application programming interface specification of the host application integration environment to determine the system call or SDK function corresponding to the resource control operation.
[0128] Depending on the operating system of the host application, such as Android or iOS, consult the relevant API documentation. For thread pool tuning, determine whether to use Java's ThreadPoolExecutor API or iOS's OperationQueue API. For memory tuning, determine whether to use Runtime.getRuntime.maxMemory or other private APIs. For network tuning, determine whether to use OkHttp's Builder or NSURLSession's configuration.
[0129] Step S1447: According to the parameter format requirements of the system call or SDK function, format each component of the resource control instruction for setting the thread pool size, adjusting the upper limit of the memory allocation pool, modifying the network connection timeout parameter, and limiting the number of concurrent advertising requests into valid function call parameters.
[0130] Based on the determined API, the fields of the instructions in steps S1442 to S1445, such as process identifier, thread pool identifier, and new value, are converted into the parameter types and formats required by the API function. For example, the process identifier is converted into an integer PID, and the new value is converted into a long integer or an integer.
[0131] Step S1448: Construct a complete function call statement or inter-process communication message, which encapsulates the formatted function call parameters and specifies the receiving endpoint of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier.
[0132] The formatted parameters are then filled into the API function to form a complete function call statement. Since the target instance may run in different threads or even processes, inter-process communication (IPC) mechanisms are required for the call. Therefore, an IPC message is actually constructed, with the message header containing the process and thread identifiers of the target instance, and the message body containing the name of the function to be executed and the parameter list.
[0133] Step S1449: Serialize the constructed complete function call statement or inter-process communication message into a standard byte stream format that can be transmitted within the host application integration environment.
[0134] The constructed inter-process communication message is serialized, for example using Protocol Buffers or simple Java serialization, into a byte array for transmission via Binder or Socket.
[0135] Step S14410: The serialized resource control instructions in standard byte stream format are sent to the process address space of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier through the inter-process communication channel or shared memory mechanism provided by the operating system.
[0136] The serialized byte stream is sent to the target process via the operating system's Binder driver (in Android) or distributed objects (in iOS).
[0137] Step S14411: On the side of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier, a corresponding instruction parsing and execution hook function is preset to receive, deserialize and execute the resource control instruction in the serialized standard byte stream format.
[0138] During the initialization phase of each advertising platform SDK instance, a command receiving and processing hook is pre-registered. This hook is responsible for listening for incoming inter-process communication messages, deserializing the received byte stream, parsing out the function name and parameters to be executed, and then executing the corresponding resource adjustment function, such as setCorePoolSize or setMaxConcurrentRequests, in the thread context where the instance resides, through reflection or direct invocation.
[0139] Step S145: While sending the resource control command, start high-frequency monitoring of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier, capture the real-time running status data of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier, and generate a response behavior monitoring data stream.
[0140] Immediately after the instruction is sent in step S14410, a high-frequency monitoring task is initiated for the target advertising platform SDK instance. This high-frequency monitoring task continuously queries the real-time running status of the instance at an extremely high frequency, for example, once every 10 milliseconds. The query content includes CPU utilization, memory usage, network bandwidth usage, as well as the length of the advertising request queue maintained internally by the instance, and the time taken for the most recent advertising request. All of these real-time data are timestamped, forming a high-density response behavior monitoring data stream.
[0141] Step S146: Extract the runtime performance index sequence from the response behavior monitoring data stream within a specified time window after the resource control instruction is sent, including the adjusted CPU utilization sequence, memory usage sequence, and network bandwidth usage sequence. The runtime performance index sequence includes the adjusted CPU utilization sequence, the adjusted memory usage sequence, and the adjusted network bandwidth usage sequence.
[0142] Step S1461: After the resource control instruction is successfully sent to the advertising platform SDK instance corresponding to the designated advertising platform SDK instance identifier, a monitoring timer is started, and the duration of the designated time window is set.
[0143] Set a monitoring time window, for example, starting from millisecond T0 after the command is successfully sent, and lasting for L milliseconds, such as 5000 milliseconds. Start a timer.
[0144] Step S1462: Within the specified time window, periodically query the real-time resource usage of the process identifier of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier through the system performance monitoring interface of the host application integration environment.
[0145] Within a 5000-millisecond time window, at fixed time intervals, such as 10 milliseconds, the CPU, memory, and network usage of the target instance process are queried through interfaces provided by the operating system, such as Debug.MemoryInfo for Android or task_info for iOS.
[0146] Step S1463: Each query retrieves a set of real-time resource usage data, which includes the CPU utilization rate of the advertising platform SDK instance process corresponding to the specified advertising platform SDK instance identifier at the current time, the memory usage of the advertising platform SDK instance process corresponding to the specified advertising platform SDK instance identifier at the current time, and the network bandwidth usage of the advertising platform SDK instance process corresponding to the specified advertising platform SDK instance identifier at the current time.
[0147] For each query, record three values: the current CPU utilization percentage, the current memory usage in bytes, and the increase in network traffic in bytes for the process since the last query.
[0148] Step S1464: Mark the real-time resource usage data obtained in each query with the current time stamp, and arrange all the real-time resource usage data with timestamps obtained in the specified time window at fixed intervals in chronological order of the timestamps.
[0149] Each data set is accompanied by a timestamp in milliseconds from the time of the query. All data is then sorted by timestamp to form an ordered list.
[0150] Step S1465: Extract the CPU utilization rate, memory usage, and network bandwidth usage values from all real-time resource usage data with timestamps, and generate adjusted CPU utilization rate sequences, memory usage sequences, and network bandwidth usage sequences according to their corresponding timestamp order.
[0151] From this ordered list, extract all CPU utilization values and arrange them into a sequence, i.e., the adjusted CPU utilization sequence. Similarly, extract all memory usage values and arrange them into an adjusted memory usage sequence. Extract all network bandwidth usage values and arrange them into an adjusted network bandwidth usage sequence.
[0152] Step S1466: Check whether there are any missing data points in the adjusted CPU utilization sequence, adjusted memory usage sequence, and adjusted network bandwidth usage sequence due to monitoring interface call failure.
[0153] Check if there are any missing items in these three sequences due to timeouts or failures in monitoring interface calls.
[0154] Step S1467: If there are missing data points in the adjusted CPU utilization sequence, adjusted memory usage sequence, and adjusted network bandwidth usage sequence due to monitoring interface call failure, then a linear interpolation method is used to calculate an estimated value using the values of valid data points before and after the missing data point, and the missing data point is filled in to ensure the continuity and integrity of the adjusted CPU utilization sequence, adjusted memory usage sequence, and adjusted network bandwidth usage sequence.
[0155] If there are missing points, such as the CPU value of the i-th point being missing, find the nearest valid point i-1 before it and the nearest valid point i+1 after it, then calculate the slope of the straight line between these two points, estimate the value of the i-th point, and fill in the missing value. This results in three complete and continuous sequences.
[0156] Step S1468: Pack the processed adjusted CPU utilization sequence, adjusted memory usage sequence, and adjusted network bandwidth usage sequence into a runtime performance index sequence within a specified time window after the self-resource control instruction is sent.
[0157] These three sequences are encapsulated into a data structure to serve as performance response data after the instruction is executed.
[0158] Step S147: Extract the sequence of ad requests and fill events within a specified time window after the resource control instruction is sent from the response behavior monitoring data stream, analyze the changing trends of ad fill rate, ad response delay and ad display success rate, and extract the abnormal error logs within a specified time window after the resource control instruction is sent, and statistically analyze the error frequency and error type distribution.
[0159] Beyond performance metrics, it's also crucial to monitor business-level responsiveness. From the response behavior monitoring data stream, filter records labeled "Event" as the status type, especially those related to ad requests and fill events. Sort these by time to obtain the ad request and fill event sequence. From this sequence, you can calculate the ad fill rate within the time window (number of successfully filled events divided by the total number of request events); the average ad response latency (average time interval from request to fill received); and the ad display success rate (number of successfully displayed events divided by the number of successfully filled events). Simultaneously, filter records labeled "Error" as the status type, and analyze the frequency of each error code and the distribution of various error types, such as network errors, parsing errors, and no-fill errors.
[0160] Step S148: Compare and analyze the runtime performance index sequence, advertising request and fill event sequence, and abnormal error log within the specified time window with the corresponding sequence and log within the same time frame baseline window before sending the resource adjustment instruction, and calculate the improvement rate or deterioration rate of key indicators.
[0161] Select a baseline time window with the same duration as the time window specified in step S146. This baseline window should be located before the instruction is sent and there should be no ongoing major interference at that time. Extract the performance indicator sequence, event sequence, and error log within the baseline window. Compare the adjusted performance indicator sequence with the baseline sequence point by point. For example, calculate the difference between the adjusted average CPU utilization and the baseline average CPU utilization, and then divide it by the baseline average CPU utilization to obtain the rate of change in CPU utilization. Similarly, calculate the rate of change in ad fill rate, which is equal to the adjusted fill rate minus the baseline fill rate. Calculate the rate of change in the total number of errors, which is equal to the adjusted total number of errors minus the baseline total number of errors. If the rate of change in CPU utilization is negative, it indicates a decrease in resource usage, representing improvement; if the rate of change in fill rate is positive, it also represents improvement; if the rate of change in the total number of errors is negative, it also represents improvement.
[0162] Step S149: Associate and encapsulate the content of the resource control instruction, the sending timestamp of the resource control instruction, the identifier of the designated advertising platform SDK instance, and the improvement rate or deterioration rate of key indicators after the execution of the resource control instruction to generate a resource control response behavior record; for each formal resource control strategy in the personalized resource control strategy set, repeat the instruction issuance, monitoring and recording generation process to obtain multiple resource control response behavior records.
[0163] The instruction content generated in step S143, the sending timestamp and target instance identifier from step S14410, and key indicators such as CPU utilization rate change rate, fill rate change rate, and total error rate change rate calculated in step S148 are encapsulated into a structured record called the resource regulation response behavior record. Then, return to step S141, retrieve the next strategy, and repeat the entire process. After all strategies have been processed, multiple records as described above are obtained.
[0164] Step S1410: Arrange all resource regulation response behavior records in chronological order, and mark the source of the corresponding interference mode in each resource regulation response behavior record to generate a complete resource regulation response behavior trajectory.
[0165] All resource regulation response behavior records generated in step S149 are sorted according to their respective instruction sending timestamps. Simultaneously, for each record, based on the source of its strategy—that is, from which cross-platform SDK's interference mode it was generated—a field is added to the record to indicate its interference mode identifier. Finally, a sequence unfolded along a timeline with contextual information is obtained, namely the resource regulation response behavior trajectory. This trajectory fully records what kind of interference was targeted, what kind of regulation was implemented, and what effect the regulation brought.
[0166] Step S150: Integrate the cross-platform SDK running interference mode set with the resource regulation response behavior trajectory, evaluate the impact of the personalized resource regulation strategy set on the overall stability of the multi-platform advertising aggregation SDK, and iteratively optimize the regulation strategy generation logic of the host application environment resource coordinator to generate an adaptive resource coordination model for the host application integration environment.
[0167] Step S151: Read the set of cross-platform SDK running interference modes, and obtain the original characteristics of each cross-platform SDK running interference mode before applying the set of personalized resource control strategies. The original characteristics of each cross-platform SDK running interference mode before applying the set of personalized resource control strategies include the combination of advertising platform SDK instance identifiers involved in the cross-platform SDK running interference mode, the typical performance index degradation curve corresponding to the cross-platform SDK running interference mode, and the typical error log sequence corresponding to the cross-platform SDK running interference mode.
[0168] Reload the set of cross-platform SDK runtime interference modes generated in step S1210 from persistent storage. For each interference mode, such as the "first platform vs. second platform resource contention mode", read its original characteristic data, including: the combination of instance identifiers involved, i.e., the first advertising platform SDK instance identifier and the second advertising platform SDK instance identifier; a typical performance metric degradation curve, which can be described by a set of parameters, such as how the CPU utilization of the two instances increases or decreases when uncontrolled; and a typical error log sequence, such as how many "memory allocation failure" errors are generated per second by the first instance during peak conflict periods.
[0169] Step S152: Read the resource regulation response behavior trajectory and filter out all resource regulation response behavior records corresponding to the resource regulation strategy implemented for the same cross-platform SDK running interference mode.
[0170] From the resource regulation response behavior trajectory generated in step S1410, all resource regulation response behavior records marked with the same interference mode identifier as in step S151 are selected. The above records are all feedbacks of different regulation strategies implemented for the same interference mode, "resource competition mode between the first platform and the second platform".
[0171] Step S153: After the resource control strategy is implemented, analyze whether the runtime performance indicators of the advertising platform SDK instances corresponding to the advertising platform SDK instance identifier combinations involved in the original cross-platform SDK runtime interference mode tend to their respective historical resource consumption baselines; analyze whether the typical error log sequences in the original cross-platform SDK runtime interference mode no longer appear or whether their frequency of occurrence is less than the preset error frequency threshold after the resource control strategy is implemented.
[0172] For each selected resource regulation response record, extract the sequence of post-regulation performance metrics. Compare the average CPU utilization of the first advertising platform SDK instance after regulation with its historical baseline A1 to see if they are close. Similarly, compare the average CPU utilization of the second instance with its baseline A2. Simultaneously, extract error logs within the post-regulation time window, count the number of errors related to "memory allocation failure" and "callback timeout," and see if it is less than a preset threshold, such as less than 1 error per second.
[0173] Step S154: Comprehensively evaluate the suppression effect of the resource control strategy on the original cross-platform SDK operation interference mode. If the runtime performance indicators of the advertising platform SDK instances corresponding to the advertising platform SDK instance identifier combinations involved in the original cross-platform SDK operation interference mode return to their respective historical resource consumption baselines and the typical error log sequences in the original cross-platform SDK operation interference mode no longer appear, then the resource control strategy is determined to be effective; otherwise, it is determined to be partially effective or ineffective.
[0174] Based on the analysis results of step S153, an evaluation conclusion is given. If, after adjustment, the CPU utilization of both the first and second instances returns to near the baseline, and the "memory allocation failure" and "callback timeout" errors almost disappear, then this adjustment strategy is deemed "effective." If performance indicators improve but do not fully return to the baseline, or if the error frequency decreases but remains above the threshold, then it is deemed "partially effective." If performance indicators do not improve or even worsen, and the error frequency remains the same, then it is deemed "ineffective."
[0175] Step S155: For resource control strategies that are determined to be effective, extract the strategy features of the effective resource control strategies. The strategy features of the effective resource control strategies include the target advertising platform SDK instance identifier controlled by the effective resource control strategy, the resource type controlled by the effective resource control strategy, the direction of resource quota change controlled by the effective resource control strategy, and the magnitude of resource quota change controlled by the effective resource control strategy.
[0176] For each resource control response record deemed "valid," the corresponding original resource control strategy is traced back, and its features are extracted. For example, for a strategy targeting the First Advertising Platform SDK instance, its features are: the target instance identifier is the First Advertising Platform SDK instance identifier; the controlled resource types are CPU and memory; the resource quota change direction is "increase"; and the resource quota change magnitude is Delta_cpu_final and Delta_mem_final. These features are combined into a feature vector.
[0177] Step S156: Associate and map the policy characteristics of the effective resource regulation strategy with its corresponding cross-platform SDK running interference mode characteristics to generate a positive example of policy effectiveness.
[0178] The effective policy feature vector extracted in step S155 is concatenated with the corresponding interference mode feature vector read in step S151. The interference mode feature vector may include: the encoding of the instance combinations involved, the quantization parameters of the typical performance degradation curve, etc. The concatenated complete vector, along with a label "effective", constitutes a positive sample for training.
[0179] Step S157: For resource control strategies that are determined to be invalid or partially effective, analyze the resource control response behavior records of the invalid or partially effective resource control strategies, identify new problems that arise after the execution of the invalid or partially effective resource control strategies, extract the strategy characteristics of the invalid or partially effective resource control strategies and the characteristics of the new problems generated after their execution, and generate negative example samples of strategy effectiveness.
[0180] For strategies deemed "ineffective" or "partially effective," it's crucial not only to extract their strategy characteristics but also to extract features of "new problems" from their response behavior records. For example, while the CPU usage of the first instance decreased after adjustments, the ad fill rate of the second instance dropped significantly, or a new error type appeared. By concatenating the strategy characteristics and the negative effect characteristics that emerged after adjustments (such as the percentage decrease in fill rate or the encoding of new error types), and labeling them "ineffective" or "partially effective," negative examples are created.
[0181] Step S158: Merge the positive examples of policy effectiveness with the negative examples of policy effectiveness to form a policy optimization training sample set. Use the policy optimization training sample set to perform supervised incremental training on the internal policy decision network of the host application environment resource coordinator, and adjust the parameter weights in the internal policy decision network of the host application environment resource coordinator.
[0182] Step S1581: Load the current network parameter weights of the internal policy decision network of the host application environment resource coordinator. The internal policy decision network of the host application environment resource coordinator is a deep neural network, whose input layer receives the interference mode feature vector and whose output layer generates the regulation policy feature vector.
[0183] The resource coordinator internally contains a policy decision network, which is a deep neural network. The number of neurons in its input layer matches the dimension of the perturbation pattern feature vector. The number of neurons in its output layer matches the dimension of the regulation policy feature vector. The network contains several hidden layers. The currently trained weight parameters of this network are loaded.
[0184] Step S1582: Read a positive example of policy effectiveness from the policy optimization training sample set. The positive example of policy effectiveness contains an interference mode feature vector and a policy feature vector of an effective resource regulation policy.
[0185] Read a positive example sample, for example, containing the interference pattern feature X and the corresponding effective policy feature Y_good.
[0186] Step S1583: Input the interference mode feature vector in the positive example sample of the strategy effectiveness into the internal strategy decision network of the host application environment resource coordinator, and obtain a regulation strategy prediction feature vector output by the internal strategy decision network of the host application environment resource coordinator through forward propagation calculation.
[0187] The feature X is input into the network, and after weighted summation of each hidden layer and calculation by a nonlinear activation function, a predicted regulatory policy feature vector Y_pred is finally obtained in the output layer.
[0188] Step S1584: Calculate the difference between the predicted feature vector of the regulation strategy and the strategy feature vector of the effective resource regulation strategy in the positive sample of strategy effectiveness, and use the mean squared error loss function to quantify the difference.
[0189] Calculate the mean squared error between Y_pred and Y_good, which is the sum of the squares of the differences between corresponding elements in the two vectors, divided by the vector dimension. This yields the loss value, Loss.
[0190] Step S1585: Calculate the gradient of the loss function corresponding to the difference with respect to the parameter weights of each layer in the internal policy decision network using the backpropagation algorithm.
[0191] Based on the loss value, the gradient of the weight parameters of each layer is calculated backwards from the output layer using the chain rule.
[0192] Step S1586: Using the gradient descent optimization algorithm, make minor adjustments to the parameter weights of the internal policy decision network based on the calculated gradient, so as to reduce the loss function value corresponding to the difference.
[0193] According to the preset learning rate, each weight parameter is subtracted by the learning rate multiplied by the gradient of that parameter, thereby updating the network weights so that the output Y_pred is closer to Y_good when the next input X is received.
[0194] Step S1587: Use the policy to optimize all positive policy effectiveness samples in the training sample set, and repeat the above forward propagation, loss calculation, backpropagation and parameter adjustment process to complete one training cycle.
[0195] One epoch is completed by training all positive samples once or multiple times (batch).
[0196] Step S1588: After a training cycle is completed, the negative examples of policy effectiveness in the policy optimization training sample set are used to perform negative reinforcement training on the internal policy decision network of the host application environment resource coordinator.
[0197] For negative examples, the input features are the perturbation pattern X_bad and the ineffective policy feature Y_bad. The network forwards to obtain Y_pred_bad. The training objective is to move Y_pred_bad away from Y_bad, for example, by using contrastive loss to encourage the network to output policies that are significantly different from Y_bad.
[0198] Step S1589: For negative example samples of policy effectiveness, their interference mode feature vectors are also input into the internal policy decision network to obtain the output regulation policy prediction feature vector.
[0199] The interference pattern feature vector X_bad from the negative examples of policy effectiveness is used as the input to the internal policy decision network. This vector X_bad passes through the input layer and several hidden layers in sequence. In each layer, a linear transformation with the weight matrix and a non-linear activation function mapping are performed, finally generating a predicted regulation policy feature vector Y_pred_bad in the output layer.
[0200] Step S15810: Calculate the difference between the predicted feature vector of the regulation strategy and the strategy feature vector of the resource regulation strategy in the negative sample of strategy effectiveness, and use the mean squared error loss function to quantify the difference.
[0201] Calculate the mean squared error between Y_pred_bad and the feature vector Y_bad of resource regulation strategies recorded in the negative samples that were judged to be invalid or partially effective. The mean squared error is calculated as follows: for the values of each corresponding dimension in the two vectors, calculate the square of the difference, then sum the squared differences of all dimensions, and divide by the total number of dimensions of the vectors. The result is the loss value Loss_bad for this forward propagation.
[0202] Step S15811: At this stage, the network parameters are adjusted so that when encountering such interference pattern features, the output is not close to the policy feature vector in the negative example. This is achieved by using a specified gradient update direction after the loss calculation.
[0203] At this stage, based on the calculated loss value Loss_bad, the gradient of the parameter weights of each layer in the internal policy decision network is calculated using the backpropagation algorithm. When updating parameters using the gradient descent optimization algorithm, the loss function is set to the negative of the loss value Loss_bad, i.e., the negative loss value. The goal of the parameter update is to minimize this negative loss value, which is equivalent to maximizing the original loss value Loss_bad. By performing this gradient update, when the internal policy decision network encounters interference pattern features similar to those in the negative examples, its output policy feature vector will naturally move away from the spatial region corresponding to the policy feature vector Y_bad that has been proven ineffective or has a negative effect.
[0204] Step S15812: Iterate through multiple training cycles using alternating positive and negative examples, and monitor the performance of the internal policy decision network on an independent validation sample set, which consists of positive and negative examples that did not participate in the training; when the accuracy of the internal policy decision network in generating effective control policies on the validation sample set reaches a preset convergence threshold, stop training, save the final parameter weights and replace the original network parameters to complete this iteration optimization.
[0205] Repeat steps S1582 to S15811 until, on the validation set, the network output policy has a high similarity to the positive policy and a low similarity to the negative policy, achieving a preset accuracy, such as 90%. At this point, stop training, save the newly trained network parameters, and replace the old policy decision network in the resource coordinator.
[0206] Step S159: After incremental training is completed, the internal policy decision network of the host application environment resource coordinator with updated parameter weights is reloaded into the host application environment resource coordinator. In subsequent operation, the host application environment resource coordinator will use the updated internal policy decision network to process newly emerging cross-platform SDK running interference modes and generate a new set of personalized resource regulation strategies, thereby completing an iterative optimization.
[0207] The new network model saved in step S15812 is loaded into the runtime resource coordinator. Subsequently, when a new cross-platform SDK runtime interference pattern is identified in step S120, the resource coordinator will no longer use the old rules, but will instead call this newly trained network, input the new interference pattern features, and the network will directly output the predicted control strategy features. After resource negotiation and quantization in step S130, a new and more likely effective set of personalized resource control strategies is generated.
[0208] Step S1510: By continuously capturing the response behavior of new personalized resource regulation strategy sets and generating new strategy optimization training samples, the evaluation and training process is executed iteratively, so that the regulation capability of the host application environment resource coordinator continuously adapts to the specific characteristics of the host application integrated environment, and finally forms an adaptive resource coordination model for the host application integrated environment.
[0209] Repeat steps S140 to S159. In each iteration, new samples are generated based on the latest regulatory feedback to retrain the policy decision network. As the number of iterations increases, the policy decision network will increasingly understand the complex nonlinear relationships between various disturbance patterns and effective regulatory strategies within this specific host application environment. Ultimately, the resource coordinator's behavior will be highly adapted to the hardware characteristics of the current host application integration environment, the combination of advertising platform SDK versions, and user behavior patterns, forming a continuously evolving and adaptive resource coordination model.
[0210] In one exemplary embodiment, a unified access and management system for multi-platform advertising aggregation SDKs is provided. This system can be a terminal, server, etc., and its internal structure diagram can be as follows: Figure 2 As shown, the multi-platform advertising aggregation SDK unified access and management system includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, near-field communication, or other technologies. When the computer program is executed by the processor, it implements a multi-platform advertising aggregation SDK unified access and management method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, or a button, trackball, or touchpad set on the shell of the multi-platform advertising aggregation SDK unified access and management system, or an external keyboard, touchpad, or mouse, etc.
[0211] It should be noted that, in order to simplify the description of the present invention and thus help to understand one or more embodiments of the invention, multiple features may sometimes be grouped into one embodiment, drawing or description thereof in the foregoing description of the embodiments of the present invention.
Claims
1. A unified access and management system for multi-platform advertising aggregation SDKs, characterized in that, include: processor; A machine-readable storage medium for storing machine-executable instructions of the processor; The processor is configured to perform the following steps by executing the machine-executable instructions: Receive a multi-platform advertising aggregation SDK runtime status data stream from the host application integration environment. The multi-platform advertising aggregation SDK runtime status data stream includes runtime performance metrics, advertising requests and fill events, and exception error logs reported by each advertising platform SDK instance embedded in the host application. Perform cross-platform runtime status correlation analysis and abnormal pattern extraction on the runtime status data stream of the multi-platform advertising aggregation SDK to identify performance interference patterns and resource contention conflict patterns generated by SDK instances of different advertising platforms in collaborative working state, and generate a set of cross-platform SDK runtime interference patterns. Based on the set of cross-platform SDK running interference modes, a pre-built host application environment resource coordinator is invoked to dynamically adjust and optimize the quotas of computing resources, memory resources and network resources in the host application integration environment, generating a set of personalized resource control strategies for each advertising platform SDK instance. Based on the set of personalized resource control strategies, resource control instructions are issued to the corresponding advertising platform SDK instance, and the response behavior data stream of the advertising platform SDK instance after executing the resource control instructions is captured in real time to generate the resource control response behavior trajectory. By integrating the set of cross-platform SDK operation interference modes with the resource regulation response behavior trajectory, the impact of the set of personalized resource regulation strategies on the overall stability of the multi-platform advertising aggregation SDK is evaluated, and the regulation strategy generation logic of the host application environment resource coordinator is iteratively optimized to generate an adaptive resource coordination model for the host application integration environment.
2. The unified access and management system for multi-platform advertising aggregation SDK according to claim 1, characterized in that, The process involves performing cross-platform runtime status correlation analysis and anomaly pattern extraction on the multi-platform advertising aggregation SDK runtime status data stream. This identifies performance interference patterns and resource contention conflict patterns generated by different advertising platform SDK instances in a collaborative working state, generating a cross-platform SDK runtime interference pattern set, including: The running status data stream of the multi-platform advertising aggregation SDK is parsed, and the advertising platform SDK instance identifier, timestamp marker, and status type tag associated with each running status record are extracted. Cluster the runtime status records of different advertising platform SDK instances marked with the same timestamp to generate multiple cross-platform instantaneous status snapshot units; In each cross-platform instantaneous state snapshot unit, the runtime performance metrics corresponding to the SDK instance identifiers of different advertising platforms are analyzed. The runtime performance metrics include CPU utilization, memory usage, and network bandwidth usage. Compare the runtime performance metrics of each advertising platform SDK instance identifier within the same cross-platform instantaneous state snapshot unit, and calculate the correlation coefficient of metric changes between any two advertising platform SDK instance identifiers. The correlation coefficient of metric changes reflects whether an increase in the runtime performance metric of one advertising platform SDK instance identifier is accompanied by a decrease in the runtime performance metric of another advertising platform SDK instance identifier. When the correlation coefficient of the indicator changes exceeds the preset negative correlation threshold, it is determined that there is a resource contention conflict between the two corresponding advertising platform SDK instance identifiers. The two advertising platform SDK instance identifiers corresponding to the resource contention conflict and the timestamp of the resource contention conflict are recorded to generate a resource contention conflict record. In each cross-platform instantaneous state snapshot unit, analyze the abnormal error logs reported by SDK instance identifiers of different advertising platforms, and extract the error codes and error description texts from the abnormal error logs; Semantic analysis is performed on the error codes and error description texts in the abnormal error log to identify error types related to resource request failure, callback function execution timeout, and thread blocking; If, within the same cross-platform instantaneous state snapshot unit, one advertising platform SDK instance reports a resource request failure error, while another advertising platform SDK instance reports a callback function execution timeout error within a similar time window, then it is determined that there is performance interference between these two advertising platform SDK instance instances. The two advertising platform SDK instance instances corresponding to the performance interference and the timestamp of the performance interference occurrence are recorded to generate a performance interference record. Statistical analysis and summarization were performed on all resource contention conflict records and performance interference records collected within a certain time window. The frequently paired combinations of advertising platform SDK instance identifiers and their resource contention conflict and performance interference characteristics were then abstracted in a pattern-based manner. For each pattern-abstracted interference pattern, define the pattern name, the combination of advertising platform SDK instance identifiers involved, typical performance indicator change curves, and typical error log sequences, and store all pattern-abstracted interference patterns in a structured manner to generate the cross-platform SDK running interference pattern set.
3. The unified access and management system for multi-platform advertising aggregation SDK according to claim 1, characterized in that, The set of cross-platform SDK runtime interference modes is used to invoke a pre-built host application environment resource coordinator to dynamically adjust and optimize the quotas of computing resources, memory resources, and network resources within the host application integration environment, generating a set of personalized resource control strategies for each advertising platform SDK instance, including: Extract a cross-platform SDK operation interference mode from the set of cross-platform SDK operation interference modes, and analyze the combination of advertising platform SDK instance identifiers involved in the cross-platform SDK operation interference mode and the typical performance index change curves corresponding to the cross-platform SDK operation interference mode. Query the current global resource view of the host application integration environment. The global resource view includes the total computing resource quota, total memory resource quota, and total network resource quota available to the host application. Based on the combination of advertising platform SDK instance identifiers involved in the cross-platform SDK operation interference mode, query the historical resource consumption baseline of the advertising platform SDK instance corresponding to each advertising platform SDK instance identifier. The historical resource consumption baseline includes the average computing resource consumption, average memory resource consumption and average network resource consumption of the advertising platform SDK instance in the interference-free state. By comparing the typical performance index change curves with the historical resource consumption baseline, the advertising platform SDK instance identifiers that exhibit abnormal fluctuations in resource consumption during interference are identified and marked as target control instances. Calculate the deviation ratio between the peak resource consumption of the target control instance during the interference and the average value of its historical resource consumption baseline; based on the deviation ratio and the average value of its historical resource consumption baseline, calculate the resource compensation required for the target control instance, thereby generating a preliminary compensatory resource quota recommendation, which includes an increased computing resource quota, an increased memory resource quota, and an increased network resource quota. Check whether the sum of the preliminary compensatory resource quota suggestions exceeds the amount of available redundant resources in the current global resource view of the host application integration environment. If the sum of the preliminary compensatory resource quota suggestions does not exceed the amount of available redundant resources in the current global resource view of the host application integration environment, the preliminary compensatory resource quota suggestions are directly converted into a formal resource control strategy for the target control instance. If the sum of the preliminary compensatory resource quota suggestions exceeds the amount of available redundant resources in the current global resource view of the host application integration environment, the resource rebalancing negotiation process is initiated. Identify the advertising platform SDK instances corresponding to the advertising platform SDK instance identifiers other than the target control instance in the advertising platform SDK instance identifier combinations involved in the cross-platform SDK operation interference mode, and analyze whether the advertising platform SDK instances corresponding to the advertising platform SDK instance identifiers other than the target control instance have resource utilization lower than their historical resource consumption baseline during the interference period. For advertising platform SDK instances other than the target control instance whose resource utilization is lower than their historical resource consumption baseline, calculate the amount of resources that can be released and generate resource reclamation suggestions for the advertising platform SDK instances other than the target control instance. The amount of resources that can be released in the resource recycling proposal is summarized and matched with the resource demand for the excess portion. The preliminary compensatory resource quota proposal is reduced to generate a feasible compensatory resource quota adjustment plan. The feasible compensatory resource quota adjustment plan is transformed into a formal resource control strategy for the target control instance. The resource recycling proposals for the advertising platform SDK instances corresponding to the other advertising platform SDK instance identifiers besides the target control instance are transformed into corresponding formal resource control strategies. Traverse all cross-platform SDK operation interference modes in the cross-platform SDK operation interference mode set, repeat the above steps, and generate formal resource control strategies for the target control instance and other related advertising platform SDK instance identifiers identified in each cross-platform SDK operation interference mode. All formal resource control strategies for advertising platform SDK instances corresponding to different advertising platform SDK instance identifiers constitute the personalized resource control strategy set.
4. The unified access and management system for multi-platform advertising aggregation SDK according to claim 1, characterized in that, The step involves issuing resource control instructions to the corresponding advertising platform SDK instance based on the personalized resource control strategy set, and capturing the response behavior data stream of the advertising platform SDK instance after executing the resource control instructions in real time to generate a resource control response behavior trajectory, including: Read one formal resource control strategy from the set of personalized resource control strategies; The specific content of the formal resource control strategy is analyzed. The specific content of the formal resource control strategy includes the type of resource to be adjusted, the amount of change in resource quota, and the triggering conditions for the strategy to take effect. Based on the type of resource to be adjusted and the operating system or runtime framework used by the host application integration environment, the formal resource control strategy is translated into resource control instructions; the resource control instructions include resource control instructions for setting the thread pool size, resource control instructions for adjusting the upper limit of the memory allocation pool, resource control instructions for modifying network connection timeout parameters, and resource control instructions for limiting the number of concurrent advertising requests. The resource control command is sent to the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier through the inter-process communication interface or function call hook provided by the host application integration environment. While sending resource control instructions, high-frequency monitoring of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier is initiated, real-time running status data of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier is captured, and a response behavior monitoring data stream is generated. From the response behavior monitoring data stream, extract the runtime performance indicator sequence within a specified time window after the resource control command is sent, including the adjusted CPU utilization sequence, memory usage sequence, and network bandwidth usage sequence. The runtime performance indicator sequence includes the adjusted CPU utilization sequence, the adjusted memory usage sequence, and the adjusted network bandwidth usage sequence. From the response behavior monitoring data stream, extract the sequence of ad requests and fill events within a specified time window after the resource control command is sent, analyze the changing trends of ad fill rate, ad response delay and ad display success rate, and extract the abnormal error logs within a specified time window after the resource control command is sent, and statistically analyze the error frequency and error type distribution. The runtime performance index sequence, ad request and fill event sequence, and abnormal error log within the specified time window are compared and analyzed with the corresponding sequence and log within the same time frame baseline window before the resource adjustment instruction is sent, and the improvement rate or deterioration rate of key indicators is calculated. The content of the resource control instruction, the timestamp of the resource control instruction, the identifier of the designated advertising platform SDK instance, and the improvement rate or deterioration rate of key indicators after the execution of the resource control instruction are associated and encapsulated to generate a resource control response behavior record; for each of the formal resource control strategies in the personalized resource control strategy set, the instruction issuance, monitoring and recording generation process is repeated to obtain multiple resource control response behavior records; All resource regulation response behavior records are arranged in chronological order, and the source of the corresponding interference mode is marked in each resource regulation response behavior record to generate a complete resource regulation response behavior trajectory.
5. The unified access and management system for multi-platform advertising aggregation SDK according to claim 1, characterized in that, The method integrates the cross-platform SDK runtime interference mode set with the resource regulation response behavior trajectory, evaluates the impact of the personalized resource regulation strategy set on the overall stability of the multi-platform advertising aggregation SDK, and iteratively optimizes the regulation strategy generation logic of the host application environment resource coordinator to generate an adaptive resource coordination model for the host application integration environment, including: Read the set of cross-platform SDK running interference modes, and obtain the original characteristics of each cross-platform SDK running interference mode before applying the set of personalized resource control strategies. The original characteristics of each cross-platform SDK running interference mode before applying the set of personalized resource control strategies include the combination of advertising platform SDK instance identifiers involved in the cross-platform SDK running interference mode, the typical performance index degradation curve corresponding to the cross-platform SDK running interference mode, and the typical error log sequence corresponding to the cross-platform SDK running interference mode. Read the resource regulation response behavior trajectory and filter out all resource regulation response behavior records corresponding to the resource regulation strategy implemented for the same cross-platform SDK running interference mode; After the resource control strategy is implemented, analyze whether the runtime performance indicators of the advertising platform SDK instances corresponding to the advertising platform SDK instance identifier combinations involved in the original cross-platform SDK operation interference mode tend to their respective historical resource consumption baselines; analyze whether the typical error log sequences in the original cross-platform SDK operation interference mode no longer appear or whether their frequency of occurrence is less than the preset error frequency threshold after the resource control strategy is implemented. The resource control strategy is evaluated to assess its effectiveness in suppressing the original cross-platform SDK operation interference mode. If the runtime performance indicators of the advertising platform SDK instances corresponding to the advertising platform SDK instance identifier combinations involved in the original cross-platform SDK operation interference mode return to their respective historical resource consumption baselines and the typical error log sequences in the original cross-platform SDK operation interference mode no longer appear, then the resource control strategy is deemed effective; otherwise, it is deemed partially effective or ineffective. For resource control strategies that are determined to be effective, the strategy features of the effective resource control strategies are extracted. The strategy features of the effective resource control strategies include the target advertising platform SDK instance identifier controlled by the effective resource control strategies, the resource type controlled by the effective resource control strategies, the direction of resource quota change controlled by the effective resource control strategies, and the magnitude of resource quota change controlled by the effective resource control strategies. The effective resource regulation strategy is associated and mapped with its corresponding cross-platform SDK running interference mode features to generate a positive example of strategy effectiveness. For resource control strategies that are determined to be ineffective or partially effective, analyze the resource control response behavior records of the ineffective or partially effective resource control strategies, identify new problems that arise after the execution of the ineffective or partially effective resource control strategies, extract the strategy characteristics of the ineffective or partially effective resource control strategies and the characteristics of the new problems generated after their execution, and generate negative examples of strategy effectiveness. The positive and negative examples of policy effectiveness are merged to form a policy optimization training sample set. The policy optimization training sample set is used to perform supervised incremental training on the internal policy decision network of the host application environment resource coordinator. The parameter weights in the internal policy decision network of the host application environment resource coordinator are adjusted so that when the internal policy decision network of the host application environment resource coordinator encounters similar cross-platform SDK running interference mode characteristics, it can generate a control policy with a higher probability that is close to the policy characteristics of the effective resource control policy in the positive examples of policy effectiveness. After incremental training is completed, the internal policy decision network of the host application environment resource coordinator with updated parameter weights is reloaded into the host application environment resource coordinator. In subsequent operation, the host application environment resource coordinator will use the updated internal policy decision network to process newly emerging cross-platform SDK running interference modes, generate a new set of personalized resource regulation strategies, and thus complete an iterative optimization. By continuously capturing the response behavior of new personalized resource regulation strategy sets and generating new strategy optimization training samples, and iteratively executing the evaluation and training process, the regulation capability of the host application environment resource coordinator is continuously adapted to the specific characteristics of the host application integrated environment, ultimately forming an adaptive resource coordination model for the host application integrated environment.
6. The unified access and management system for multi-platform advertising aggregation SDK according to claim 2, characterized in that, The comparison of runtime performance metrics of each advertising platform SDK instance identifier within the same cross-platform instantaneous state snapshot unit, and the calculation of the correlation coefficient of metric changes between any two advertising platform SDK instance identifiers, includes: From the cross-platform instantaneous state snapshot unit, the runtime performance index time series of the first and second advertising platform SDK instance identifiers within the same continuous monitoring time period are obtained respectively. The runtime performance index time series consists of CPU utilization values sampled at the same fixed interval, and the two time series have the same number of time points and aligned timestamps. Calculate the average values of CPU utilization, memory usage, and network bandwidth usage for the runtime performance metrics of the first advertising platform SDK instance in the time series, respectively, to obtain the average performance metrics of the first advertising platform SDK instance for each performance metric; similarly, calculate the average values of CPU utilization, memory usage, and network bandwidth usage for the runtime performance metrics of the second advertising platform SDK instance in the time series, respectively, to obtain the average performance metrics of the second advertising platform SDK instance for each performance metric. For the CPU utilization metric, iterate through each aligned time point and calculate the difference between the CPU utilization value of the first advertising platform SDK instance at that time point and its corresponding average metric value to obtain the metric deviation of the first advertising platform SDK instance at that time point for the CPU utilization metric; similarly calculate the metric deviation of the second advertising platform SDK instance at that time point for the CPU utilization metric; repeat this process for the memory usage metric and the network bandwidth usage metric to obtain the metric deviation of each metric at each time point. Calculate the sum of the products of the metric deviations of the first and second advertising platform SDK instance identifiers at all time points. Calculate the sum of squares of the metric deviations of the first advertising platform SDK instance identifier at all time points. Then calculate the square root of the sum of squares of the metric deviations of the first advertising platform SDK instance identifier. Calculate the sum of squares of the metric deviations of the second advertising platform SDK instance identifier at all time points. The sum of the products of the first advertising platform SDK instance identifier's metric deviation and the second advertising platform SDK instance identifier's metric deviation is divided by the product of the square root of the sum of squares of the first advertising platform SDK instance identifier's metric deviation and the square root of the sum of squares of the second advertising platform SDK instance identifier's metric deviation. The resulting quotient is the correlation coefficient between the first and second advertising platform SDK instance identifiers regarding the CPU utilization rate metric. Repeat the above process to calculate the correlation coefficients between the first and second advertising platform SDK instance identifiers regarding the memory usage metric, and the correlation coefficients between the first and second advertising platform SDK instance identifiers regarding the network bandwidth usage metric. The system determines whether the correlation coefficients of the changes in three indicators—CPU utilization, memory usage, and network bandwidth usage—exceed a preset negative correlation threshold. If the correlation coefficient of any indicator exceeds its corresponding negative correlation threshold, it determines that there is a resource contention conflict between the two corresponding advertising platform SDK instance identifiers.
7. The unified access and management system for multi-platform advertising aggregation SDK according to claim 3, characterized in that, The process of comparing the typical performance indicator change curves with the historical resource consumption baseline to identify advertising platform SDK instances with abnormal resource consumption fluctuations during interference, and marking them as target control instances, includes: Obtain the typical performance index change curve, which describes the curve shape of the CPU utilization, memory usage and network bandwidth usage of each advertising platform SDK instance identifier in the involved advertising platform SDK instance identifier combination as a function of time during the interference occurrence period. Extract the average CPU utilization of each advertising platform SDK instance under normal, interference-free conditions from the historical resource consumption baseline. During the period when the interference occurs, the change curves of the typical performance indicators are sampled at a fixed time granularity to obtain the sampled values of the performance indicators of CPU utilization, memory usage and network bandwidth usage for each advertising platform SDK instance identifier. For each advertising platform SDK instance identifier, calculate the average value of each performance indicator sample value during the interference period, including CPU utilization, memory usage, and network bandwidth usage. The average value of each performance metric sampled during the interference period is identified for each advertising platform SDK instance and compared with the average value of the corresponding performance metric in its historical resource consumption baseline. The percentage increase of the average value of each performance metric sampled relative to its baseline average value is calculated. Set resource consumption fluctuation thresholds for CPU utilization, memory usage, and network bandwidth usage respectively; when the average value of any performance indicator sample of any advertising platform SDK instance exceeds the corresponding resource consumption fluctuation threshold by a percentage relative to its baseline average value during the interference period, the advertising platform SDK instance is initially identified as a candidate advertising platform SDK instance with abnormal resource consumption fluctuation. Further analysis was conducted on the typical performance index change curves corresponding to the cross-platform SDK operation interference mode of the candidate advertising platform SDK instance identifier. The curves corresponding to the performance indexes that increased beyond the threshold were observed to see if a sequence of more than the preset number of consecutive high-value sampling points appeared during the interference period. If the candidate advertising platform SDK instance identifier shows a curve corresponding to a performance indicator that increases beyond a threshold, and a sequence of more than a preset number of consecutive high-value sampling points appears within the interference period, then the advertising platform SDK instance identifier is finally confirmed as an advertising platform SDK instance identifier with abnormal fluctuations in resource consumption during the interference. The comparison and analysis process is repeated for all advertising platform SDK instance identifiers involved in the cross-platform SDK operation interference mode to identify all advertising platform SDK instance identifiers with abnormal fluctuations in resource consumption. All identified advertising platform SDK instance identifiers with abnormal fluctuations in resource consumption are collected to generate an initial list of target control instances. The initial list of target control instances is checked to see if there are multiple advertising platform SDK instance identifiers with abnormally increasing resource consumption in the same cross-platform SDK operation interference mode. If multiple advertising platform SDK instance identifiers show abnormal growth simultaneously, further analysis is conducted on the percentage increase of the average value of each performance indicator sample value of these advertising platform SDK instance identifiers relative to their baseline average value. The one or two advertising platform SDK instance identifiers with the highest overall growth are selected as the primary target control instances, and the remaining advertising platform SDK instance identifiers are selected as secondary target control instances. The final output includes the labeling results of the primary target control instance identifier and the secondary target control instance identifier.
8. The unified access and management system for multi-platform advertising aggregation SDK according to claim 4, characterized in that, The sequence of runtime performance metrics extracted from the response behavior monitoring data stream within a specified time window after the resource control command is sent includes adjusted CPU utilization, memory usage, and network bandwidth usage sequences, including: After the resource control command is successfully sent to the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier, a monitoring timer is started, and the duration of the specified time window is set. Within the specified time window, the real-time resource usage of the process identifier of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier is periodically queried through the system performance monitoring interface of the host application integration environment. Each query retrieves a set of real-time resource usage data, which includes the CPU utilization rate of the advertising platform SDK instance process corresponding to the specified advertising platform SDK instance identifier at the current moment, the memory usage of the advertising platform SDK instance process corresponding to the specified advertising platform SDK instance identifier at the current moment, and the network bandwidth usage of the advertising platform SDK instance process corresponding to the specified advertising platform SDK instance identifier at the current moment. Each query retrieves real-time resource usage data with a timestamp of the current moment. All real-time resource usage data with timestamps retrieved within the specified time window at fixed intervals are arranged in chronological order of the timestamps. Extract the CPU utilization, memory usage, and network bandwidth usage values from all real-time resource usage data with timestamps, and generate adjusted CPU utilization, memory usage, and network bandwidth usage sequences according to their corresponding timestamps. Check whether there are any missing data points in the adjusted CPU utilization sequence, adjusted memory usage sequence, and adjusted network bandwidth usage sequence due to monitoring interface call failures; If there are missing data points in the adjusted CPU utilization sequence, adjusted memory usage sequence, and adjusted network bandwidth usage sequence due to monitoring interface call failures, then a linear interpolation method is used to calculate an estimated value using the values of valid data points before and after the missing data point, and the missing data point is filled in to ensure the continuity and integrity of the adjusted CPU utilization sequence, adjusted memory usage sequence, and adjusted network bandwidth usage sequence. The adjusted CPU utilization sequence, adjusted memory usage sequence, and adjusted network bandwidth usage sequence are packaged together and used as a runtime performance index sequence within a specified time window after the self-resource control instruction is sent.
9. The unified access and management system for multi-platform advertising aggregation SDK according to claim 5, characterized in that, The process of using the strategy-optimized training sample set to perform supervised incremental training on the internal policy decision network of the host application environment resource coordinator, adjusting the parameter weights in the internal policy decision network of the host application environment resource coordinator, enables the internal policy decision network of the host application environment resource coordinator to generate a control strategy with a higher probability that is close to the policy characteristics of effective resource control strategies in the positive examples of policy effectiveness when encountering similar cross-platform SDK running interference patterns, including: Load the current network parameter weights of the internal policy decision network of the host application environment resource coordinator. The internal policy decision network of the host application environment resource coordinator is a deep neural network, whose input layer receives the interference mode feature vector and whose output layer generates the regulation policy feature vector. Read a positive example of policy effectiveness from the policy optimization training sample set. The positive example of policy effectiveness contains an interference mode feature vector and a policy feature vector of an effective resource regulation policy. The interference pattern feature vector in the positive example sample of the effectiveness of the strategy is input into the internal strategy decision network of the host application environment resource coordinator. Through the forward propagation calculation of the internal strategy decision network of the host application environment resource coordinator, a regulation strategy prediction feature vector output by the internal strategy decision network of the host application environment resource coordinator is obtained. The difference between the predicted feature vector of the regulation strategy and the strategy feature vector of the effective resource regulation strategy in the positive sample of strategy effectiveness is calculated, and the mean squared error loss function is used to quantify the difference. The gradient of the loss function corresponding to the difference with respect to the parameter weights of each layer in the internal policy decision network is calculated using the backpropagation algorithm. The gradient descent optimization algorithm is used to make minor adjustments to the parameter weights of the internal policy decision network based on the calculated gradient, thereby reducing the loss function value corresponding to the difference. Use the policy to optimize all positive examples of policy effectiveness in the training sample set, and repeat the above forward propagation, loss calculation, back propagation and parameter adjustment process to complete one training cycle. After a training cycle is completed, the negative examples of policy effectiveness in the policy optimization training sample set are used to perform negative reinforcement training on the internal policy decision network of the host application environment resource coordinator. For negative example samples of policy effectiveness, their interference mode feature vectors are also input into the internal policy decision network to obtain the output regulation policy prediction feature vector. The difference between the predicted feature vector of the regulation strategy and the strategy feature vector of the resource regulation strategy in the negative sample of strategy effectiveness is calculated, and the mean squared error loss function is used to quantify the difference. At this stage, the network parameters are adjusted so that when encountering such interference pattern features, the output is not close to the policy feature vector in the negative example. This is achieved by using a specified gradient update direction after loss calculation. The training process iterates through multiple training cycles, alternating between positive and negative examples, and monitors the performance of the internal policy decision network on an independent validation sample set, which consists of positive and negative examples that were not involved in the training. When the accuracy of the internal policy decision network in generating effective control policies on the validation sample set reaches a preset convergence threshold, the training stops, the final parameter weights are saved, and the original network parameters are replaced, thus completing this iteration optimization.
10. The unified access and management system for multi-platform advertising aggregation SDK according to claim 4, characterized in that, The step of translating the formal resource regulation strategy into resource regulation instructions includes: Analyze the specific content of the formal resource control strategy to determine the target resource types that need to be adjusted, including computing resources, memory resources, and network resources. In response to the adjustment of computing resources, the formal resource control strategy is translated into a resource control instruction for setting the thread pool size. The resource control instruction for setting the thread pool size includes the process identifier, thread pool attribute identifier, and new thread pool size value of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier. For memory resource adjustments, the formal resource control strategy is translated into a resource control instruction to adjust the upper limit of the memory allocation pool. This instruction includes the process identifier of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier, the memory pool handle identifier, and the new memory pool upper limit value. For network resource adjustments, the formal resource control strategy is translated into a resource control instruction to modify network connection timeout parameters. This instruction includes the process identifier of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier, the network connection manager identifier, and the new connection timeout in milliseconds. Simultaneously, for network resource adjustments, the formal resource control strategy is also translated into a resource control instruction to limit the number of concurrent advertising requests. This instruction includes the process identifier of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier, the advertising request scheduler identifier, and the new maximum number of concurrent requests. Query the system type and application programming interface specification of the host application integration environment to determine the system call or SDK function corresponding to the resource control operation; According to the parameter format requirements of the system call or SDK function, the components of the resource control instructions for setting the thread pool size, adjusting the upper limit of the memory allocation pool, modifying the network connection timeout parameter, and limiting the number of concurrent advertising requests are formatted into valid function call parameters. Construct a complete function call statement or inter-process communication message, which encapsulates formatted function call parameters and specifies the receiving endpoint of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier. Serialize the constructed complete function call statement or inter-process communication message into a standard byte stream format that can be transmitted within the host application integration environment. Send the serialized standard byte stream format resource control instructions to the process address space of the advertising platform SDK instance corresponding to the specified advertising platform SDK instance identifier through the inter-process communication channel or shared memory mechanism provided by the operating system. On the side of the advertising platform SDK instance corresponding to the designated advertising platform SDK instance identifier, a corresponding instruction parsing and execution hook function is preset to receive, deserialize and execute the resource control instructions in the standard byte stream format after serialization.