Resource adjustment

By using qualitative and quantitative models to predict future transaction traffic and adjusting service resource capacity, the problem of traffic fluctuations during live-streaming e-commerce and promotions was solved, improving system stability and user experience.

WO2026113768A1PCT designated stage Publication Date: 2026-06-04CHONGQING ANT CONSUMER FINANCE CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
CHONGQING ANT CONSUMER FINANCE CO LTD
Filing Date
2025-10-27
Publication Date
2026-06-04

AI Technical Summary

Technical Problem

With live-streaming e-commerce and promotions becoming the norm, consumer transaction payment traffic fluctuates greatly. Existing technologies cannot efficiently allocate service resources in real time to cope with traffic changes, leading to a decline in system stability and user experience.

Method used

By acquiring event data, historical transaction data, and system data, and using pre-trained qualitative and quantitative models, future transaction traffic can be predicted, and the capacity of service resources can be adjusted to cope with event events, including expansion or contraction operations.

Benefits of technology

It enables accurate adjustment of service resources, improves system stability and user experience during events, and ensures maximum and reasonable allocation of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025130078_04062026_PF_FP_ABST
    Figure CN2025130078_04062026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present description relate to the technical field of computers, and provide a resource adjustment method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product. The method comprises: if it is predicted, on the basis of at least one of input data about an activity event that facilitates execution of a transaction event, historical transaction data generated by executing the transaction event, and system data, that the activity event is to be carried out at a future time, predicting, by means of first transaction traffic including transaction traffic generated by executing the transaction event before the activity event is carried out or transaction traffic generated by executing the transaction event at any time during carrying out the activity event, second transaction traffic generated by executing the transaction event during carrying out the activity event, wherein the time corresponding to the first transaction traffic is earlier than the time corresponding to the second transaction traffic; and then on the basis of the first transaction traffic and the second transaction traffic, performing capacity expansion or capacity reduction on service resources used for supporting execution of the transaction event.
Need to check novelty before this filing date? Find Prior Art

Description

Resource Adjustment Technical Field

[0001] This specification relates to the field of computer technology, and more specifically, to a resource adjustment method, apparatus, electronic device, computer-readable storage medium, and computer program product in the field of computer technology. Background Technology

[0002] In the context of the normalization of live-streaming e-commerce and promotions, the payment traffic generated by consumer transactions may surge at any time, and after the surge, the payment traffic will quickly bottom out, and there may be a second small peak at any time. At present, we are facing the premise of overall reduction in service resources. Therefore, how to efficiently allocate service resources to cope with the daily promotions and maximize the use of limited service resources has become an urgent problem to be solved. Summary of the Invention

[0003] This specification provides a resource adjustment method, apparatus, electronic device, computer-readable storage medium, and computer program product. This specification can predict in advance whether there will be active events that facilitate the execution of transaction events in the future at TH+N and T+N. After predicting that there will be active events, it can predict when to expand or shrink the service resources that support the execution of transaction events, which helps to provide a higher reference guarantee for the accuracy of service resource expansion and contraction.

[0004] Firstly, a method for resource adjustment is provided, comprising: acquiring target data; wherein the target data includes at least one of recorded data about an activity event, historical transaction data generated from previous executions of transaction events, and system data, wherein the activity event is used to facilitate the execution of the transaction event; predicting whether the activity event will be carried out in the future based on the target data; if so, acquiring a first transaction flow; wherein the first transaction flow includes transaction flow generated before the activity event is carried out, or transaction flow generated at any time during the activity event; predicting a second transaction flow generated during the activity event based on the first transaction flow; wherein the time corresponding to the first transaction flow is earlier than the time corresponding to the second transaction flow; and adjusting the resource capacity of service resources used to support the execution of the transaction event based on the first transaction flow and the second transaction flow.

[0005] In the above technical solution, the embodiments of this specification use at least one of the following: recorded data about activity events, historical transaction data generated from previous executed transaction events, and system data, to predict whether an activity event will be carried out in the future to facilitate the execution of the transaction event. If an activity event is predicted to be carried out in the future, a second transaction flow generated during the execution of the transaction event is predicted by using a first transaction flow, which includes transaction flow generated before the execution of the transaction event or transaction flow generated at any time during the execution of the transaction event. The time corresponding to the first transaction flow is earlier than the time corresponding to the second transaction flow. Then, based on the first transaction flow and the second transaction flow... The technical solution for adjusting the resource capacity of service resources used to support transaction event execution, specifically regarding transaction traffic, can predict in advance whether there will be any events facilitating transaction event execution in the future at times TH+N and T+N. Once such events are predicted, it can determine when to expand or shrink the service resources supporting transaction event execution, providing a higher level of accuracy in this process. Furthermore, by expanding or shrinking the service resources, a reasonable allocation of resources can be achieved, ensuring that the adjusted resource capacity can effectively handle the transaction traffic generated during the execution of transaction events, thereby improving system stability and user experience during these events.

