Multi-data center maximum concurrency prediction method, device, equipment and product
By acquiring transaction performance data from a single data center and response time from multiple data centers, the maximum concurrency value of multiple data centers can be predicted, solving the problem of unreasonable resource allocation in multi-data center systems and achieving more scientific resource planning and business stability.
Patent Information
- Application Number
- CN202510785797.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2026-01-13
AI Technical Summary
In multi-data center systems, network latency makes it difficult to accurately determine the maximum concurrent processing capacity of each data center, leading to unreasonable resource allocation, with some data centers being overloaded while others are idle, affecting overall efficiency and user experience.
By acquiring transaction performance data sets from a single data center, the distribution characteristics of preset transactions can be determined. Combined with the first response time of multiple data centers, mathematical models or machine learning algorithms can be used to predict the maximum concurrency value of multiple data centers, providing a scientific basis for resource allocation.
By predicting the maximum concurrency capacity of multiple data centers when processing preset transactions in advance, resources can be allocated reasonably to reduce the risk of performance management system errors caused by exceeding concurrency limits and ensure stable business operation.
Smart Images

Figure CN121329635A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of distributed systems, and more particularly to a method, apparatus, device, and product for predicting maximum concurrency across multiple data centers. Background Technology
[0002] With the development of the digital age, the amount of data is growing explosively, and single data centers are gradually becoming unable to meet business needs in terms of storage capacity, computing power, and disaster recovery backup. In order to improve system reliability, enhance data processing capabilities, and realize the geographical distribution of data, multi-data center architecture has emerged and become a key choice for many enterprises and organizations to ensure business continuity and efficient operation.
[0003] In multi-datacenter operation, the data centers collaborate, using high-speed networks to synchronize data and allocate tasks. Different data centers can provide services to users in different regions, reducing access latency. Simultaneously, business requests are rationally distributed across the data centers to ensure full resource utilization and collaborative data processing.
[0004] However, multiple data centers also face some challenges, such as network latency between data centers, complex data consistency maintenance, and difficulty in grasping the maximum concurrent processing capacity of each data center. This may lead to unreasonable resource allocation, with some data centers being overloaded while others are idle, affecting overall efficiency and user experience. Summary of the Invention
[0005] This application provides a method, apparatus, device, and product for predicting the maximum concurrency of multiple data centers, in order to solve the problem of unreasonable allocation of concurrent resources when a single data center is converted into multiple data centers due to network latency, which makes it difficult to determine the maximum concurrency of each data center.
[0006] Firstly, this application provides a method for predicting maximum concurrency across multiple data centers, including:
[0007] Obtain a set of transaction performance data for a single data center when executing preset transactions;
[0008] Based on the transaction performance data set, determine the distribution characteristics of the preset transactions;
[0009] Determine the first response time of multiple data centers when executing the preset transaction, wherein the multiple data centers include at least two data centers;
[0010] Based on the distribution characteristics and the first response time, the maximum concurrency value of the multiple data centers is predicted.
[0011] Secondly, this application provides a maximum concurrency prediction device for multiple data centers, comprising:
[0012] The acquisition module is used to acquire a set of transaction performance data for a single data center when executing a preset transaction;
[0013] The determination module is used to determine the distribution characteristics of the preset transactions based on the transaction performance data set;
[0014] The determining module is also used to determine the first response time of the multiple data centers when executing the preset transaction, wherein the multiple data centers include at least two data centers;
[0015] The prediction module is used to predict the maximum concurrency value of the multiple data centers based on the distribution characteristics and the first response duration.
[0016] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0017] The memory stores computer-executed instructions;
[0018] The processor executes computer execution instructions stored in the memory to implement the multi-datacenter maximum concurrency prediction method as described in the first aspect and various possible implementations of the first aspect above.
[0019] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions thereon, which, when executed by a processor, are used to implement the maximum concurrency prediction method for multiple data centers as described in the first aspect and various possible implementations of the first aspect.
[0020] Fifthly, this application provides a program product including a computer program that, when executed by a processor, implements the maximum concurrency prediction method for multiple data centers as described above.
[0021] The method, apparatus, equipment, and product for predicting maximum concurrency across multiple data centers provided in this application collect transaction performance data generated by a single data center during the execution of a preset transaction, integrate this data into a dataset, and analyze the data in the dataset to derive the distribution characteristics of the preset transaction execution. Subsequently, the first response time of multiple data centers processing the same preset transaction is determined. Finally, by comprehensively utilizing these two key elements—distribution characteristics and first response time—the maximum concurrency value of multiple data centers processing the preset transaction is predicted, providing a strong reference for resource allocation across multiple data centers. This method can predict in advance the maximum concurrency capacity of multiple data centers in handling preset transactions, thereby providing a scientific basis for resource allocation. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0023] Figure 1 A flowchart illustrating a maximum concurrency prediction method for multiple data centers provided in this application embodiment. Figure 1 ;
[0024] Figure 2 A flowchart illustrating a maximum concurrency prediction method for multiple data centers provided in this application embodiment. Figure 2 ;
[0025] Figure 3 A flowchart illustrating a maximum concurrency prediction method for multiple data centers provided in this application embodiment. Figure 3 ;
[0026] Figure 4 A flowchart illustrating a maximum concurrency prediction method for multiple data centers provided in this application embodiment. Figure 4 ;
[0027] Figure 5 A schematic diagram of the structure of a multi-datacenter maximum concurrency prediction device provided in this application;
[0028] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application.
[0029] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0030] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0031] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with relevant laws, regulations, and standards, necessary confidentiality measures have been taken, they do not violate public order and good morals, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0032] Furthermore, the technical solution involved in this application, which involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) and the use of artificial intelligence technology for automated decision-making, and makes decisions that have a significant impact on personal rights based on the results of automated decision-making, provides users with corresponding operation entry points for users to choose to agree to or reject the results of automated decision-making; if the user chooses to reject, the process will proceed to the expert decision-making process.
[0033] It should be noted that the maximum concurrency prediction method, apparatus, equipment and products for multiple data centers provided in this application can be used in the distributed field, or in any field other than distributed fields. The application fields of the maximum concurrency prediction method, apparatus, equipment and products for multiple data centers in this application are not limited.
[0034] In today's rapidly developing digital age, data volumes are growing exponentially, and single data centers are increasingly unable to meet business demands in terms of storage, computing, and disaster recovery. To improve system reliability, enhance data processing capabilities, and achieve geographically distributed data, multi-data center architectures have emerged as a key choice for ensuring business continuity and efficient operation. They can distribute storage and computing loads, reducing the risk of business interruptions.
[0035] When multiple data centers are used, they collaborate, using high-speed networks to synchronize data and allocate tasks. Different data centers provide services to users in different regions, reducing access latency. With the help of intelligent load balancing algorithms, business requests can be rationally distributed across data centers, making full use of resources to collaboratively complete data processing and improve system efficiency.
[0036] However, the distance between multiple data centers and network conditions cause network latency, which in turn affects system transaction response time and thus impacts maximum concurrent processing capacity. This can lead to unreasonable resource allocation, with some data centers overloaded while others are idle, affecting overall efficiency and user experience.
[0037] To address the aforementioned issues, this application proposes a method for predicting the maximum concurrency across multiple data centers. This method derives and predicts the maximum concurrency value across multiple data centers based on the performance data of transaction execution in a single data center and the response time of transaction execution across multiple data centers. In the construction of multiple data centers, this method can better adjust the resource allocation and settings of the corresponding data centers in advance, minimize errors caused by changes in transaction response time during the construction process, and thus reduce the impact on business operations.
[0038] This application can be applied to the construction and operation of multi-data center scenarios. In the planning stage before the execution of a transaction system based on a multi-data center architecture, this application can be used to combine historical transaction performance data of a single data center with the transaction response time in a simulated multi-data center environment to reasonably plan the resource allocation and settings of each data center in advance. When the transaction system is running, in the face of dynamic changes in business volume and fluctuations in network conditions, this application can also be used to predict the maximum concurrency value of multiple data centers in real time, adjust resources in a timely manner, reduce errors caused by changes in transaction response time, and ensure stable business operation.
[0039] The executing entity of this application may be a system, platform or related software module with data processing and analysis capabilities. For example, it may be a performance management system specifically used for multi-data center performance evaluation and resource planning. The following description uses a performance management system as the executing entity to illustrate this application.
[0040] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0041] Figure 1 A flowchart illustrating a maximum concurrency prediction method for multiple data centers provided in this application embodiment. Figure 1 .like Figure 1 As shown, the maximum concurrency prediction method for multiple data centers provided in this embodiment includes:
[0042] S101: Obtain the transaction performance data set of a single data center when executing a preset transaction.
[0043] Understandably, a single data center refers to an independent data processing center with complete computing, storage, and network resources, used to handle various transaction operations. Preset transactions implement specific, predetermined transaction types or operational procedures; for example, in a financial system, a transaction could be a specific transfer transaction or inquiry transaction.
[0044] By deploying monitoring tools and performance analysis software within a single data center, various performance data during the execution of the preset transaction are collected in real-time or periodically. This data can cover multiple dimensions, such as transaction execution time (the time elapsed from transaction initiation to completion), system resource usage (e.g., CPU utilization, memory usage, disk input / output, etc.), and network latency (the delay in transmitting transaction data over the data center's internal network). Integrating this data from different dimensions and time points forms a dataset of transaction performance data for the single data center during the execution of the preset transaction.
[0045] S102: Determine the distribution characteristics of preset transactions based on the transaction performance data set.
[0046] Understandably, to better understand the operational patterns and characteristics of pre-defined transactions within a single data center, the performance management system can analyze and study the acquired transaction performance data set to determine its distribution characteristics. Distribution characteristics reveal how the data is distributed across different value ranges. For example, by analyzing transaction processing time, the distribution of transaction processing time across different time periods can be statistically analyzed. Statistical analysis methods, such as calculating the mean and median, can also be used to determine the central tendency and dispersion of transaction performance data. This analysis allows us to understand the typical performance of pre-defined transactions within a single data center and the range of performance fluctuations, providing a basis for subsequent predictions and analyses.
[0047] S103: Determine the first response time for multiple data centers when executing a preset transaction.
[0048] In this context, a multi-datacenter system consists of at least two datacenters, which may be located in different geographical locations and are connected and collaborate via a network. The first response time refers to the time elapsed from when a user initiates a pre-defined transaction request to when one of the multi-datacenters provides its first response.
[0049] Understandably, in a multi-datacenter environment, the time it takes for a transaction request to return its initial response can be recorded using network monitoring tools or Application Programming Interfaces (APIs) by simulating or actually executing pre-defined transactions. This time is known as the first response time. For example, in a distributed system, when a client initiates a query request, the system distributes the request to multiple datacenters for processing, recording the time from when the request is sent to when the query result is received from the first datacenter. To ensure data accuracy, multiple tests can be performed, and the average or other suitable statistical value can be taken as the final first response time. The first response time reflects the response speed of multiple datacenters when processing transactions and helps to understand the system response as perceived by users in a multi-datacenter environment.
[0050] S104: Predict the maximum concurrency value of multiple data centers based on distribution characteristics and first response time.
[0051] Understandably, after understanding the distribution characteristics of preset transactions in a single data center and the first response time in multiple data centers, the performance management system can use this information to predict the maximum concurrency value across multiple data centers. The maximum concurrency value refers to the maximum number of preset transactions that the transaction system can stably process simultaneously in a multi-data center environment. Exceeding this number may lead to a significant decline in transaction system performance, such as a substantial increase in response time and error rate. The distribution characteristics reflect the performance fluctuation patterns and typical behavior of preset transactions in a single data center, while the first response time reflects the actual response capability of the multi-data center system in processing transactions.
[0052] Performance management systems can be trained and predicted by establishing mathematical models or utilizing machine learning algorithms, using distribution characteristics and first response time as input features and maximum concurrency as the output target. For example, it can be assumed that there is a functional relationship between the distribution characteristics of transaction performance data and the load capacity of multiple data centers. Combining this with the limitation of first response time on the transaction system's response speed, regression analysis and other methods can be used to fit this functional relationship, thereby predicting the maximum concurrency under different conditions. Alternatively, machine learning algorithms such as decision trees and neural networks can be used to train the model on a large amount of historical data, allowing it to automatically learn the potential patterns in the data and thus more accurately predict the maximum concurrency of multiple data centers.
[0053] This embodiment provides a method for predicting the maximum concurrency of multiple data centers. It obtains a set of transaction performance data from a single data center executing a preset transaction and uses this data to determine the distribution characteristics of the preset transaction execution. Next, it determines the first response time when multiple data centers execute the preset transaction. Finally, based on the distribution characteristics and the first response time, it predicts the maximum concurrency value of the multiple data centers, providing a basis for resource allocation across the multiple data centers. This method can effectively predict the maximum concurrency capacity of multiple data centers in processing preset transactions, helping to allocate resources rationally and reducing the risk of performance management system errors due to exceeding concurrency limits.
[0054] Figure 2 A flowchart illustrating a maximum concurrency prediction method for multiple data centers provided in this application embodiment. Figure 2 .like Figure 2 As shown, in Figure 1 Based on the embodiments, the distribution characteristics of determining a single data center are described in detail, including:
[0055] S201: Determine at least one maximum concurrency level when a single data center executes a preset transaction within a preset period.
[0056] Understandably, within a preset period, such as a 10-day time span, analyzing the execution of preset transactions in a single data center, and using data mining and transaction system monitoring methods, can statistically determine at least one maximum concurrency level for that data center during the execution of preset transactions. Maximum concurrency refers to the maximum number of simultaneous accesses or processing of preset transaction requests within a specific time period within the preset period. It is a key performance indicator that directly reflects the data center's capacity to handle high-concurrency scenarios, and is of great significance for evaluating the overall performance of the data center and for subsequent performance optimization and resource planning. To reduce the suddenness and randomness of transactions, it is usually possible to monitor all time periods within the preset period to obtain multiple maximum concurrency levels.
[0057] S202: Determine at least one data collection period based on the maximum concurrency.
[0058] The data collection period is the time period within a preset cycle where the maximum number of concurrent users is greater than that of other data collection periods.
[0059] Understandably, in determining the data collection period, monitoring tools and data analysis tools can be used to dynamically monitor and compare the maximum concurrency in each time period within a preset cycle. For example, data can be extracted from the daily monitoring database according to certain rules (e.g., the 10 highest concurrency points per day). After 10 days of data collection, 100 sample data points representing system peak performance can be identified, and the time periods corresponding to these sample data points are the required data collection periods. By focusing on data collection during these high-concurrency periods, the performance of the data center under extreme load conditions can be captured more accurately, providing data support for subsequent performance evaluation.
[0060] S203: Determine the number of transaction runs and the second response duration for a single data center within the data collection period.
[0061] Understandably, within a defined data collection period, the number of transaction runs and the second response time for a single data center within that period are determined. The number of transaction runs reflects the frequency with which preset transactions are executed during the collection period, directly reflecting the data center's business activity and processing capacity. The second response time, on the other hand, refers to the time elapsed from when a user initiates a transaction request to when the transaction system returns a response. It is a key indicator for measuring data center performance, directly related to user experience and system real-time performance. By accurately recording these two indicators, a comprehensive understanding of the data center's operational efficiency and performance during the collection period can be achieved.
[0062] S204: Based on the collection period, the maximum concurrency, number of transaction runs, and second response time are stored and processed to obtain a transaction performance data set.
[0063] Understandably, based on the established data collection period, key performance data such as maximum concurrency, number of transactions, and second response time are stored and processed. During storage, a reasonable data structure and storage method are required to ensure data integrity, accuracy, and accessibility. For example, this data can be categorized and stored according to the collection period, and corresponding data indexes can be established to facilitate quick and accurate subsequent querying and analysis. After storage processing, this data constitutes the transaction performance dataset. This dataset is the core foundation of the entire transaction performance evaluation system.
[0064] Among them, the maximum concurrency value reflects the upper limit of a single data center's ability to process the transaction, and can serve as a basic reference for estimating the concurrent carrying capacity of multiple data centers; analyzing the number of transactions run in a single data center can reveal the business activity and scale, providing a reference for estimating the transaction traffic scale of multiple data centers; response time reflects the efficiency of a single data center in processing transactions, and combined with factors such as network, it can help assess the impact of changes in transaction processing efficiency on concurrency in a multi-data center environment. Combining these analyses can more scientifically predict the maximum concurrency value of multiple data centers.
[0065] S205: For any one of the multiple data collection periods, determine the variance value of the data collection period based on the normal distribution and the transaction performance data set.
[0066] Understandably, analysis of the above data reveals that the maximum concurrency in a trading system is related to the temporal distribution of transactions. For example, in a flash sale system, the maximum concurrency occurs at the start of the sale, while in a pipelined task system, the maximum concurrency is relatively stable across different time periods. Therefore, the transaction distribution conforms to a normal distribution. For each defined data collection period, the variance of each period is determined using the principle of the normal distribution. The formula for the normal distribution is as follows:
[0067] ,Right now
[0068] The maximum concurrent output m of a single data center is the sum of transactions occurring during the period from the first response time r1 to 0, which is the integral of a normal distribution from r1 to 0. From this, the variance value can be calculated. The variance value is an important indicator for measuring the degree of data dispersion. By calculating the variance value, we can gain a deeper understanding of the performance fluctuations of the data center during different data collection periods.
[0069] To avoid single-sample error, the variance can be determined by calculating the average variance of multiple sample data. For example, the variance of 100 sample data can be calculated to determine the variance for the data collection period.
[0070] S206: Determine the distribution characteristics of preset transactions based on the variance value of the data collection period.
[0071] Understandably, based on the variance values of each data collection period calculated above, the distribution characteristics of the preset transactions throughout the entire preset period can be further analyzed and determined. These distribution characteristics may include the concentration of transactions, the range of fluctuations, etc., which helps to understand the performance characteristics and potential problems of a single data center in processing preset transactions.
[0072] This embodiment provides a method for predicting maximum concurrency across multiple data centers. It determines the maximum concurrency, number of runs, and response time when a transaction is executed in a single data center, and obtains the distribution characteristics of the transactions through data analysis. Maximum concurrency, number of runs, and response time contain key information about transaction operation within a single data center. The number of runs directly reflects the level and scale of business activity. Combining these data comprehensively depicts the operational status of transactions within a single data center from multiple dimensions. Simultaneously, utilizing a normal distribution to determine distribution characteristics allows for a precise description of the central tendency and dispersion of the data using mathematical models, providing a more scientific and stable basis for predicting maximum concurrency across multiple data centers. By using a normal distribution, the potential range of transaction concurrency across multiple data centers can be predicted more accurately, thereby enabling timely resource allocation and adjustments.
[0073] Figure 3 A flowchart illustrating a maximum concurrency prediction method for multiple data centers provided in this application embodiment. Figure 3 .like Figure 3 As shown, in Figure 1 Based on the embodiments, a detailed explanation is provided on determining the first response time of multiple data centers when executing preset transactions, including:
[0074] S301: Based on multiple data centers, identify at least one data center pair.
[0075] In this context, a data center pair refers to any two data centers in a multi-data center system.
[0076] Understandably, in a multi-datacenter environment, to evaluate network performance between data centers, at least one datacenter pair must first be identified. A datacenter pair refers to two datacenters arbitrarily selected from multiple datacenters. The selection of datacenter pairs can be random or determined based on a strategy (e.g., geographical proximity, business importance, etc.). By selecting different datacenter pairs, a comprehensive understanding of the network connectivity in the multi-datacenter environment can be obtained, providing data support for subsequent network performance optimization.
[0077] S302: Send a latency test command to the data center.
[0078] Understandably, after identifying data center pairs, the performance management system can send latency test commands to these pairs. The purpose of sending latency test commands is to instruct the two data centers in the pair to measure their network latency by sending echo requests (Packet Internet Groper, also known as the ping command) or other network diagnostic tools. The ping command is a commonly used network tool for testing network connectivity and latency. By sending ping commands and recording response times, network latency data between data center pairs can be obtained, providing a basis for subsequent network performance analysis.
[0079] S303: Obtain the test results of the data center pair and determine the network latency duration of multiple data centers based on the test results.
[0080] Understandably, after completing latency testing, test results for each data center pair can be obtained, including the network latency between each pair. By collecting and analyzing this data, the network latency in a multi-data center environment can be determined. This may involve averaging, statistically analyzing, or comparing the test results of multiple data center pairs to derive a comprehensive network latency metric. This metric is crucial for evaluating network performance in multi-data center environments, optimizing network architecture, and planning service deployments.
[0081] S304: Determine the number of cross-center transactions for the preset transaction.
[0082] Optionally, obtain the complete execution flow of a preset transaction;
[0083] The data centers in the complete execution process are labeled to obtain the number of cross-center operations.
[0084] Understandably, in a multi-datacenter environment, business transactions can be processed across multiple datacenters. To accurately assess the response time of a pre-defined transaction across multiple datacenters, the number of times the transaction crosses datacenters can be determined. The number of times a transaction crosses datacenters refers to the number of datacenters a transaction needs to traverse during processing. This can be obtained by analyzing program call relationships, business logic, or reviewing system logs.
[0085] This can be achieved by tracing the complete call chain of a pre-defined transaction from initiation to completion, including all services, modules, and database operations. Each service or module can be labeled with its corresponding data center. The number of data transfers between different data centers can then be counted to determine the cross-data center count.
[0086] S305: Determine the first response time for multiple data centers based on the latency and the number of cross-center operations.
[0087] Understandably, after determining the network latency and the number of cross-datacenter operations, the first response time across multiple data centers can be calculated. The first response time refers to the time from when a user initiates a transaction request to when the transaction system responds for the first time. In a multi-datacenter environment, this time typically includes the response time of a single data center (i.e., the processing time of the transaction within a single data center) plus the additional network latency caused by cross-datacenter transmission. Assuming the network latency is r0 and the number of cross-datacenter operations is n, then the first response time r2 = r1 + r0 × n. The first response time is also the preset execution time of the transaction across multiple data centers.
[0088] This embodiment provides a method for predicting the maximum concurrency of multiple data centers. By determining the network latency and the number of transactions crossing multiple data centers, and combining the two to determine the transaction response time, it can comprehensively and accurately reflect the actual response of transactions in multiple data centers, providing a reliable basis for subsequent prediction of the maximum concurrency of multiple data centers.
[0089] Figure 4 A flowchart illustrating a maximum concurrency prediction method for multiple data centers provided in this application embodiment. Figure 4 .like Figure 4 As shown, in Figure 1 Based on the implementation examples, a detailed explanation of the predicted maximum concurrency and resource allocation is provided, including:
[0090] S401: Based on normal distribution, distribution characteristics, first response time, and number of transaction runs, predict the maximum concurrency value of multiple data centers.
[0091] Understandably, after determining the distribution characteristics through the transaction performance data set of a single data center, the temporal distribution characteristics of the preset transactions are determined, which means that the maximum concurrency of the transaction response time changing from the second response duration r1 to the first response duration r2 can be calculated.
[0092] Based on the normal distribution, calculate the product of the definite integral from -r² to 0 and the number of transactions c, i.e. The calculated value is denoted as M, which is the predicted maximum concurrency value. The M value can be used as an assessment basis for the size of concurrent resources after changing from a single data center to a multi-data center.
[0093] S402: Determine the concurrent resource requirements for multiple data centers based on the maximum concurrency value.
[0094] Understandably, as a trading system evolves from a single data center to multiple data centers, trading requests may be distributed across different data centers. However, the overall system must still be able to handle the predicted maximum concurrency. Therefore, the required concurrency resources for each data center and the entire multi-data center system can be comprehensively determined based on the maximum concurrency value and the environmental characteristics of the multi-data center system (e.g., number of data centers, network bandwidth, server performance). These concurrency resources may include, but are not limited to, concurrency rate limiting thresholds (used to control the number of requests entering the trading system per unit time to prevent overload) and thread pool size (determining the number of concurrent tasks the trading system can handle simultaneously), to ensure that the trading system maintains efficient and stable operation in a multi-data center environment.
[0095] S403: When the concurrent resource demand value is greater than the concurrent resource value of multiple data centers, the concurrent resource value is adjusted to meet the maximum concurrency value.
[0096] Understandably, after assessing the concurrent resource requirements, it can be compared with the actual concurrent resource values currently available across multiple data centers. If the concurrent resource requirements exceed the concurrent resource values of the multiple data centers, the transaction system may not be able to effectively handle all requests in high-concurrency scenarios, leading to serious consequences such as increased response latency, degraded user experience, or even system crashes.
[0097] Therefore, the concurrent resource value needs to be adjusted. Assuming the actual concurrent resource value of the multiple data centers is v, it can be adjusted based on v × (M / m). The adjustment process can rationally allocate concurrent resources across the multiple data centers based on the ratio between the maximum concurrency m of a single data center and the predicted maximum concurrency M of the multiple data centers. This avoids over- or under-allocation of resources, enabling the data centers to work collaboratively, improving overall resource utilization, and reducing operating costs. Simultaneously, by adjusting the concurrent resources proportionally, it ensures that the multiple data centers maintain relatively stable performance when facing different concurrent loads. This avoids transaction system jitter or overload caused by improper concurrent resource adjustment, improving the reliability and stability of the transaction system and providing users with a better service experience.
[0098] The adjustment process aims to ensure that the concurrent resource values of multiple data centers can meet or even exceed the predicted maximum concurrency value, thereby ensuring that the transaction system can maintain efficient and stable operation in high-concurrency scenarios and provide users with a smooth and reliable service experience.
[0099] This embodiment provides a method for predicting the maximum concurrency of multiple data centers. By integrating the distribution characteristics derived from the analysis of transaction data from a single data center using a normal distribution, the first response time of transactions across multiple data centers, and the number of transactions run in a single data center, the maximum concurrency value of the multiple data centers is determined, providing a scientific basis for resource planning. Based on this maximum concurrency value, the required concurrent resources are then defined. When the required value is less than the existing concurrent resource value of the multiple data centers, the resource value is adjusted accordingly to ensure that resources are matched with the maximum concurrency requirement. This effectively improves the rationality and foresight of resource allocation across multiple data centers, avoids resource redundancy or insufficiency, reduces transaction response anomalies and errors caused by insufficient concurrent processing capacity, ensures the stable operation of the multi-data center system in high-concurrency scenarios, and reduces the impact on business continuity.
[0100] Figure 5 This is a schematic diagram of a multi-datacenter maximum concurrency prediction device provided in this application. Figure 5 As shown, this application provides a maximum concurrency prediction device for multiple data centers. The maximum concurrency prediction device 500 for multiple data centers includes:
[0101] The acquisition module 501 is used to acquire a set of transaction performance data for a single data center when executing a preset transaction;
[0102] The determining module 502 is used to determine the distribution characteristics of the preset transactions based on the transaction performance data set;
[0103] The determining module 502 is further configured to determine the first response time of the multiple data centers when executing the preset transaction, wherein the multiple data centers include at least two data centers;
[0104] The prediction module 503 is used to predict the maximum concurrency value of the multi-data center based on the distribution characteristics and the first response time.
[0105] Optionally, the acquisition module 501 is specifically used to determine at least one maximum concurrency when the single data center executes the preset transaction within a preset period; determine at least one collection period based on the maximum concurrency, wherein the collection period is a period within the preset period in which the maximum concurrency is greater than the other collection periods; determine the number of transaction runs and the second response time of the single data center within the collection period; and store the maximum concurrency, the number of transaction runs, and the second response time based on the collection period to obtain the transaction performance data set.
[0106] Optionally, the determining module 502 is specifically used to determine the variance value of any one of the multiple collection periods based on a normal distribution and the transaction performance data set; and to determine the distribution characteristics of a preset transaction based on the variance value of the collection period.
[0107] Optionally, the determining module 502 is specifically configured to: determine at least one data center pair based on the multiple data centers, wherein the data center pair is any two data centers in the multiple data centers; send a latency test instruction to the data center pair; obtain the test results of the data center pair and determine the network latency duration of the multiple data centers based on the test results; determine the number of cross-center transactions for the preset transaction; and determine the first response duration of the multiple data centers based on the latency duration and the number of cross-center transactions.
[0108] Optionally, the determining module 502 is specifically used to obtain the complete execution process of the preset transaction; and to label the data centers in the complete execution process to obtain the number of cross-center transactions.
[0109] Optionally, the prediction module 503 is specifically used to predict the maximum concurrency value of the multi-data center based on the normal distribution, the distribution characteristics, the first response time, and the number of transaction runs.
[0110] Optionally, the determining module 502 is further configured to determine the concurrent resource requirement value of the multiple data centers based on the maximum concurrency value; and if the concurrent resource requirement value is greater than the concurrent resource value of the multiple data centers, adjust the concurrent resource value so that the concurrent resource value meets the maximum concurrency value.
[0111] The maximum concurrency prediction device for multiple data centers provided in this application is similar in principle and technical effect to the implementation of each part of the aforementioned maximum concurrency prediction method for multiple data centers, and will not be repeated here.
[0112] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 6 As shown, this application provides an electronic device 600, which includes: a receiver 601, a transmitter 602, a processor 603, and a memory 604.
[0113] Receiver 601 is used to receive instructions and data;
[0114] Transmitter 602 is used to send commands and data;
[0115] Memory 604 is used to store instructions executed by the computer;
[0116] Processor 603 is used to execute computer execution instructions stored in memory 604 to implement the various steps of the multi-datacenter maximum concurrency prediction method in the above embodiments. For details, please refer to the relevant descriptions in the foregoing embodiments of the multi-datacenter maximum concurrency prediction method.
[0117] Optionally, the memory 604 can be either standalone or integrated with the processor 603.
[0118] When the memory 604 is set up independently, the electronic device also includes a bus for connecting the memory 604 and the processor 603.
[0119] The implementation principle and technical effects of the electronic device provided in this embodiment can be found in the foregoing embodiments, and will not be repeated here.
[0120] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the method described in any of the foregoing embodiments.
[0121] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the methods described in any of the foregoing embodiments.
[0122] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0123] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0124] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0125] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0126] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.
[0127] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0128] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0129] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0130] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for multi-data center maximum concurrency prediction, characterized in that, The method comprises the following steps: acquiring a transaction performance data set of a single data center when performing a preset transaction; determining a distribution characteristic of the preset transaction according to the transaction performance data set; determining a first response time of a plurality of data centers when performing the preset transaction, the plurality of data centers comprising at least two data centers; predicting a maximum concurrency value of the plurality of data centers based on the distribution characteristic and the first response time.
2. The method of claim 1, wherein, The acquiring a transaction performance data set of a single data center when performing a preset transaction comprises the following steps: determining at least one maximum concurrency number of the single data center when performing the preset transaction within a preset period; determining at least one collection period according to the maximum concurrency number, the collection period being a period within the preset period during which the maximum concurrency number is greater than that of the remaining collection periods; determining a transaction running number and a second response time of the single data center within the collection period; performing storage processing on the maximum concurrency number, the transaction running number and the second response time based on the collection period to obtain the transaction performance data set.
3. The method of claim 2, wherein, The determining a distribution characteristic of the preset transaction according to the transaction performance data set comprises the following steps: for any one of a plurality of collection periods, determining a variance value of the collection period based on a normal distribution and the transaction performance data set; determining a distribution characteristic of the preset transaction based on the variance value of the collection period.
4. The method of claim 1, wherein, The determining a first response time of a plurality of data centers when performing the preset transaction comprises the following steps: determining at least one data center pair according to the plurality of data centers, the data center pair being any two data centers in the plurality of data centers; sending a delay test instruction to the data center pair; acquiring a test result of the data center pair and determining a network delay time of the plurality of data centers according to the test result; determining a cross-center number of the preset transaction; determining a first response time of the plurality of data centers according to the delay time and the cross-center number.
5. The method of claim 4, wherein, The determining a cross-center number of the preset transaction comprises the following steps: acquiring a complete execution flow of the preset transaction; performing annotation processing on the data centers in the complete execution flow to obtain the cross-center number.
6. The method of claim 1, wherein, The predicting a maximum concurrency value of the plurality of data centers based on the distribution characteristic and the first response time comprises the following steps: predicting the maximum concurrency value of the plurality of data centers based on a normal distribution, the distribution characteristic, the first response time and a transaction running number.
7. The method of claim 5, wherein, The method further comprises the following steps: determining a concurrency resource demand value of the plurality of data centers based on the maximum concurrency value; in a case where the concurrency resource demand value is greater than a concurrency resource value of the plurality of data centers, performing adjustment processing on the concurrency resource value so that the concurrency resource value meets the maximum concurrency value.
8. A multi-data center maximum concurrency prediction apparatus, comprising: The method comprises the following steps: an acquiring module, configured to acquire a transaction performance data set of a single data center when performing a preset transaction; a determining module, configured to determine a distribution characteristic of the preset transaction according to the transaction performance data set; The determining module is also used to determine the first response time of the multiple data centers when executing the preset transaction, wherein the multiple data centers include at least two data centers; The prediction module is used to predict the maximum concurrency value of the multiple data centers based on the distribution characteristics and the first response duration.
9. An electronic device, comprising: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 7.
10. A computer program product, characterised in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 7.