Data processing method and device, storage medium and electronic device
By clustering and sorting the historical transaction data of the high-load service system, the transaction peak period and target transaction threshold are determined, and resources are adjusted when preset conditions are met, dynamic resource allocation is realized, which solves the problem that traditional resource management strategies are difficult to adapt to dynamic transaction needs, and improves the system's response ability and resource utilization rate.
Patent Information
- Application Number
- CN202411822443.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-04
AI Technical Summary
In high-load service systems, traditional resource management strategies are difficult to adapt to dynamically changing transaction needs, resulting in the system being prone to insufficient resources during peak transactions, affecting the response speed and stability of the service.
By obtaining the historical transaction data of the target business in the historical time period, performing clustering operations to determine the transaction peak period, sorting the data within these periods in chronological order, and determining the target transaction threshold. Then, when the current transaction data and the target transaction threshold meet the preset conditions, the available resources of the target business are adjusted to achieve dynamic resource allocation.
Through the intelligent dynamic resource allocation mechanism, resource allocation can be optimized in real time according to business needs, and the system's response ability and resource utilization rate during high concurrent transactions can be improved, solving the problem of unreasonable allocation of transaction resources.
Smart Images

Figure CN119759558A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a data processing method and device, a storage medium, and an electronic device. Background Art
[0002] In high-load service systems, traditional resource management strategies, such as static resource allocation, are difficult to adapt to dynamically changing transaction needs. Especially during peak trading periods, fixed resources can easily cause system bottlenecks, affecting the response speed and stability of services. Although load balancing technology can disperse requests, it is highly dependent on hardware resources and cannot flexibly adjust resources for individual service items. Therefore, there are technical problems in related technologies that lead to unreasonable allocation of transaction resources due to the complexity and variability of transaction data.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a data processing method and device, a storage medium, and an electronic device to at least solve the technical problem of unreasonable allocation of transaction resources due to complex and changeable transaction data.
[0005] According to one aspect of an embodiment of the present application, a data processing method is provided, including: obtaining historical transaction data generated by a target business within a historical time period; performing clustering operations on the historical transaction data to determine a transaction peak period; sorting the historical transaction data within the transaction peak period in chronological order to obtain a group of time series data, and determining the value of the data at a target position in the group of time series data as the target transaction threshold, wherein the target position is related to the business type of the target business; and adjusting the available resources of the target business when the current transaction data and the target transaction threshold meet preset conditions, wherein the current transaction data represents the number of transactions corresponding to the transaction peak period within the current time period.
[0006] According to another aspect of an embodiment of the present application, a data processing device is also provided, including: an acquisition module, used to acquire historical transaction data generated by a target business within a historical time period; a clustering module, used to perform clustering operations on the historical transaction data to determine a transaction peak period; a determination module, used to sort the historical transaction data within the transaction peak period in chronological order to obtain a set of time series data, and determine the value of the data at a target position in the set of time series data as the target transaction threshold, wherein the target position is related to the business type of the target business; an adjustment module, used to adjust the available resources of the target business when the current transaction data and the target transaction threshold meet preset conditions, wherein the current transaction data represents the number of transactions corresponding to the transaction peak period within the current time period.
[0007] Optionally, the device is used to perform clustering operations on the historical transaction data to determine the peak transaction period in the following manner: converting the historical transaction data into feature vectors respectively; performing the clustering operation on the feature vectors to obtain a group of clusters; determining the time period corresponding to the clusters with high transaction quantity characteristics as the peak transaction period, and determining the time period corresponding to the clusters with low transaction quantity characteristics as the off-peak transaction period, wherein the peak transaction period includes the peak transaction period and the off-peak transaction period.
[0008] Optionally, the device is also used for: after determining the time period corresponding to the cluster with high transaction quantity characteristics as the peak transaction period, and determining the time period corresponding to the cluster with low transaction quantity characteristics as the low transaction period, sorting the historical transaction data within the peak transaction period in chronological order, and determining the peak transaction threshold according to the sorting result; when the current transaction data and the peak transaction threshold meet the preset conditions, adjusting the available resources of the target business.
[0009] Optionally, the device is also used for: after determining the time period corresponding to the cluster with high transaction quantity characteristics as the peak transaction period, and determining the time period corresponding to the cluster with low transaction quantity characteristics as the off-peak transaction period, sorting the historical transaction data in the off-peak transaction period in chronological order, and determining the off-peak transaction threshold according to the sorting result; and adjusting the available resources of the target business when the current transaction data and the off-peak transaction threshold meet the preset conditions.
[0010] Optionally, the device is used to adjust the available resources of the target business when the current transaction data and the target transaction threshold meet preset conditions in the following manner: when the value of the current transaction data is less than or equal to the target transaction threshold, the available resources of the target business are not adjusted; when the value of the current transaction data is greater than the target transaction threshold, the available resources of the target business are increased.
[0011] Optionally, the device is also used to: obtain N current transaction data within a preset time period; when there are M current transaction data among the N current transaction data whose values are greater than or equal to the target transaction threshold, positively adjust the target transaction threshold according to a first preset step size, wherein N and M are both positive integers, and M is less than or equal to N.
[0012] Optionally, the device is also used to: obtain N current transaction data within a preset time period; when there are M current transaction data among the N current transaction data whose values are less than the target transaction threshold, reversely adjust the target transaction threshold according to a second preset step size, wherein N and M are both positive integers, and M is less than or equal to N.
[0013] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned data processing method when running.
[0014] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above data processing method.
[0015] According to another aspect of the embodiments of the present application, there is further provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the data processing method through the computer program.
[0016] In an embodiment of the present application, historical transaction data generated by a target business within a historical time period is obtained; clustering operations are performed on the historical transaction data to determine a transaction peak period; the historical transaction data within the transaction peak period is sorted in chronological order to obtain a set of time series data, and the value of the data at a target position in a set of time series data is determined as a target transaction threshold, wherein the target position is related to the business type of the target business; when the current transaction data and the target transaction threshold meet preset conditions, the available resources of the target business are adjusted, wherein the current transaction data represents the number of transactions corresponding to the transaction peak period within the current time period, and through an intelligent dynamic resource allocation mechanism, the purpose of optimizing resources in real time according to business needs is achieved, thereby achieving the technical effect of efficiently responding to high-concurrency transactions and improving resource utilization, thereby solving the technical problem of unreasonable allocation of transaction resources due to complex and changeable transaction data. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 is a schematic diagram of an application environment of an optional data processing method according to an embodiment of the present application;
[0019] Figure 2 is a flowchart of an optional data processing method according to an embodiment of the present application;
[0020] Figure 3 is a schematic diagram of an optional data processing method according to an embodiment of the present application;
[0021] Figure 4 is a schematic structural diagram of an optional data processing device according to an embodiment of the present application;
[0022] Figure 5 is a schematic diagram of the structure of an optional data processing product according to an embodiment of the present application;
[0023] Figure 6 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] The present application is described below in conjunction with embodiments:
[0027] According to one aspect of an embodiment of the present application, a data processing method is provided. Optionally, in this embodiment, the data processing method can be applied to Figure 1 In the hardware environment composed of the server 101 and the terminal device 103 shown in FIG. Figure 1As shown, the server 101 is connected to the terminal 103 via a network, and can be used to provide services for the terminal device or an application 107 installed on the terminal device. The application can be a video application, an instant messaging application, a browser application, an educational application, a game application, etc. A database 105 may be set up on the server or independently of the server to provide data storage services for the server 101, for example, a game data storage server. The above-mentioned network may include, but is not limited to, a wired network and a wireless network, wherein the wired network includes, for example, a local area network, a metropolitan area network, and a wide area network; the wireless network includes, for example, Bluetooth, WIFI, and other networks that implement wireless communication; the terminal device 103 may be a terminal configured with an application program, and may include, but is not limited to, at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop computer, a tablet computer, a PDA, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, a virtual reality (VR) terminal, an augmented reality (AR) terminal, a mixed reality (MR) terminal, and other computer devices; the above-mentioned server may be a single server, a server cluster consisting of multiple servers, or a cloud server.
[0028] Combination Figure 1 As shown, the above data processing method can be executed by an electronic device, which can be a terminal device or a server. The above data processing method can be implemented by the terminal device or the server respectively, or by the terminal device and the server together.
[0029] The above is only an example and is not specifically limited in this embodiment.
[0030] Optionally, as an optional implementation, as Figure 2 As shown, the above data processing method includes:
[0031] S202, obtaining historical transaction data generated by the target business within a historical time period;
[0032] S204, clustering the historical transaction data to determine the transaction peak period;
[0033] S206, sorting the historical transaction data within the transaction peak period in chronological order to obtain a set of time series data, and determining the value of the data at the target position in the set of time series data as the target transaction threshold, wherein the target position is related to the business type of the target business;
[0034] S208, when the current transaction data and the target transaction threshold meet the preset conditions, adjust the available resources of the target business, wherein the current transaction data represents the number of transactions corresponding to the transaction peak period in the current time period.
[0035] Optionally, in an embodiment of the present application, the above-mentioned historical transaction data refers to the transaction records of the target business in the past multiple time periods, including but not limited to information such as transaction quantity, transaction time, etc.; the above-mentioned transaction peak period refers to the time period with the most frequent transaction activities in the historical transaction data determined by cluster analysis; the above-mentioned time series data refers to the transaction data arranged in chronological order, reflecting the changing trend of the transaction data in the time dimension; the above-mentioned target position refers to the data point position for determining the transaction threshold set according to the business type and strategy after the time series data is sorted; the above-mentioned current transaction data represents the actual number of transactions of the target business in the peak transaction period in the current time period.
[0036] It should be noted that the business type of the above-mentioned target business affects the selection of the target position. For example, for high-frequency trading business, the target position can be set at a higher percentile of the time series data to ensure that the system can cope with sudden trading peaks in most cases; while for low-frequency trading business, the target position can be set at a lower percentile to avoid over-allocation of resources.
[0037] In addition, the preset condition may be the percentage of the current transaction data exceeding the target transaction threshold, or the number of consecutive times the threshold is exceeded. This application does not impose specific limitations on this and can be flexibly set according to actual business needs.
[0038] For example, clustering operations can be based on algorithms such as K-means, DBSCAN or hierarchical clustering, and by analyzing historical transaction data, the periods with the most intensive transaction activities can be identified as the peak transaction periods. The percentile method can be used to determine the sorting and target positions, ensuring that the target transaction threshold can cover most high-volume scenarios while taking into account the efficient use of resources.
[0039] In an exemplary embodiment, taking an online service system application scenario involving a large number of interactions as an example, the system first collects the transaction data of the target business in the historical time period, including the number and time of transactions. Then, the peak transaction period in the historical data is determined through cluster analysis. Subsequently, the system sorts the historical transaction data in the peak transaction period in chronological order to form time series data. Based on the business type and strategy, the system determines the target position, for example, the 99% percentile is selected as the value point of the target transaction threshold. When the system monitors that the current transaction data exceeds the target transaction threshold during the peak transaction period and meets the preset conditions, it automatically adjusts the available resources of the target business, increases computing power, and ensures stable operation of the service. Throughout the process, the system realizes the dynamic management and optimal configuration of transaction resources, effectively responds to the complexity and variability of transaction data, and improves the rationality of resource allocation and the timeliness of service response.
[0040] In an embodiment of the present application, historical transaction data generated by a target business within a historical time period is obtained; clustering operations are performed on the historical transaction data to determine a transaction peak period; the historical transaction data within the transaction peak period is sorted in chronological order to obtain a set of time series data, and the value of the data at a target position in a set of time series data is determined as a target transaction threshold, wherein the target position is related to the business type of the target business; when the current transaction data and the target transaction threshold meet preset conditions, the available resources of the target business are adjusted, wherein the current transaction data represents the number of transactions corresponding to the transaction peak period within the current time period, and through an intelligent dynamic resource allocation mechanism, the purpose of optimizing resources in real time according to business needs is achieved, thereby achieving the technical effect of efficiently responding to high-concurrency transactions and improving resource utilization, thereby solving the technical problem of unreasonable allocation of transaction resources due to complex and changeable transaction data.
[0041] As an optional scheme, the clustering operation is performed on the historical transaction data to determine the peak transaction period, including: converting the historical transaction data into feature vectors respectively; performing the clustering operation on the feature vectors to obtain a group of clusters; determining the time period corresponding to the clusters with high transaction quantity characteristics as the peak transaction period, and determining the time period corresponding to the clusters with low transaction quantity characteristics as the low transaction period, wherein the peak transaction period includes the peak transaction period and the low transaction period.
[0042] Optionally, in an embodiment of the present application, the above-mentioned feature vector represents the conversion of historical transaction data into a multi-dimensional numerical representation for the convenience of algorithm processing; the above-mentioned clustering operation is a data mining technology used to group data points with similar characteristics; the above-mentioned clustering cluster refers to a set of transaction data formed after the clustering operation; the peak trading period and the low trading period are based on the clustering results to distinguish the time periods with intensive and sparse transaction activities.
[0043] It should be noted that the construction of the feature vector can be based on a variety of transaction features, including but not limited to transaction frequency, transaction time, transaction type, etc. The choice of clustering algorithm is not limited to K-means, and can be DBSCAN, hierarchical clustering or custom algorithm, which is not limited in this application. In addition, the definition of peak trading hours and off-peak hours can be flexibly adjusted according to business needs and clustering results to adapt to different business scenarios.
[0044] Exemplarily, the clustering operation first converts the transaction quantity and time of historical transaction data into feature vectors, then uses a clustering algorithm to divide these vectors into several clusters, and finally identifies the most and least active transaction periods based on the transaction quantity characteristics of each cluster as peak transaction periods and low transaction periods.
[0045] In an exemplary embodiment, taking an online payment system as an example, the system first collects the daily transaction data of the target business in the past year, and each transaction data contains information such as the transaction amount and transaction time. Next, the daily transaction data is converted into feature vectors, each of which represents the transaction situation of a day. Then, these feature vectors are clustered using the K-means clustering algorithm to obtain a set of clusters, each of which represents a transaction pattern. The system analyzes the transaction quantity characteristics of each cluster, identifies the time period corresponding to the cluster with the largest number of transactions as the peak transaction period, and identifies the time period corresponding to the cluster with the least number of transactions as the off-peak transaction period. Through the embodiment of the present application, the intelligent clustering analysis technology is adopted to realize the in-depth mining of historical transaction data, and achieve the purpose of accurately identifying the peak and off-peak transaction periods.
[0046] Through the embodiments of the present application, feature vector conversion and intelligent clustering analysis are adopted to achieve accurate division of trading periods, achieve the purpose of dynamically optimizing resource allocation strategy, and effectively improve the system's responsiveness and resource utilization efficiency during peak trading periods.
[0047] As an optional scheme, after determining the time period corresponding to the cluster with high transaction quantity characteristics as the peak transaction period, and determining the time period corresponding to the cluster with low transaction quantity characteristics as the low transaction period, the method also includes: sorting the historical transaction data within the peak transaction period in chronological order, and determining the peak transaction threshold based on the sorting result; when the current transaction data and the peak transaction threshold meet the preset conditions, adjusting the available resources of the target business.
[0048] Optionally, in an embodiment of the present application, the peak transaction threshold refers to the transaction quantity value of the target location selected after sorting the historical transaction data during the peak transaction period, which is used to determine whether the current transaction data has reached or exceeded the high load state; the preset condition refers to the condition for triggering resource adjustment set by the system based on the relationship between the current transaction data and the peak transaction threshold, including but not limited to indicators such as proportion, frequency or duration; adjusting the available resources of the target business refers to dynamically increasing or decreasing the system resources of the target business, such as CPU, memory, etc., under the preset conditions, to cope with the pressure brought by the high number of transactions.
[0049] It should be noted that the peak transaction threshold can be determined based on different percentiles, such as 95% or 99%. This application does not limit this and can be flexibly adjusted according to business characteristics and system requirements. The setting of preset conditions is not limited to a single indicator, and can be a composite condition, such as the number of times the current transaction data exceeds the peak transaction threshold continuously reaches a preset number of times, or the percentage of the current transaction data exceeding the peak transaction threshold reaches a preset ratio, to ensure the accuracy and timeliness of resource adjustment.
[0050] Exemplarily, the sorting operation is performed according to the number of transactions in the historical transaction data during the peak transaction period, and the data point value at a higher percentile after sorting is selected as the peak transaction threshold, which is used for real-time monitoring and determining whether the current transaction data meets the conditions for adjusting resources.
[0051] In an exemplary embodiment, taking an application scenario of an online trading system as an example, after completing the clustering operation and determining the peak trading period, the system further sorts the historical trading data within the peak trading period, for example, selecting the 99% percentile as the value of the peak trading threshold. When real-time monitoring shows that the current trading data continues to exceed the peak trading threshold during the peak period and meets the preset conditions, the system automatically adjusts the available resources of the target business, such as adding server nodes or improving computing power, to cope with high concurrent transactions and ensure stable operation of the system.
[0052] Through the embodiments of the present application, by sorting historical transaction data and setting thresholds during peak hours, the technical effect of dynamically adjusting resources according to real-time transaction conditions is achieved, thereby achieving the purpose of optimizing resource allocation and improving system responsiveness and processing efficiency.
[0053] As an optional scheme, after determining the time period corresponding to the cluster with high transaction quantity characteristics as the peak transaction period, and determining the time period corresponding to the cluster with low transaction quantity characteristics as the off-peak transaction period, the method also includes: sorting the historical transaction data within the off-peak transaction period in chronological order, and determining the off-peak transaction threshold according to the sorting result; and adjusting the available resources of the target business when the current transaction data and the off-peak transaction threshold meet the preset conditions.
[0054] Optionally, in an embodiment of the present application, the off-peak transaction threshold refers to the transaction quantity value of the target location selected after sorting historical transaction data during the off-peak transaction period, which is used to determine whether the current transaction data exceeds the low-load state; the preset condition refers to the condition for triggering resource adjustment set by the system based on the relationship between the current transaction data and the off-peak transaction threshold, including but not limited to indicators such as proportion, frequency or duration; adjusting the available resources of the target business refers to dynamically increasing or decreasing the system resources of the target business, such as CPU, memory, etc., under the preset conditions, to adapt to the operating requirements of the low transaction quantity.
[0055] It should be noted that the determination of the low-peak transaction threshold can be based on different percentiles, such as 5% or 10%. This application does not limit this and can be flexibly adjusted according to business characteristics and system requirements. The setting of preset conditions is not limited to a single indicator, and can be a composite condition, such as the number of times the current transaction data is lower than the low-peak transaction threshold reaches a preset number of times, or the time when the current transaction data is lower than the low-peak transaction threshold continues to reach a preset length of time, so as to ensure the reasonable recovery of resources during low transaction volumes and avoid waste.
[0056] Exemplarily, the sorting operation is performed according to the number of transactions in the historical transaction data during the low-peak transaction period, and the data point value at the lower percentile after sorting is selected as the low-peak transaction threshold, which is used for real-time monitoring and determining whether the current transaction data meets the demand for reducing resources.
[0057] In an exemplary embodiment, taking an application scenario of an e-commerce platform as an example, after completing the clustering operation and determining the low-peak transaction period, the system further sorts the historical transaction data during the low-peak transaction period, for example, selecting the 5% percentile as the value of the low-peak transaction threshold. When real-time monitoring shows that the current transaction data is continuously lower than the low-peak transaction threshold during the low-peak period and meets the preset conditions, the system automatically adjusts the available resources of the target business, such as reducing server nodes or reducing computing power, reducing unnecessary resource consumption, and improving resource utilization efficiency.
[0058] Through the embodiments of the present application, historical transaction data is sorted and thresholds are set during off-peak hours to achieve the technical effect of dynamically adjusting resources according to real-time transaction conditions, thereby achieving the purpose of optimizing resource allocation, reducing operating costs, and maintaining stable system operation.
[0059] As an optional scheme, when the current transaction data and the target transaction threshold meet preset conditions, the available resources of the target business are adjusted, including: when the value of the current transaction data is less than or equal to the target transaction threshold, the available resources of the target business are not adjusted; when the value of the current transaction data is greater than the target transaction threshold, the available resources of the target business are increased.
[0060] Optionally, in an embodiment of the present application, the above-mentioned current transaction data refers to the transaction volume information monitored by the system in real time, including but not limited to the number of transactions, transaction frequency, etc.; the above-mentioned target transaction threshold is obtained based on statistical analysis of historical data, and is a reference value for judging whether the current transaction volume is in a high-load state; the above-mentioned preset condition is a rule for the system to decide whether to start the resource adjustment strategy based on the comparison result between the current transaction data and the target transaction threshold; the above-mentioned adjustment of available resources for the target business refers to taking measures to increase or maintain existing system resources when the system monitors that the transaction volume exceeds or does not exceed the threshold to adapt to real-time transaction needs.
[0061] It should be noted that increasing the available resources for the target business can be dynamically adding server instances, increasing the upper limit of CPU or memory usage, etc. This application does not limit this, and can be flexibly selected according to business characteristics and the resource management capabilities of the cloud platform. In addition, the setting of preset conditions is not limited to a simple comparison of current transaction data with the target transaction threshold, and can comprehensively consider factors such as transaction trends and duration to more accurately determine the timing of resource adjustment.
[0062] Exemplarily, the system monitors the current transaction data in real time. When it is found that the data is lower than or equal to the target transaction threshold, it is considered that the system resources are sufficient to cope with the current transaction demand. Therefore, no resource adjustment is made and the existing resource configuration is maintained. When the current transaction data exceeds the target transaction threshold, the system determines it as a possible transaction peak period and automatically increases the available resources of the target business, such as adding computing nodes, allocating additional memory resources, etc., to improve processing capabilities.
[0063] Through the embodiments of the present application, a dynamic resource adjustment mechanism is adopted to achieve the technical effect of dynamically optimizing resource allocation according to real-time transaction data, thereby achieving the purpose of improving system processing capabilities, reducing resource waste, and ensuring service stability.
[0064] As an optional scheme, the method also includes: obtaining N current transaction data within a preset time period; when there are M current transaction data among the N current transaction data whose values are greater than or equal to the target transaction threshold, positively adjusting the target transaction threshold according to a first preset step size, wherein N and M are both positive integers, and M is less than or equal to N.
[0065] As an optional scheme, the method also includes: obtaining N current transaction data within a preset time period; when there are M current transaction data among the N current transaction data whose values are less than the target transaction threshold, reversely adjusting the target transaction threshold according to a second preset step size, wherein N and M are both positive integers, and M is less than or equal to N.
[0066] Optionally, in an embodiment of the present application, the preset time period refers to the time window for the system to collect and analyze data, including but not limited to one hour, one day or one week; N current transaction data refer to the set of transaction volume information monitored by the system within the preset time period, and the number is N; the value of M current transaction data is greater than or equal to the target transaction threshold, which means that among the N current transaction data, the transaction volume of M data points reaches or exceeds the set transaction threshold; the first preset step size and the second preset step size refer to the increment or decrement when adjusting the target transaction threshold, and the specific values can be set according to business requirements and system characteristics; positive adjustment and reverse adjustment refer to increasing or decreasing the target transaction threshold, respectively.
[0067] It should be noted that the specific values of N and M can be determined according to business characteristics and system monitoring frequency. For example, N can be 24 (the number of hours in a day) and M can be 6, that is, if the transaction volume reaches or exceeds the target transaction threshold for 6 hours within 24 hours, the system will consider that the current threshold setting may be too low and needs to be adjusted positively. The preset step size is also not fixed and can be flexibly adjusted according to historical adjustment effects and business needs to ensure the rationality and effectiveness of the threshold adjustment.
[0068] Exemplarily, the system will periodically check N current transaction data within a preset time period. If it is found that the transaction volume of M data points is greater than or equal to the target transaction threshold, the system will positively adjust the target transaction threshold according to a first preset step size to adapt to the possible increase in transaction demand; on the contrary, if the transaction volume of M data points is less than the target transaction threshold, the system will reversely adjust the target transaction threshold according to a second preset step size to optimize resource allocation and avoid resource waste.
[0069] In an exemplary embodiment, taking an application scenario of an online payment platform as an example, the system sets every 24 hours as a preset period, collects N transaction data points within the period, and N is set to 24 (representing every hour of a day). If within this period, the transaction volume of M=6 (i.e., 6 hours) reaches or exceeds the target transaction threshold, the system will determine that the current threshold may be too low, and thus positively adjust the target transaction threshold according to the first preset step size (such as increasing the threshold by 5%) to prepare for potential transaction peaks. On the contrary, if M=0 (i.e., the transaction volume of no data point exceeds the target transaction threshold), the system will reversely adjust the target transaction threshold according to the second preset step size (such as reducing the threshold by 3%) to make more reasonable use of resources and avoid excessive allocation of resources during low-peak trading periods.
[0070] In an exemplary embodiment, the system takes every 24 hours as a preset period, collects and analyzes N current transaction data during this period, and N is set to 24. If it is found that the transaction data value of M=3 (i.e., 3 hours) is lower than the target transaction threshold, the system will determine that the current resource allocation strategy may be too conservative, resulting in some resources not being fully utilized. Therefore, the system will reversely adjust the target transaction threshold according to the second preset step size (for example, reduce the threshold by 5%) to optimize resource allocation and make resource utilization more efficient.
[0071] Through the embodiments of the present application, statistical analysis and dynamic threshold adjustment strategies based on N and M are adopted to achieve the technical effect of dynamically optimizing transaction thresholds according to real-time transaction data, thereby achieving the purpose of rationally allocating resources, improving system responsiveness and efficiency, and reducing operating costs.
[0072] In an exemplary embodiment, considering that in the prior art, in the case of high concurrent access, the traditional fixed resource configuration method is difficult to meet the changing needs, which easily leads to server overload and service response delay, affecting user experience and service efficiency, therefore, the embodiment of the present application provides a transaction monitoring method for a smart business service system, which uses cloud computing to count the number of transactions and transaction peak time of each item, calculate and set a reasonable transaction threshold. During the peak transaction period, system resources are automatically added to business items whose number of transactions per unit time exceeds the threshold, and dynamic regulation is achieved, thereby effectively preventing server blocking in the case of high concurrency and solving the problem of insufficient system resources.
[0073] It should be noted that after resource adjustment, the average system response time does not exceed 50 milliseconds, the transaction processing speed is improved, and the number of transactions processed per second increases by at least 20%. Resource utilization is improved, and CPU and memory usage should be between 60%-80%, avoiding long-term overload or idle state.
[0074] Exemplarily, transaction data statistics: using cloud computing technology to count the number of transactions and peak transaction time of each business item in the business area in real time; building a cloud computing platform, and uploading the transaction data of each business item to the cloud computing platform through a distributed data collection module; the cloud computing model aggregates and processes this data in real time to generate transaction statistics usage frequency data for each item.
[0075] Exemplarily, transaction threshold calculation: based on historical transaction data, analyze the number of transactions and peak time of each item through cloud computing; use big data analysis technology to mine the patterns in historical transaction data, thereby building a threshold model and calculating a reasonable transaction threshold; set up a dynamic adjustment mechanism to regularly update the transaction threshold based on the latest transaction data.
[0076] Exemplarily, the specific steps of threshold calculation include but are not limited to:
[0077] S1, collect historical transaction data:
[0078] Data source: Obtain historical transaction data of each business item in the business area, including the number of transactions per day, transaction time, transaction type, etc. Data sorting: Sort the data in chronological order to form time series data. Frequency: Collect every hour. Scope: Collect the number of transactions, transaction peak time, transaction type, number of system processes, CPU occupancy, response time, throughput, etc. of each item in the business area. Integrity check: Verify whether the data has changed during transmission by adding an MD5 hash check field. Real-time: Use RabbitMQ message queues to achieve efficient processing of real-time data streams, ensuring that the delay from data generation to processing is minimized.
[0079] S2, data preprocessing:
[0080] Data cleaning: delete or correct inconsistent data records, handle missing values, and remove duplicate data. Normalization: convert data to a standard normal distribution (mean is 0, standard deviation is 1) to eliminate scale differences between data. Identify outliers: use the Z-score statistical method to detect outliers in the data. Handle outliers: delete outliers or replace them with boundary values. Noise reduction: use mean filter filtering technology to smooth data and reduce the impact of noise.
[0081] S3, transaction peak analysis:
[0082] Cluster analysis: Perform cluster analysis (such as K-means) on the normalized data to separate the peak and low-peak periods with frequent transactions. Peak identification: Identify the peak transaction time period for each business item (for example, 9:00 to 11:00 a.m. every day).
[0083] S4, threshold calculation:
[0084] Percentile method: To determine the percentile, usually the 90% or 95% percentile is selected as the threshold. Assuming the 95% percentile is selected, it means that in 95% of cases, the number of transactions will not exceed the threshold. Calculation formula: Threshold = sorted number of transactions × 0.95.
[0085] For example, suppose the number of transactions for a certain item during the peak period is: 10, 15, 20, 25, 3010, 15, 20, 25, 3010, 15, 20, 25, 30. After sorting, the fifth data, i.e. 30, is selected as the threshold.
[0086] Dynamic adjustment mechanism: Real-time monitoring, real-time monitoring of each transaction volume, calculating the ratio of the current transaction volume to the set threshold. Adjustment rules, if the number of transactions approaches or exceeds the threshold multiple times within a certain period of time, automatically adjust the threshold. For example, the threshold increases or decreases by 5% each time.
[0087] S5, dynamic threshold update:
[0088] Regular updates: Based on the latest transaction data, the thresholds are recalculated and updated regularly (such as weekly or monthly) to ensure that the thresholds meet actual business needs. Adaptive learning: Introducing machine learning algorithms to improve the prediction accuracy of thresholds through continuous learning and adjustment of historical data.
[0089] For example, Figure 3 is a schematic diagram of an optional data processing method according to an embodiment of the present application, wherein the threshold value calculation and dynamic update process is as follows Figure 3 As shown:
[0090] S1, collect historical transaction data: First, the system collects relevant historical transaction data from the business system to ensure the integrity and accuracy of the data.
[0091] S2, data preprocessing: perform preprocessing operations such as cleaning and normalization on the collected data to lay the foundation for subsequent analysis.
[0092] S3, transaction peak analysis: Identify the peak period of transactions through data mining techniques such as cluster analysis.
[0093] S4, threshold calculation: The initial threshold is set using the percentile method, and the threshold is optimized in real time in combination with a dynamic adjustment mechanism.
[0094] S5, Dynamic Threshold Update: Update the thresholds regularly or dynamically as needed to ensure that the system can flexibly adapt to actual transaction needs in different time periods.
[0095] For example, peak period monitoring: During the peak period of transactions, the cloud computing platform is used to monitor the number of transactions per unit time in real time. Through the high-performance monitoring module, the transaction requests of each business item are tracked and counted in real time. Once the number of transactions of a certain item exceeds the preset transaction threshold, the system will automatically issue an alarm.
[0096] For example, dynamic resource control: when the number of transactions for a certain item exceeds the set transaction threshold, the cloud computing system automatically records the item and dynamically increases system resources for it. By using the elastic resource management capabilities of the cloud computing platform, more computing resources (such as CPU, memory, etc.) are automatically allocated to high-concurrency items. Through load balancing technology, requests for high-concurrency items are distributed to different servers to ensure the stable operation of the system.
[0097] For example, system resource adjustment: In the case of high concurrency, cloud computing technology is used to achieve reasonable allocation and dynamic regulation of system resources to prevent server congestion and ensure stable system operation. The system can dynamically adjust the resource allocation of each event based on real-time monitoring data to ensure the system response speed in high concurrency. An automated resource scheduling strategy is adopted to achieve the optimal configuration of resources through the intelligent scheduling algorithm of the cloud computing platform.
[0098] Specifically, the implementation steps include:
[0099] S1, data collection module: using distributed data collection technology, real-time collection of transaction data of various business items within the business area. Through the API interface, the collected data is uploaded to the cloud computing platform for centralized processing.
[0100] S2, data analysis module: Use cloud computing technology to analyze historical transaction data and determine the transaction peak time and transaction threshold of each item. Use big data analysis tools such as Hadoop and Spark to mine historical data, and use data mining algorithms (such as K-means clustering, time series analysis, etc.) to analyze transaction data, identify the transaction patterns and rules of each business item, and calculate scientific and reasonable transaction thresholds.
[0101] S3, monitoring module: real-time monitoring of transaction data during peak trading periods, recording and resource allocation for items exceeding the threshold. Use real-time monitoring tools such as Prometheus and Grafana to track and visualize the transaction requests for each item.
[0102] S6, Resource Scheduling Module: Based on the monitoring results, the elastic expansion capability of the cloud computing platform is used to dynamically allocate system resources for items that exceed the transaction threshold. Through the automated resource scheduling strategy, the optimal configuration of resources is achieved to ensure the stable operation of the system under high concurrency.
[0103] It should be noted that the quantification and testing of the effect of resource adjustment include: using benchmarking tools (such as JMeter and LoadRunner) to simulate high-concurrency scenarios and observe the performance of the system under pressure. Deploy monitoring tools (such as Prometheus and Grafana) to continuously monitor the performance indicators of the system and set up alarm mechanisms to detect problems in a timely manner. Conduct A / B testing to compare the performance of new and old configurations in the production environment to intuitively see the differences brought about by resource adjustment. Analyze historical data and compare the changes in system performance before and after resource adjustment as part of the effect evaluation.
[0104] It should be noted that secure data transmission and storage include: using encryption technology (such as TLS / SSL) to protect the security of data during transmission, and using encryption algorithms to protect sensitive information during storage. In a distributed environment, the characteristics of distributed file systems (such as the replication mechanism of HDFS) are used to enhance data reliability and fault tolerance. In addition, data desensitization technology can also be used to reduce the risk of sensitive information leakage.
[0105] In general, the embodiments of the present application use cloud computing to perform big data analysis to accurately predict and identify transaction peaks. Dynamically adjust resource allocation strategies to achieve effective use of resources with high flexibility: Dynamically adjust system resources through cloud computing technology to better cope with high-concurrency requests during peak trading periods. Low cost: Compared with load balancing devices, the embodiments of the present application mainly rely on cloud computing platforms, and the hardware cost is relatively low. High accuracy: Setting transaction thresholds based on historical transaction data can more accurately adjust resource allocation. Strong real-time performance: Real-time monitoring and adjustment ensure that the system can run smoothly even under high concurrency conditions. Elastic expansion: Utilize the elastic expansion capabilities of the cloud computing platform to dynamically allocate resources according to actual needs to avoid waste of resources.
[0106] You can also consider using an improved static resource allocation method: by setting multiple preset resource allocation schemes, switching according to different transaction situations; automatic expansion technology: in a cloud environment, automatically expand the number of virtual machines or containers to cope with high concurrency, but it needs to rely on the expansion capabilities of the cloud service provider; microservice architecture: split the business system into multiple microservices, each of which is independently deployed and expanded to improve the system's elasticity and fault tolerance; edge computing: perform data processing close to the data source to reduce the burden on the central server, but it has high requirements for distributed computing and management.
[0107] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0108] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0109] According to another aspect of the embodiment of the present application, a data processing device for implementing the above data processing method is also provided. Figure 4 As shown, the device comprises:
[0110] An acquisition module 402 is used to acquire historical transaction data generated by a target business within a historical time period;
[0111] Clustering module 404, used to perform clustering operations on historical transaction data to determine the transaction peak period;
[0112] A determination module 406 is used to sort the historical transaction data in the transaction peak period in chronological order to obtain a set of time series data, and determine the value of the data at the target position in the set of time series data as the target transaction threshold, wherein the target position is related to the business type of the target business;
[0113] The adjustment module 408 is used to adjust the available resources of the target business when the current transaction data and the target transaction threshold meet the preset conditions, wherein the current transaction data represents the number of transactions corresponding to the transaction peak period in the current time period.
[0114] Optionally, the above-mentioned device is used to perform clustering operations on historical transaction data in the following manner to determine the peak transaction period: converting the historical transaction data into feature vectors respectively; performing clustering operations on the feature vectors to obtain a group of clusters; determining the time period corresponding to the clusters with high transaction quantity characteristics as the peak transaction period, and determining the time period corresponding to the clusters with low transaction quantity characteristics as the off-peak transaction period, wherein the peak transaction period includes the peak transaction period and the off-peak transaction period.
[0115] Optionally, the above-mentioned device is also used to: determine the time period corresponding to the cluster with high transaction quantity characteristics as the peak transaction period, and determine the time period corresponding to the cluster with low transaction quantity characteristics as the low transaction period, then sort the historical transaction data within the peak transaction period in chronological order, and determine the peak transaction threshold based on the sorting result; when the current transaction data and the peak transaction threshold meet the preset conditions, adjust the available resources of the target business.
[0116] Optionally, the above-mentioned device is also used to: determine the time period corresponding to the cluster with high transaction quantity characteristics as the peak transaction period, and determine the time period corresponding to the cluster with low transaction quantity characteristics as the off-peak transaction period, sort the historical transaction data in the off-peak transaction period in chronological order, and determine the off-peak transaction threshold according to the sorting result; when the current transaction data and the off-peak transaction threshold meet the preset conditions, adjust the available resources of the target business.
[0117] Optionally, the above-mentioned device is used to adjust the available resources of the target business when the current transaction data and the target transaction threshold meet preset conditions in the following manner: when the value of the current transaction data is less than or equal to the target transaction threshold, the available resources of the target business are not adjusted; when the value of the current transaction data is greater than the target transaction threshold, the available resources of the target business are increased.
[0118] Optionally, the above-mentioned device is also used to: obtain N current transaction data within a preset time period; when there are M current transaction data among the N current transaction data whose values are greater than or equal to the target transaction threshold, positively adjust the target transaction threshold according to a first preset step size, wherein N and M are both positive integers, and M is less than or equal to N.
[0119] Optionally, the above-mentioned device is also used to: obtain N current transaction data within a preset time period; when there are M current transaction data among the N current transaction data whose values are less than the target transaction threshold, reversely adjust the target transaction threshold according to a second preset step size, wherein N and M are both positive integers, and M is less than or equal to N.
[0120] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0121] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0122] According to one aspect of the present application, a computer program product is provided. The computer program product includes a computer program.
[0123] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0124] Figure 5 The structure block diagram of a computer system for implementing an electronic device according to an embodiment of the present application is schematically shown.
[0125] It should be noted that Figure 5 The computer system 500 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0126] like Figure 5As shown, the computer system 500 includes a central processing unit 501 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 502 (ROM) or the program loaded from the storage part 508 to the random access memory 503 (RAM). Various programs and data required for system operation are also stored in the random access memory 503. The central processing unit 501, the read-only memory 502 and the random access memory 503 are connected to each other through a bus 504. The input / output interface 505 (Input / Output interface, i.e., I / O interface) is also connected to the bus 504.
[0127] The following components are connected to the input / output interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a local area network card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed so that a computer program read therefrom is installed into the storage section 508 as needed.
[0128] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processor 501, various functions defined in the system of the present application are executed.
[0129] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processor 501, various functions provided by the embodiment of the present application are performed.
[0130] According to another aspect of the embodiment of the present application, an electronic device for implementing the above data processing method is also provided. The electronic device may be Figure 1 The terminal device or server shown in the figure. This embodiment is described by taking the electronic device as a terminal device as an example. Figure 6 As shown, the electronic device includes a memory 602 and a processor 604. The memory 602 stores a computer program, and the processor 604 is configured to execute the steps in any of the above method embodiments through the computer program.
[0131] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0132] Optionally, in this embodiment, the above-mentioned processor can be configured to execute the methods in each embodiment of the present application through a computer program.
[0133] Alternatively, a person skilled in the art may understand that: Figure 6 The structure shown is for illustration only. Figure 6 The structure of the electronic device is not limited. Figure 6 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 6 Different configurations are shown.
[0134] Among them, the memory 602 can be used to store software programs and modules, such as program instructions / modules corresponding to the data processing method and device in the embodiments of the present application. The processor 604 executes various functional applications and data processing by running the software programs and modules stored in the memory 602, that is, realizing the above-mentioned data processing method. The memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 602 may further include a memory remotely located relative to the processor 604, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 602 can be specifically, but not limited to, used to store information such as historical transaction data and current transaction data. As an example, such as Figure 6 As shown, the memory 602 may include but is not limited to the acquisition module 402, clustering module 404, determination module 406, and adjustment module 408 in the data processing device. In addition, it may also include but is not limited to other module units in the data processing device, which will not be repeated in this example.
[0135] Optionally, the transmission device 606 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 606 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 606 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0136] In addition, the electronic device further includes: a display 608 for displaying the historical transaction data and current transaction data; and a connection bus 610 for connecting the various module components in the electronic device.
[0137] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. The nodes may form a peer-to-peer network, and any form of computing device, such as a server, terminal or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0138] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the data processing method provided in various optional implementations of the above-mentioned data processing aspects.
[0139] Optionally, in this embodiment, the above-mentioned computer-readable storage medium can be configured to store data for executing the methods in various embodiments of the present application.
[0140] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0141] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0142] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, 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, which is stored in a storage medium and includes several instructions for one or more electronic devices to execute all or part of the steps of the methods described in each embodiment of the present application.
[0143] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0144] In the several embodiments provided in the present application, it should be understood that the disclosed application can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0145] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0146] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0147] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A data processing method, characterized in that: include: Obtain historical transaction data generated by the target business within a historical time period; Performing clustering operations on the historical transaction data to determine the transaction peak period; Sorting the historical transaction data within the transaction peak period in chronological order to obtain a set of time series data, and determining the value of the data at a target position in the set of time series data as the target transaction threshold, wherein the target position is related to the business type of the target business; When the current transaction data and the target transaction threshold satisfy a preset condition, the available resources of the target business are adjusted, wherein the current transaction data represents the number of transactions corresponding to the transaction peak period in the current time period.
2. The method according to claim 1, characterized in that The clustering operation on the historical transaction data to determine the transaction peak period includes: Convert the historical transaction data into feature vectors respectively; Performing the clustering operation on the feature vector to obtain a group of clusters; The time period corresponding to the cluster with high transaction quantity characteristics is determined as the transaction peak period, and the time period corresponding to the cluster with low transaction quantity characteristics is determined as the transaction off-peak period, wherein the transaction peak period includes the transaction peak period and the transaction off-peak period.
3. The method according to claim 2, characterized in that After determining the time period corresponding to the clusters with high transaction quantity characteristics as the transaction peak period, and determining the time period corresponding to the clusters with low transaction quantity characteristics as the transaction low peak period, the method further includes: Sorting the historical transaction data within the transaction peak period in chronological order, and determining a peak transaction threshold value according to the sorting result; When the current transaction data and the peak transaction threshold satisfy the preset condition, the available resources of the target business are adjusted.
4. The method according to claim 2, characterized in that: After determining the time period corresponding to the clusters with high transaction quantity characteristics as the transaction peak period, and determining the time period corresponding to the clusters with low transaction quantity characteristics as the transaction low peak period, the method further includes: Sorting the historical transaction data within the low-peak transaction period in chronological order, and determining the low-peak transaction threshold value according to the sorting result; In the case where the current transaction data and the low-peak transaction threshold satisfy the preset condition, the available resources of the target business are adjusted.
5. The method according to claim 1, characterized in that: The step of adjusting the available resources of the target business when the current transaction data and the target transaction threshold satisfy a preset condition includes: When the value of the current transaction data is less than or equal to the target transaction threshold, the available resources of the target service are not adjusted; When the value of the current transaction data is greater than the target transaction threshold, the available resources of the target service are increased.
6. The method according to claim 1, characterized in that The method further comprises: Obtaining N current transaction data within a preset time period; In the case that there are M current transaction data among the N current transaction data whose values are greater than or equal to the target transaction threshold, the target transaction threshold is positively adjusted according to a first preset step size, wherein N and M are both positive integers, and M is less than or equal to N.
7. The method according to claim 1, characterized in that The method further comprises: Obtaining N current transaction data within a preset time period; In the case that there are M current transaction data among the N current transaction data whose values are less than the target transaction threshold, the target transaction threshold is reversely adjusted according to a second preset step size, wherein N and M are both positive integers, and M is less than or equal to N.
8. A data processing device, characterized in that: include: An acquisition module is used to acquire historical transaction data generated by the target business within a historical time period; A clustering module, used to perform clustering operations on the historical transaction data to determine the transaction peak period; a determination module, configured to sort the historical transaction data within the transaction peak period in chronological order to obtain a set of time series data, and determine the value of the data at a target position in the set of time series data as the target transaction threshold, wherein the target position is related to the business type of the target business; The adjustment module is used to adjust the available resources of the target business when the current transaction data and the target transaction threshold meet the preset conditions, wherein the current transaction data represents the number of transactions corresponding to the transaction peak period in the current time period.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein the computer program can be executed by an electronic device to perform the method described in any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
11. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.