[0006] In one possible implementation, predicting whether to conduct the activity event in the future based on the target data includes: inputting the target data into a pre-trained qualitative model to obtain a predicted probability; wherein the qualitative model is a classification probability feature model for clustering activity events; if the predicted probability is greater than or equal to a probability threshold, determining that the activity event will be conducted in the future; if the predicted probability is less than the probability threshold, determining that the activity event will not be conducted in the future.

[0007] In one possible implementation, the step of predicting the second transaction flow generated during the execution of the activity event based on the first transaction flow includes: inputting the first transaction flow into a pre-trained quantitative model to obtain the second transaction flow; wherein the quantitative model is a time series model for transaction flow prediction.

[0008] In one possible implementation, the resource adjustment method further includes: acquiring historical transaction traffic generated by executing the transaction event to obtain sample data; preprocessing the sample data to obtain preprocessed data; wherein the preprocessing includes at least one of data cleaning, outlier handling, and missing value handling; performing steady-state identification on the preprocessed data based on time series analysis and / or statistical analysis; if the preprocessed data exhibits a steady-state pattern, using the preprocessed data to train a time series model to be trained to obtain the quantitative model; if the preprocessed data does not exhibit a steady-state pattern, using the preprocessed data as the sample data, and performing the step of preprocessing the sample data to obtain preprocessed data.

[0009] In one possible implementation, adjusting the resource capacity of the service resources used to support the execution of the transaction event based on the first transaction flow and the second transaction flow includes: if the second transaction flow is greater than the first transaction flow, increasing the resource capacity of the service resources.

[0010] In one possible implementation, the service resource is a server, and the resource capacity of the service resource is the number of servers. Increasing the resource capacity of the service resource includes: obtaining the target number of servers corresponding to the second transaction traffic; increasing the number of servers to the target number. This achieves the goal of handling the transaction traffic generated by the execution of transaction events during the event by increasing the number of servers, which is beneficial to improving system stability and user experience during the event, as well as accurately and reasonably allocating server resources.

[0011] In one possible implementation, adjusting the resource capacity of the service resources used to support the execution of the transaction event based on the first transaction flow and the second transaction flow includes: if the second transaction flow is less than the first transaction flow, reducing the resource capacity of the service resources.

[0012] In one possible implementation, the service resource is a server, and the resource capacity of the service resource is the number of servers. Reducing the resource capacity of the service resource includes: obtaining the target number of servers corresponding to the second transaction traffic; reducing the number of servers to the target number. This reduces the number of servers to handle the transaction traffic generated during the execution of transaction events, which helps to avoid wasting server resources and achieves accurate and reasonable allocation of server resources.

[0013] Secondly, a resource adjustment device is provided, comprising: a first acquisition module for acquiring target data; wherein the target data includes at least one of recorded data about an activity event, historical transaction data generated by previous execution of transaction events, and system data, the activity event being used to facilitate the execution of the transaction event; a first prediction module for predicting whether the activity event will be carried out at a future time based on the target data; a second acquisition module for acquiring a first transaction flow when the activity event is predicted to be carried out at a future time; wherein the first transaction flow includes transaction flow generated by executing the transaction event before the activity event is carried out, or transaction flow generated by executing the transaction event at any time during the activity event; a second prediction module for predicting a second transaction flow generated by executing the transaction event during the activity event based on the first transaction flow; wherein the time corresponding to the first transaction flow is earlier than the time corresponding to the second transaction flow; and a resource adjustment module for adjusting the resource capacity of service resources used to support the execution of the transaction event based on the first transaction flow and the second transaction flow.

[0014] In one possible implementation, the first prediction module is specifically used to input the target data into a pre-trained qualitative model to obtain a prediction probability; wherein the qualitative model is a classification probability feature model for clustering activity events; if the prediction probability is greater than or equal to a probability threshold, it is determined that the activity event will be carried out in the future time; if the prediction probability is less than the probability threshold, it is determined that the activity event will not be carried out in the future time.

[0015] In one possible implementation, the second prediction module is specifically used to predict the second transaction flow generated during the execution of the activity event based on the first transaction flow, which includes: inputting the first transaction flow into a pre-trained quantitative model to obtain the second transaction flow; wherein the quantitative model is a time series model for transaction flow prediction.

[0016] In one possible implementation, the resource adjustment device further includes: a model training unit, configured to acquire historical transaction flows generated by the execution of the transaction event to obtain sample data; preprocess the sample data to obtain preprocessed data; wherein the preprocessing includes at least one of data cleaning, outlier handling, and missing value handling; perform steady-state identification on the preprocessed data based on time series analysis and / or statistical analysis; if the preprocessed data exhibits a steady-state pattern, use the preprocessed data to train a time series model to be trained to obtain the quantitative model; if the preprocessed data does not exhibit a steady-state pattern, use the preprocessed data as the sample data and perform the step of preprocessing the sample data to obtain preprocessed data.

[0017] In one possible implementation, the resource adjustment module includes: a first adjustment unit, configured to increase the resource capacity of the service resource if the second transaction traffic is greater than the first transaction traffic.

[0018] In one possible implementation, the service resource is a server, the resource capacity of the service resource is the number of servers, and the first adjustment unit is specifically used to obtain the target number of servers corresponding to the second transaction traffic; and increase the number of servers to the target number.

[0019] In one possible implementation, the resource adjustment module includes a second adjustment unit, configured to reduce the resource capacity of the service resource if the second transaction traffic is less than the first transaction traffic.

[0020] In one possible implementation, the service resource is a server, the resource capacity of the service resource is the number of servers, and the second adjustment unit is specifically used to obtain the target number of servers corresponding to the second transaction traffic; and reduce the number of servers to the target number.

[0021] Thirdly, an electronic device is provided, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, causing the electronic device to perform the methods of the first aspect or any possible implementation thereof.

[0022] Fourthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0023] Fifthly, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof. Attached Figure Description

[0024] Figure 1 shows a schematic flowchart of a resource adjustment method provided in an embodiment of this specification.

[0025] Figure 2 shows a schematic diagram of the qualitative model for predicting the occurrence of active events provided in the embodiments of this specification.

[0026] Figure 3 shows a schematic diagram of the time series model training provided in the embodiments of this specification.

[0027] Figure 4 shows a schematic diagram of the quantitative model for predicting transaction flow provided in the embodiments of this specification.

[0028] Figure 5 shows a schematic diagram of a resource adjustment device provided in an embodiment of this specification.

[0029] Figure 6 shows a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. Detailed Implementation

[0030] The technical solutions in the embodiments of this specification will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this specification, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this specification, "multiple" refers to two or more than two.

[0031] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0032] In the context of the normalization of live-streaming e-commerce and promotions, the payment traffic generated by consumer transactions may surge at any time, and after the surge, the payment traffic will quickly bottom out, and there may be a second small peak at any time. At present, we are facing the premise of overall reduction in service resources. Therefore, how to efficiently allocate service resources to cope with the daily promotions and maximize the use of limited service resources has become an urgent problem to be solved.

[0033] To achieve efficient allocation and maximum utilization of service resources, the existing solution is called the interbank liquidity prediction solution. This solution establishes an interbank liquidity event database, captures relevant interbank events, and predicts T+1 liquidity based on expert experience rules. The drawbacks of this solution include: 1) It cannot perform fine-grained T+0 predictions, meaning it can only predict liquidity for the next day (T+1), not for the current day (T+0). 2) This solution relies solely on expert experience and does not perform time-series analysis of the data itself, thus it cannot fully match flow prediction and cannot provide accurate quantitative references for expansion and contraction operations.

[0034] Based on the above problems, the embodiments of this specification can predict in advance whether there will be any active events that promote the execution of transaction events in the future at TH+N and T+N. After predicting that there will be active events, it can predict when to expand or shrink the service resources that support the execution of transaction events, which is conducive to providing a higher reference guarantee for the accuracy of the expansion and shrinkage of service resources.

[0035] The following is an embodiment of a resource adjustment method provided in the embodiments of this specification.

[0036] Figure 1 shows a schematic flowchart of a resource adjustment method provided in an embodiment of this specification. For example, as shown in Figure 1, the resource adjustment method provided in this embodiment is applied to the adjustment of service resources in transaction scenarios, such as payment scenarios and installment repayment scenarios.

[0037] The above-mentioned resource adjustment methods include the following schemes.

[0038] S110: Obtain target data.

[0039] In the embodiment shown in Figure 1, the target data includes at least one of the following: recorded data about activity events, historical transaction data generated from previous executions of transaction events, and system data. A transaction event can be understood as an event involving a transaction through a product, such as a payment product or a loan / repayment product. Activity events are used to facilitate the execution of transaction events. An activity event refers to a large-scale promotional activity conducted by a merchant to attract a large number of consumers to purchase goods or services. These activities are typically accompanied by significant price discounts, coupons, gifts, and other marketing methods. Conducting activity events helps increase transaction volume, and the transaction flow generated by executing transaction events also increases accordingly.

[0040] The data entered is acquired online and is considered online data. It is typically manually entered into the system by the merchant's event planners. The entered data includes: event name, event type, event start and end times, event scale, number of participants, expected sales targets, and event promotion methods.

[0041] Historical transaction data and system data are existing data and are considered offline data. Historical transaction data includes operational data characteristics, push notification characteristics, and marketing characteristics of the shopping application. Operational data characteristics include user behavior data, product views, purchase history, search keywords, and user preferences. Push notification characteristics come from the sending and receiving records of push messages, including the number of pushes, push content, push time, user click-through rate, and conversion rate. Marketing characteristics include advertising placement, promotional activities, partnerships, and brand influence.

[0042] System data includes load testing plan characteristics and capacity characteristics. The load testing plan characteristics are derived from the results of system stress testing, including test time, test scenario, test traffic, system response time and error rate, etc. The capacity characteristics include system hardware configuration, number of servers, bandwidth, database size, etc.

[0043] S120: Predict whether to carry out an activity event in the future based on target data.

[0044] After obtaining the target data, a comprehensive analysis of the target data is conducted to predict whether an event will be held in the future. If an event is predicted to be held in the future, the specific time of the event can be determined.

[0045] S130: Acquire the first transaction flow when an event is predicted to take place in the future.

[0046] There are two scenarios for predicting future events. The first scenario is when there are no events currently taking place, but an event is predicted to take place in the future. For example, if the current date is September 28, 2024, and there are no events taking place on September 28, then an event is predicted to take place on October 10, 2024.

[0047] Since some events have long durations, such as 3 days, 7 days, or 30 days, the second scenario involves an event that has already started at the current time, but is predicted to continue at a future time. For example, if the current time is October 10, 2024, and an event has already started on October 10, and it is predicted that an event will continue on October 11, 2024, then the event that started on October 10 has not yet ended, and will continue on October 11.

[0048] The first transaction flow can be understood as the transaction flow acquired at the current time, which belongs to the transaction flow that has actually been generated. Since there are two scenarios where an event is predicted to take place in the future, the acquired first transaction flow also corresponds to two scenarios: In the first scenario, the acquired first transaction flow includes the transaction flow generated by executing transactions before the event takes place; in the second scenario, the acquired first transaction flow includes only the transaction flow generated by executing transactions before the event takes place. That is, when an event is predicted to take place in the future, the acquired first transaction flow includes either the transaction flow generated by executing transactions before the event takes place, or the transaction flow generated by executing transactions at any time during the event.

[0049] S140: Based on the first transaction flow, predict the second transaction flow generated during the activity event period; wherein the time corresponding to the first transaction flow is earlier than the time corresponding to the second transaction flow.

[0050] After obtaining the first transaction flow, the second transaction flow is predicted based on the first transaction flow during the event period. Both the first and second transaction flows are daily flows. The second transaction flow can be understood as the target or predicted transaction flow generated by executing the transaction event during the event period at a future time. Since the second transaction flow is predicted, the time corresponding to the second transaction flow is later than the time corresponding to the first transaction flow. If T represents the time corresponding to the first transaction flow, the time corresponding to the second transaction flow is represented as T+N, where N is a positive integer greater than or equal to 1, and the unit of T can be "days" or "hours". For example, if the current time is September 28, 2024, and no event has yet started on September 28, but an event is predicted to start on October 10, 2024, then the second transaction flow predicts the transaction flow generated by executing the event when the event starts on October 10, 2024.

[0051] S150: Adjust the resource capacity of the service resources used to support the execution of transaction events based on the first transaction flow and the second transaction flow.

[0052] Service resources used to support the execution of transaction events include at least one of computing resources, network resources, and storage resources. Computing resources include servers, CPUs, memory, disk space, etc.; network resources include bandwidth, network devices, etc.; and storage resources include databases, caches, etc.

[0053] After obtaining the first and second transaction traffic, the resource capacity of the service resources is adjusted by comparing them. If it is necessary to increase the resource capacity, the operation of increasing the service resource capacity is performed, which is equivalent to expanding the service resource; if it is necessary to decrease the service resource capacity, the operation of decreasing the service resource capacity is performed, which is equivalent to shrinking the service resource. By adjusting the resource capacity of the service resources, a reasonable allocation of service resources can be achieved, ensuring that the adjusted resource capacity can effectively cope with the transaction traffic generated during the execution of transaction events, which is conducive to improving system stability and user experience during the event.

[0054] This specification's embodiments use at least one of the following: recorded data about activity events, historical transaction data generated from previous executed transaction events, and system data. It predicts whether an activity event will be held in the future to facilitate transaction execution. If an activity event is predicted to be held in the future, it predicts a second transaction flow during the activity event period by using a first transaction flow, which includes transaction flow generated before the activity event or transaction flow generated at any time during the activity event. The time corresponding to the first transaction flow is earlier than the time corresponding to the second transaction flow. Then, it calculates the second transaction flow based on the first and second transaction flows. This technical solution, which adjusts the resource capacity of service resources used to support transaction event execution, can predict in advance whether there will be any events that facilitate transaction event execution in the future at TH+N and T+N. Once an event is predicted, it can predict when to expand or shrink the service resources supporting transaction event execution, providing a higher reference guarantee for the accuracy of service resource expansion and contraction. Furthermore, by expanding or shrinking the service resources, it can achieve reasonable allocation of service resources, ensuring that the adjusted resource capacity can effectively cope with the transaction traffic generated during the execution of transaction events, thus improving system stability and user experience during the event period.

[0055] In one possible implementation, the above-mentioned prediction of whether to carry out an activity event in the future based on target data includes the following scheme: inputting the target data into a pre-trained qualitative model to obtain the prediction probability; if the prediction probability is greater than or equal to a probability threshold, determining that the activity event will be carried out in the future; if the prediction probability is less than the probability threshold, determining that the activity event will not be carried out in the future.

[0056] Predicting whether future events will take place is achieved through a pre-trained qualitative model, specifically a classification probability feature model used for event clustering. This model is trained in a supervised manner on data based on expert experience and factual results, improving the accuracy of predicting future events. The data based on expert experience and factual results is of the same data type as the target data mentioned above, but it carries labels. The supervised training process for the classification probability feature model includes the following steps.

[0057] 1. Collect data that includes expert experience and factual results. This data should include past events and their related characteristics, as well as expert probability estimates or classification labels for these events.

[0058] 2. Extract useful features, which can be key indicators from expert experience or relevant variables mined from the raw data.

[0059] 3. Select a supervised learning model suitable for the task, such as logistic regression, decision tree, random forest, support vector machine, neural network, etc.

[0060] 4. Train the selected model using labeled data, with labels derived from expert experience and factual findings, indicating the probability that each sample belongs to a certain category (activity occurs or does not occur).

[0061] 5. Use cross-validation or other validation methods to evaluate the model's performance and ensure that the model does not overfit or underfit.

[0062] 6. Adjust model parameters based on validation results to improve model performance, and evaluate the model's generalization ability using an independent test dataset.

[0063] 7. Model deployment: The trained classification probability feature model is used as the qualitative model, which means the model training is complete.

[0064] Figure 2 illustrates a schematic diagram of the qualitative model used in this embodiment to predict the occurrence of an event. After training the qualitative model, it is applied by inputting the target data into the model. The model processes the target data, and its output is transformed by the Softmax function (activation function) to output a prediction result. This prediction result is a probability value between 0 and 1, called the prediction probability. Then, the prediction probability is compared to a probability threshold. If the prediction probability is greater than or equal to the threshold, the event is considered to occur in the future; if the prediction probability is less than the threshold, the event is considered not to occur in the future.

[0065] In one possible implementation, the second transaction flow generated during the execution of an activity event, based on the prediction of the first transaction flow, includes the following schemes.

[0066] The first transaction flow is input into a pre-trained quantitative model to obtain the second transaction flow.

[0067] The quantitative model is a pre-trained time series model for predicting transaction flow. For example, an ARIMA (Autoregressive Integrated Moving Average) model may be selected. Figure 3 illustrates the training of the time series model provided in this embodiment. The training of the time series model is as follows.

[0068] S210: Obtain historical transaction flow data related to the execution of transaction events to obtain sample data, which includes the sample data that has already been generated.

[0069] S212: Preprocess the sample data to obtain preprocessed data; wherein, the preprocessing of the sample data includes, but is not limited to, at least one of data cleaning, outlier handling, and missing value handling. Data cleaning mainly removes meaningless or erroneous data points; outlier handling deals with extreme values ​​that exceed the normal range, and can remove or replace them with more reasonable values; missing value handling fills in or deletes missing data points.

[0070] S214: Based on time series analysis and / or statistical analysis, perform steady-state identification on the preprocessed data; where steady state means that the data exhibits a certain regularity, such as periodicity or trend. Time series analysis and / or statistical analysis can be used to determine whether the preprocessed data is in a steady state. If the preprocessed data exhibits a steady-state pattern, it is considered to meet the modeling requirements; otherwise, the preprocessed data may have problems such as large fluctuations or unstable trends. If the preprocessed data exhibits a steady-state pattern, proceed to S216; if the preprocessed data does not exhibit a steady-state pattern, proceed to S218.

[0071] S216: Use preprocessed data to train the time series model to obtain a quantitative model; if the preprocessed data exhibits a steady-state pattern, the preprocessed data can be used to train the time series model, such as ARIMA. After training, the resulting model is the so-called quantitative model, which can be used to predict future transaction flows.

[0072] S218: Use the preprocessed data as sample data and execute S212; if the preprocessed data does not show a steady-state pattern, the sample data needs to be readjusted. At this time, use the preprocessed data as sample data again and repeat S212 until the obtained preprocessed data meets the modeling requirements, thereby realizing model training.

[0073] As shown in Figure 4, which illustrates the quantitative model for predicting transaction flow provided in the embodiments of this specification, after training the quantitative model, the quantitative model is applied to predict transaction flow. First, a steady-state analysis is performed on the first transaction flow. If the first transaction flow exhibits a steady-state pattern, it is used as the model input. After processing the first transaction flow, the quantitative model outputs the second transaction flow, which is the predicted second transaction flow generated by the execution of transaction events during the activity event. If the first transaction flow does not exhibit a steady-state pattern, it is preprocessed until the preprocessed first transaction flow exhibits a steady-state pattern. Then, the preprocessed first transaction flow is used as the model input, and the quantitative model outputs the second transaction flow.

[0074] In one possible implementation, adjusting the resource capacity of the service resources used to support the execution of transaction events based on the first transaction flow and the second transaction flow includes the following scheme: comparing the second transaction flow and the first transaction flow; if the second transaction flow is greater than the first transaction flow, increasing the resource capacity of the service resources; if the second transaction flow is less than the first transaction flow, decreasing the resource capacity of the service resources.

[0075] After obtaining the second transaction flow, compare it with the first transaction flow to obtain the comparison result. The comparison result can determine the changes in service resource demand. If the second transaction flow is greater than the first, it indicates that transaction flow will increase significantly during the event, requiring an increase in service resource capacity, i.e., service resource expansion. Conversely, if the second transaction flow is less than the first, it indicates that transaction flow will not increase significantly during the event, but rather decrease, requiring a reduction in service resource capacity, i.e., service resource reduction.

[0076] In one possible implementation, where the service resource is a server and the resource capacity of the service resource is the number of servers, the above-mentioned increase in the resource capacity of the service resource includes the following schemes: obtaining the target number of servers corresponding to the second transaction traffic; and increasing the number of servers to the target number.

[0077] The system pre-determines the corresponding number of servers for different transaction flows, with one server for each transaction flow. By comparing the second and first transaction flows, it determines the server capacity needed, yielding the target number of servers for the second transaction flow. The current number of servers is then increased to reach this target number. This approach increases the number of servers to handle the transaction flow generated during event execution, improving system stability and user experience during event execution, and ensuring accurate and reasonable allocation of server resources.

[0078] When the service resource is a server and the resource capacity of the service resource is the number of servers, the above-mentioned increase in the resource capacity of the service resource includes the following schemes: obtaining the target number of servers corresponding to the second transaction traffic; reducing the number of servers to the target number.

[0079] By comparing the second transaction traffic with the first transaction traffic, it is determined that the server needs to be scaled down. The number of servers corresponding to the second transaction traffic can be obtained, i.e., the target number of servers. Then, the current number of servers is reduced to the target number. This reduces the number of servers to handle the transaction traffic generated during the execution of transaction events during the event, which helps to avoid the waste of server resources and achieves accurate and reasonable allocation of server resources.

[0080] The following are embodiments of the apparatus disclosed herein, which can be used to execute embodiments of the method disclosed herein. For details not disclosed in the apparatus embodiments of this disclosure, please refer to the embodiments of the method disclosed herein.

[0081] Figure 5 shows a schematic diagram of a resource adjustment device provided in an embodiment of this specification. Exemplarily, as shown in Figure 5, the resource adjustment device 500 includes: a first acquisition module 510, used to acquire target data; wherein the target data includes at least one of recorded data about an activity event, historical transaction data generated from previous executions of transaction events, and system data, the activity event being used to facilitate the execution of the transaction event; a first prediction module 520, used to predict whether the activity event will be carried out in the future based on the target data; a second acquisition module 530, used to acquire a first transaction flow if the activity event is predicted to be carried out in the future; wherein the first transaction flow includes transaction flow generated before the activity event is carried out, or transaction flow generated at any time during the activity event; a second prediction module 540, used to predict a second transaction flow generated during the activity event based on the first transaction flow; wherein the time corresponding to the first transaction flow is earlier than the time corresponding to the second transaction flow; and a resource adjustment module 550, used to adjust the resource capacity of service resources used to support the execution of the transaction event based on the first transaction flow and the second transaction flow.

[0082] In one possible implementation, the first prediction module 520 is specifically used to input the target data into a pre-trained qualitative model to obtain a predicted probability; wherein the qualitative model is a classification probability feature model for clustering activity events; if the predicted probability is greater than or equal to a probability threshold, it is determined that the activity event will be carried out in the future time; if the predicted probability is less than the probability threshold, it is determined that the activity event will not be carried out in the future time.

[0083] In one possible implementation, the second prediction module 540 is specifically used to predict the second transaction flow generated during the execution of the activity event based on the first transaction flow, which includes: inputting the first transaction flow into a pre-trained quantitative model to obtain the second transaction flow; wherein the quantitative model is a time series model for transaction flow prediction.

[0084] In one possible implementation, the resource adjustment device 500 further includes: a model training unit, configured to acquire historical transaction traffic generated by executing the transaction event to obtain sample data; preprocess the sample data to obtain preprocessed data; wherein the preprocessing includes at least one of data cleaning, outlier handling, and missing value handling; perform steady-state identification on the preprocessed data based on time series analysis and / or statistical analysis; if the preprocessed data exhibits a steady-state pattern, use the preprocessed data to train a time series model to be trained to obtain the quantitative model; if the preprocessed data does not exhibit a steady-state pattern, use the preprocessed data as the sample data and perform the step of preprocessing the sample data to obtain preprocessed data.

[0085] In one possible implementation, the resource adjustment module 550 includes: a first adjustment unit, configured to increase the resource capacity of the service resource if the second transaction traffic is greater than the first transaction traffic.

[0086] In one possible implementation, the service resource is a server, the resource capacity of the service resource is the number of servers, and the first adjustment unit is specifically used to obtain the target number of servers corresponding to the second transaction traffic; and increase the number of servers to the target number.

[0087] In one possible implementation, the resource adjustment module 550 includes a second adjustment unit, configured to reduce the resource capacity of the service resource if the second transaction traffic is less than the first transaction traffic.

[0088] In one possible implementation, the service resource is a server, the resource capacity of the service resource is the number of servers, and the second adjustment unit is specifically used to obtain the target number of servers corresponding to the second transaction traffic; and reduce the number of servers to the target number.

[0089] It should be noted that the resource adjustment device provided in the above embodiments is only illustrated by the division of the above functional modules when executing the resource adjustment method. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the resource adjustment device and resource adjustment method embodiments provided in the above embodiments belong to the same concept. Therefore, for details not disclosed in the device embodiments of this disclosure, please refer to the above-described resource adjustment method embodiments of this disclosure, which will not be repeated here.

[0090] The sequence numbers of the embodiments disclosed above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0091] Figure 6 shows a schematic diagram of the structure of an electronic device provided in an embodiment of this specification.

[0092] For example, as shown in FIG6, the electronic device 600 includes a memory 601 and a processor 602, wherein the memory 601 stores executable program code 6011, and the processor 602 is used to call and execute the executable program code 6011 to perform a resource adjustment method.

[0093] This embodiment can divide the electronic device into functional modules according to the above method example. For example, each module can correspond to a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0094] When each functional module is divided according to its corresponding function, the electronic device may include: a first acquisition module, a first prediction module, a second acquisition module, a second acquisition module, a resource adjustment module, etc. It should be noted that all relevant content of each step involved in the above method embodiments can be referenced to the functional description of the corresponding functional module, and will not be repeated here.

[0095] The electronic device provided in this embodiment is used to execute the resource adjustment method described above, and thus can achieve the same effect as the above implementation method.

[0096] When using integrated units, the electronic device may include a processing module and a storage module. The processing module is used to control and manage the operation of the electronic device. The storage module is used to support the execution of program code and data by the electronic device.

[0097] The processing module may be a processor or a controller, which can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the embodiments disclosed in this specification. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.

[0098] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the aforementioned method steps to implement a resource adjustment method in the above embodiment.

[0099] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement a resource adjustment method as described in the above embodiment.

[0100] Furthermore, the electronic device provided in the embodiments of this specification may specifically be a chip, component, or module. The electronic device may include a connected processor and a memory. The memory is used to store instructions. When the electronic device is running, the processor may call and execute the instructions to cause the chip to execute a resource adjustment method in the above embodiments.

[0101] In this embodiment, the electronic device, computer-readable storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0102] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0103] In the embodiments provided in this specification, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0104] The above description is merely a specific implementation of the embodiments of this specification, but the protection scope of the embodiments of this specification is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the embodiments of this specification should be included within the protection scope of the embodiments of this specification. Therefore, the protection scope of the embodiments of this specification should be determined by the protection scope of the claims.

Claims

1. A resource adjustment method, comprising: obtaining target data, wherein the target data comprises at least one of input data about an activity event, historical transaction data generated by a past execution of a transaction event, and system data, the activity event being used to facilitate the execution of the transaction event; predicting whether the activity event will be launched at a future time according to the target data; if yes, obtaining a first transaction flow, wherein the first transaction flow comprises a transaction flow generated by an execution of the transaction event before the activity event is launched, or a transaction flow generated by an execution of the transaction event at any time during the activity event is launched; predicting a second transaction flow generated by an execution of the transaction event during the activity event is launched according to the first transaction flow, wherein the first transaction flow corresponds to a time earlier than the second transaction flow; and adjusting a resource capacity of a service resource used to support the execution of the transaction event according to the first transaction flow and the second transaction flow. 2.The resource adjustment method of claim 1, wherein the predicting whether the activity event will be launched at a future time according to the target data comprises: inputting the target data into a pre-trained qualitative model to obtain a prediction probability, wherein the qualitative model is a classification probability feature model used for activity event clustering; determining that the activity event will be launched at the future time if the prediction probability is greater than or equal to a probability threshold; and determining that the activity event will not be launched at the future time if the prediction probability is less than the probability threshold. 3.The resource adjustment method of claim 1, wherein the predicting a second transaction flow generated by an execution of the transaction event during the activity event is launched according to the first transaction flow comprises: inputting the first transaction flow into a pre-trained quantitative model to obtain the second transaction flow, wherein the quantitative model is a time series model used for transaction flow prediction. 4.The resource adjustment method of claim 3, further comprising: obtaining historical transaction flow data generated by an execution of the transaction event to obtain sample data; pre-processing the sample data to obtain pre-processed data, wherein the pre-processing comprises at least one of data cleaning, outlier processing, and missing value processing; performing steady state identification on the pre-processed data according to time series analysis and / or statistical analysis; training a time series model to be trained using the pre-processed data to obtain the quantitative model if the pre-processed data exhibits a steady state mode; and performing the pre-processing the sample data to obtain pre-processed data again if the pre-processed data does not exhibit a steady state mode. 5.The resource adjustment method of any one of claims 1 to 4, wherein the adjusting a resource capacity of a service resource used to support the execution of the transaction event according to the first transaction flow and the second transaction flow comprises: ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ If the second transaction flow is greater than the first transaction flow, increase the resource capacity of the service resource.

6. The resource adjustment method according to claim 5, wherein the service resource is a server, and the resource capacity of the service resource is the number of servers; The increase in the resource capacity of the service resources includes: Obtain the target number of servers corresponding to the second transaction traffic; Increase the number of servers to the target number.

7. The resource adjustment method according to any one of claims 1 to 4, wherein adjusting the resource capacity of the service resources used to support the execution of the transaction event based on the first transaction flow and the second transaction flow comprises: If the second transaction flow is less than the first transaction flow, reduce the resource capacity of the service resource.

8. The resource adjustment method according to claim 7, wherein the service resource is a server, and the resource capacity of the service resource is the number of servers; The reduction of the resource capacity of the service resources includes: Obtain the target number of servers corresponding to the second transaction traffic; Reduce the number of servers to the target number.

9. A resource adjustment device, the resource adjustment device comprising: The first acquisition module is used to acquire target data; wherein, the target data includes at least one of the following: recorded data about activity events, historical transaction data generated by previous executed transaction events, and system data, and the activity events are used to facilitate the execution of the transaction events; The first prediction module is used to predict whether the activity event will be carried out in the future based on the target data. The second acquisition module is used to acquire a first transaction flow when the activity event is predicted to take place in the future; wherein the first transaction flow includes the transaction flow generated by executing the transaction event before the activity event takes place, or the transaction flow generated by executing the transaction event at any time during the activity event; The second acquisition module is used to predict, based on the first transaction flow, the second transaction flow generated during the activity event, when the transaction event is carried out; wherein the time corresponding to the first transaction flow is earlier than the time corresponding to the second transaction flow. The resource adjustment module is used to adjust the resource capacity of the service resources used to support the execution of the transaction event based on the first transaction traffic and the second transaction traffic.

10. An electronic device, the electronic device comprising: Memory, used to store executable program code; A processor is configured to call and run the executable program code from the memory, causing the electronic device to perform the resource adjustment method as described in any one of claims 1 to 8.

11. A computer-readable storage medium storing a computer program that, when executed, implements the resource adjustment method as described in any one of claims 1 to 8.

12. A computer program product comprising instructions that, when run on a computer or processor, causes the computer or processor to perform the resource adjustment method as described in any one of claims 1 to 8.