Data processing method and device, electronic device and computer readable storage medium
By acquiring and analyzing the data of computing tasks in real time and calculating the inclination of time and data volume, the lag problem of data inclination judgment in the existing technology is solved, the timeliness and accuracy of the task are achieved, and real-time alarm and intervention are supported.
Patent Information
- Application Number
- CN202010568444.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-19
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-06-19
AI Technical Summary
The data skew judgment method of existing big data platforms has lags, cannot guarantee task timeliness, and lacks scientific and objective data support, resulting in the inability to accurately diagnose skew when the amount of data is large and cluster resources are tight.
By obtaining real-time data of computing tasks, including the number of tasks, execution time and data volume of sub-tasks, we can generate task time series and data volume sequence, calculate the time slope and data volume slope, comprehensively determine the data slope level, and judge computing tasks in real time. Whether data skew occurs, and provide early warning and intervention.
It realizes real-time judgment of data tilt of computing tasks, avoids lag, ensures the timeliness of task processing, and provides objective and accurate judgment results to support alarms and intervention.
Smart Images

Figure CN113778727B_ABST
Abstract
Description
Background Art
[0002] With the advent of the big data era, most business scenarios are accompanied by massive data calculations every day. The data distribution changes every day. The data is not dispersed enough, resulting in a large amount of data being concentrated on one or several machines for calculation. The calculation speed of these data is far lower than the average calculation speed, resulting in the entire calculation process being too slow. This method has a serious impact on the stability of task operation and cannot guarantee the timely and stable output of data.
[0003] At present, the existing big data platform diagnosis method can perform timeout diagnosis processing on the task running end time, and perform offline analysis and processing on the task at the end of the task. When the task running time exceeds the set threshold, an early warning prompt is issued, and the tilt result is obtained through offline analysis at the end of the task.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide a data processing method, a data processing device, an electronic device and a computer-readable storage medium, thereby at least to a certain extent overcoming the problem that the existing offline data tilt judgment method has a lag and cannot guarantee the timeliness of the task.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present invention.
[0007] According to a first aspect of the present disclosure, a data processing method is provided, comprising: acquiring real-time data of a computing task; wherein the computing task includes multiple subtasks, and the real-time data includes the number of tasks of the multiple subtasks, the execution time of each subtask, and the data volume of each subtask; generating a task time series according to each execution time, and determining the time inclination according to the task time series and the number of tasks; generating a data volume series according to each data volume, and determining the data volume inclination according to the data volume series and the number of tasks; determining the data inclination level of the computing task according to the time inclination and the data volume inclination, so as to process the computing task according to the data inclination level.
[0008] Optionally, obtaining real-time data of the computing task includes: obtaining real-time running data of the computing task and a historical log file of the computing task; and generating real-time data according to the real-time running data and the historical log file.
[0009] Optionally, the time inclination is determined based on the task time sequence and the number of tasks, including: determining the total task time of multiple subtasks based on the task time sequence, and determining the time mean of the multiple subtasks based on the total task time and the number of tasks; grouping the task time sequence according to the time mean to obtain an initial time grouping; wherein the initial time grouping includes a first initial time grouping and a second initial time grouping; and determining the time inclination based on the first initial time grouping and the second initial time grouping.
[0010] Optionally, the time inclination is determined based on the first initial time grouping and the second initial time grouping, including: determining the time mean of the first initial time grouping as the first time mean, and determining the time mean of the second initial time grouping as the second time mean; determining the iteration time mean based on the first time mean and the second time mean, and iteratively dividing the task time series according to the iteration time mean to obtain iteration time groups; wherein the iteration time groups include the first iteration time grouping and the second iteration time grouping; determining the time mean of the first iteration time grouping as the third time mean, and determining the time mean of the second iteration time grouping as the fourth time mean; determining the time inclination based on the third time mean and the fourth time mean.
[0011] Optionally, the time inclination is determined based on the third time mean and the fourth time mean, including: taking the smaller value of the third time mean and the fourth time mean as the smaller time mean; taking the absolute value of the difference between the third time mean and the fourth time mean as the absolute value of the time difference; and determining the time inclination based on the smaller time mean and the absolute value of the time difference.
[0012] Optionally, the data volume inclination is determined according to the data volume sequence and the number of tasks, including: determining the total data volume of multiple subtasks according to the data volume sequence, and determining the mean data volume of the multiple subtasks according to the total data volume and the number of tasks; grouping the data volume sequence according to the mean data volume to obtain an initial data volume grouping; wherein the initial data volume grouping includes a first initial data volume grouping and a second initial data volume grouping; and determining the data volume inclination according to the first initial data volume grouping and the second initial data volume grouping.
[0013] Optionally, the data volume inclination is determined based on the first initial data volume grouping and the second initial data volume grouping, including: determining the data volume mean of the first initial data volume grouping as the first data volume mean, and determining the data volume mean of the second initial data volume grouping as the second data volume mean; determining the iterative data volume mean based on the first data volume mean and the second data volume mean, and iteratively dividing the data volume sequence according to the iterative data volume mean to obtain iterative data volume groups; wherein the iterative data volume groups include the first iterative data volume grouping and the second iterative data volume grouping; determining the data volume mean of the first iterative data volume grouping as the third data volume mean, and determining the data volume mean of the second iterative data volume grouping as the fourth data volume mean; and determining the data volume inclination based on the third data volume mean and the fourth data volume mean.
[0014] Optionally, the data volume inclination is determined based on the third data volume mean and the fourth data volume mean, including: taking the smaller value of the third data volume mean and the fourth data volume mean as the smaller data volume mean; taking the absolute value of the difference between the third data volume mean and the fourth data volume mean as the absolute value of the data volume difference; and determining the data volume inclination based on the smaller data volume mean and the absolute value of the data volume difference.
[0015] Optionally, the computing task is processed according to the data skew level, including: obtaining pre-configured business processing conditions and generating query statements based on the business processing conditions; judging whether the computing task is a target computing task based on the query statements; if the computing task is a target computing task, storing the task data corresponding to the computing task and / or performing early warning operations on the computing task.
[0016] According to a second aspect of the present disclosure, a data processing device is provided, including: a real-time data acquisition module, used to acquire real-time data of a computing task; wherein the computing task includes multiple subtasks, and the real-time data includes the number of tasks of the multiple subtasks, the execution time of each subtask and the data volume of each subtask; a time inclination determination module, used to generate a task time sequence according to each execution time, and determine the time inclination according to the task time sequence and the number of tasks; a data volume inclination determination module, used to generate a data volume sequence according to each data volume, and determine the data volume inclination according to the data volume sequence and the number of tasks; a processing module, used to determine the data inclination level of the computing task according to the time inclination and the data volume inclination, so as to process the computing task according to the data inclination level.
[0017] Optionally, the real-time data acquisition module also includes a real-time data acquisition unit, which is used to acquire the real-time operation data of the computing task and the historical log file of the computing task; and generate real-time data according to the real-time operation data and the historical log file.
[0018] Optionally, the time inclination determination module includes a time inclination determination unit, which is used to determine the total task time of multiple subtasks based on the task time sequence, and determine the time mean of the multiple subtasks based on the total task time and the number of tasks; group the task time sequence according to the time mean to obtain an initial time grouping; wherein the initial time grouping includes a first initial time grouping and a second initial time grouping; and determine the time inclination based on the first initial time grouping and the second initial time grouping.
[0019] Optionally, the time inclination determination unit includes a time inclination determination subunit, which is used to determine the time mean of the first initial time group as the first time mean, and determine the time mean of the second initial time group as the second time mean; determine the iteration time mean according to the first time mean and the second time mean, and iteratively divide the task time series according to the iteration time mean to obtain iteration time groups; wherein the iteration time groups include the first iteration time group and the second iteration time group; determine the time mean of the first iteration time group as the third time mean, and determine the time mean of the second iteration time group as the fourth time mean; determine the time inclination according to the third time mean and the fourth time mean.
[0020] Optionally, the time gradient determination subunit includes a time gradient calculation subunit, which is used to take the smaller value of the third time mean and the fourth time mean as the smaller time mean; take the absolute value of the difference between the third time mean and the fourth time mean as the absolute value of the time difference; and determine the time gradient according to the smaller time mean and the absolute value of the time difference.
[0021] Optionally, the data volume inclination determination module includes a data volume inclination determination unit, which is used to determine the total data volume of multiple subtasks based on a data volume sequence, and determine the mean data volume of multiple subtasks based on the total data volume and the number of tasks; group the data volume sequence according to the mean data volume to obtain an initial data volume grouping; wherein the initial data volume grouping includes a first initial data volume grouping and a second initial data volume grouping; and determine the data volume inclination based on the first initial data volume grouping and the second initial data volume grouping.
[0022] Optionally, the data volume inclination determination unit includes a data volume inclination determination subunit, which is used to determine the data volume mean of the first initial data volume grouping as the first data volume mean, and determine the data volume mean of the second initial data volume grouping as the second data volume mean; determine the iterative data volume mean according to the first data volume mean and the second data volume mean, and iteratively divide the data volume sequence according to the iterative data volume mean to obtain iterative data volume groups; wherein the iterative data volume groups include the first iterative data volume grouping and the second iterative data volume grouping; determine the data volume mean of the first iterative data volume grouping as the third data volume mean, and determine the data volume mean of the second iterative data volume grouping as the fourth data volume mean; determine the data volume inclination according to the third data volume mean and the fourth data volume mean.
[0023] Optionally, the data amount inclination determination subunit includes a data amount inclination calculation subunit, which is used to take the smaller value of the third data amount mean and the fourth data amount mean as the smaller data amount mean; take the absolute value of the difference between the third data amount mean and the fourth data amount mean as the absolute value of the data amount difference; and determine the data amount inclination based on the smaller data amount mean and the absolute value of the data amount difference.
[0024] Optionally, the processing module includes a processing unit, which is used to obtain pre-configured business processing conditions and generate query statements based on the business processing conditions; determine whether the computing task is a target computing task based on the query statement; if the computing task is a target computing task, store the task data corresponding to the computing task and / or perform an early warning operation on the computing task.
[0025] According to a third aspect of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the data processing method according to any one of the above items is implemented.
[0026] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the data processing method according to any one of the above items is implemented.
[0027] The technical solution provided by the present disclosure may have the following beneficial effects:
[0028] The data processing method in the exemplary embodiment of the present disclosure obtains the real-time data of the computing task; wherein the computing task includes multiple subtasks, and the real-time data includes the number of tasks of the multiple subtasks, the execution time of each subtask, and the data volume of each subtask; a task time sequence is generated according to each execution time, and the time inclination is determined according to the task time sequence and the number of tasks; a data volume sequence is generated according to each data volume, and the data volume inclination is determined according to the data volume sequence and the number of tasks; the data inclination level of the computing task is determined according to the time inclination and the data volume inclination, so as to process the computing task according to the data inclination level. Through the data processing method of the present disclosure, on the one hand, the real-time data of the computing task is obtained, and it can be judged in real time whether the computing task has data inclination according to the real-time data, which can avoid the lag of data inclination judgment and ensure the timeliness of task processing. On the other hand, the data inclination level of the computing task is comprehensively determined according to the two dimensions of execution time and data volume, and an objective and accurate judgment result can be obtained. On the other hand, according to the obtained judgment result, a data basis can be provided for the alarm and intervention of the computing task.
[0029] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0031] Figure 1 A flowchart schematically shows a data processing method according to an exemplary embodiment of the present disclosure;
[0032] Figure 2 A system structure diagram schematically shows a data processing method according to an exemplary embodiment of the present disclosure;
[0033] Figure 3 A real-time calculation flow chart of a data processing method according to an exemplary embodiment of the present disclosure is schematically shown;
[0034] Figure 4 A flowchart for determining a time inclination according to a task time sequence and a task quantity according to an exemplary embodiment of the present disclosure is schematically shown;
[0035] Figure 5 Schematically illustrates a flow chart of determining a time tilt according to an initial time grouping according to an exemplary embodiment of the present disclosure;
[0036] Figure 6 A flowchart of determining a data volume inclination according to a data volume sequence and a task quantity according to an exemplary embodiment of the present disclosure is schematically shown;
[0037] Figure 7 Schematically shows a flow chart of determining a time tilt according to an initial data volume grouping according to an exemplary embodiment of the present disclosure;
[0038] Figure 8 A data flow diagram for processing data using a complex event flow engine according to an exemplary embodiment of the present disclosure is schematically shown;
[0039] Fig. 9 A block diagram schematically shows a data processing device according to an exemplary embodiment of the present disclosure;
[0040] Fig.10 A block diagram schematically shows an electronic device according to an exemplary embodiment of the present disclosure;
[0041] Fig.11 A schematic diagram of a computer-readable storage medium according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0042] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0043] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known structures, methods, devices, implementations, materials or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.
[0044] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or these functional entities or parts of functional entities may be implemented in one or more software hardened modules, or these functional entities may be implemented in different networks and / or processor devices and / or microcontroller devices.
[0045] At present, the existing big data platform diagnosis method can perform timeout diagnosis processing on the task running end time, and perform offline analysis and processing on the task at the end of the task. When the task running time exceeds the set threshold, an early warning prompt is issued, and the tilt result is obtained through offline analysis at the end of the task. Among them, the end time is set based on personal experience and lacks scientific and objective data support. When the amount of data increases on a large scale and the cluster resources are tight, it may cause the task to run too long and fail to accurately diagnose the tilt; and offline analysis can only obtain results after the task runs, resulting in a lag in diagnosis and unable to guarantee the timeliness of the task.
[0046] Based on this, in this example embodiment, a data processing method is first provided. The data processing method of the present disclosure can be implemented by using a server, or the method described in the present disclosure can be implemented by using a terminal device, wherein the terminal described in the present disclosure may include mobile terminals such as mobile phones, tablet computers, laptop computers, PDAs, and personal digital assistants (PDAs), as well as fixed terminals such as desktop computers. Figure 1 The following is a schematic diagram schematically showing the data processing method flow according to some embodiments of the present disclosure. Figure 1 , the data processing method may include the following steps:
[0047] Step S110, obtaining real-time data of the computing task; wherein the computing task includes multiple subtasks, and the real-time data includes the task quantity of the multiple subtasks, the execution time of each subtask, and the data volume of each subtask.
[0048] Step S120 , generating a task time sequence according to each execution time, and determining a time inclination according to the task time sequence and the number of tasks.
[0049] Step S130, generating a data volume sequence according to each data volume, and determining the data volume inclination according to the data volume sequence and the task quantity.
[0050] Step S140, determining the data tilt level of the computing task according to the time tilt and the data volume tilt, so as to process the computing task according to the data tilt level.
[0051] According to the data processing method in this example embodiment, on the one hand, by acquiring the real-time data of the computing task, it is possible to determine in real time whether data skew occurs in the computing task based on the real-time data, thereby avoiding the lag caused by the data skew judgment and ensuring the timeliness of task processing. On the other hand, by comprehensively determining the data skew level of the computing task based on the two dimensions of execution time and data volume, an objective and accurate judgment result can be obtained. On the other hand, according to the obtained judgment result, a data basis can be provided for the alarm and intervention of the computing task.
[0052] Next, the data processing method in this exemplary embodiment will be further described.
[0053] In step S110, real-time data of the computing task is obtained; wherein the computing task includes multiple subtasks, and the real-time data includes the task quantity of the multiple subtasks, the execution time of each subtask, and the data volume of each subtask.
[0054] In some exemplary embodiments of the present disclosure, the computing task may be a distributed computing processing task (JOB) in various big data platforms. The subtask may be each subtask obtained after dividing the computing task. The real-time data may be a real-time JOB data resource of a distributed computing task, and the real-time data may include the number of tasks of multiple subtasks, the execution time of each subtask, and the data volume of each subtask. The number of tasks may be the number of subtasks included in the computing task, for example, the number of tasks may be 2000, 5000, etc. The execution time of each subtask may be the task execution time of each subtask, for example, the execution time may be 3 milliseconds (ms), 10 microseconds (μs), etc. The data volume of each subtask may be the task data size of each computing task, for example, the data volume may be 512 megabytes (Mbyte, MB). For example, in a big data platform using the MapReduce programming model, Map data and Reduce data may be included. When performing data tilt judgment, the Map data and Reduce data may be processed separately to comprehensively judge the data tilt degree of the computing task according to the calculation results.
[0055] Before calculating the data tilt judgment, first, the JOB real-time data can be obtained and used as the data source of the real-time calculation to perform real-time calculation.
[0056] According to some exemplary embodiments of the present disclosure, real-time operation data of a computing task and a historical log file of the computing task are obtained; and real-time data is generated based on the real-time operation data and the historical log file. The real-time operation data may be data generated during the real-time operation of multiple subtasks included in the computing task. The historical log file may be a log file of the historical operation status related to the computing task, and the historical log file may record JOB information of the execution completion status and the execution failure status.
[0057] refer to Figure 2 , Figure 2The system structure diagram of the data processing method according to the exemplary embodiment of the present disclosure is schematically shown. Before determining whether the data is tilted, real-time data can be obtained through the resource manager 210. For example, the resource manager 210 can be a YARN resource manager. For example, taking the Hadoop cluster of the big data platform as an example, the Hadoop cluster can adopt another resource coordinator (Yet Another Resource Negotiator, YARN) as the Hadoop resource manager. The YARN resource manager can include a resource manager (ResourceManager, RM) component and several application managers (ApplicationMaster, AM) components 211 for applications. By extending the AM component, the startup thread in the AM component monitors the resource Container, and can read the real-time running data of the JOB running in the AM component at preset time intervals (such as 30 seconds), and send the real-time running data to the resource queue of the stream processing platform. For example, the stream processing platform can be a Kafka stream processing platform. In addition, by extending the Job History (JH) component 212, the JH component can periodically collect the task logs of completed and failed executions in the AM component for unified management. In order to collect data on completed and failed executions, at the time point when the JH component collects data from the AM component to generate logs, it can trigger the logs to be sent to the Kafka platform for use. That is, after the real-time operation data and historical log files are obtained by each component in the resource manager 210, real-time data 221 can be generated based on the real-time operation data and historical log files, and the real-time data 221 can be sent to the resource queue 220 of the stream processing platform. The stream processing platform receives and caches real-time data to provide a data source for subsequent real-time calculations.
[0058] In step S120 , a task time sequence is generated according to each execution time, and a time inclination is determined according to the task time sequence and the number of tasks.
[0059] In some exemplary embodiments of the present disclosure, the task time sequence may be a sequence composed of task times of various computing tasks. The time tilt may be a data tilt degree of the computing task determined according to the dimension of the execution time of the computing task, and the time tilt may be represented by valueT.
[0060] refer to Figure 2, when performing real-time calculation, the real-time data 221 in the resource queue 220 can be pushed to the data real-time monitoring component 230, the real-time monitoring component 230 can include a real-time processing framework 231, and the real-time monitoring component 230 can integrate the algorithm module 232 of the real-time processing framework 231 for real-time analysis of the real-time data of the JOB. The present disclosure uses the algorithm module 232 to calculate and determine the data tilt degree of the computing task. In addition, the real-time monitoring component 230 can integrate the real-time processing framework 231 and the complex event process engine 233 to filter out the computing task data that meets certain conditions for subsequent processing. For example, the present disclosure can use the Eagle real-time monitoring component to integrate the Storm big data processing framework and the tilt algorithm component for real-time analysis of JOB data, integrate the Storm big data processing framework and the complex event processing (Complex EventProcessing, CEP) component to formulate a rule engine, and dynamically configure the structured query language (Structured QueryLanguage, SQL) statement to filter data.
[0061] refer to Figure 3 , Figure 3 The real-time computing flow chart of the data processing method according to the exemplary embodiment of the present disclosure is schematically shown. In step S310, the real-time data 221 cached in the resource queue 220 is pushed to the algorithm module 232, and the algorithm module 232 processes the real-time data 221 of the computing task in real time. Specifically, the data skewness of the computing task can be judged by the two dimensions of execution time and data volume. In step S321, the execution time of multiple subtasks can be obtained, and a task time sequence can be generated according to the obtained execution time to determine the time skewness according to the task time sequence and the number of tasks. In the present disclosure, the execution time of Map data and Reduce data can be calculated separately, and the time of a single Map task can be defined as mapTimeTaken, the data volume of a single Map task can be defined as mapData, and the number of Map tasks can be defined as mapNum; the time of a single Reduce task can be defined as reduceTimeTaken, the data volume of a single Reduce task can be defined as reduceData, and the number of Reduce tasks can be defined as reduceNum. The following takes the calculation process of Map data as an example to illustrate that the task time sequence generated according to the obtained execution time of multiple subtasks is timeTaken={1,2,8,4,5,6,2,5}.
[0062] According to some exemplary embodiments of the present disclosure, the total task time of multiple subtasks is determined according to the task time sequence, and the time mean of the multiple subtasks is determined according to the total task time and the number of tasks; the task time sequence is grouped according to the time mean to obtain an initial time grouping; wherein the initial time grouping includes a first initial time grouping and a second initial time grouping; and the time inclination is determined according to the first initial time grouping and the second initial time grouping. The total task time may be the sum of the execution time of multiple subtasks, and the total task time may be represented by sum(timeTaken). The time mean may be the average execution time of multiple subtasks, and the time mean may be represented by avgTime1. The number of tasks may be represented by n. The initial time grouping may be a time grouping generated after grouping the task time sequence according to the time mean. The first initial time grouping may be a grouping composed of execution times whose execution time is less than the time mean. The second initial time grouping may be a grouping composed of execution times whose execution time is greater than or equal to the time mean.
[0063] refer to Figure 4 , Figure 4 A flowchart for determining the time inclination according to the task time sequence and the number of tasks according to an exemplary embodiment of the present disclosure is schematically shown. In step S410, the total task time of multiple subtasks is calculated according to the task time. After the total task time is calculated, the time mean can be calculated according to the total task time and the number of tasks. The time mean can be obtained by dividing the total task time by the number of tasks. For example, according to timeTaken={1,2,8,4,5,6,2,5}, the total task time sum(timeTaken)=33 can be obtained, and the number of tasks n=8, then the time mean avgTime1=sum(timeTaken) / n=4. In step S420, the task time sequence can be grouped according to the time mean to obtain a first initial time grouping and a second initial time grouping. For example, according to the time mean avgTime1=4, the task time sequence can be divided into a first initial time grouping timeTaken[a]={1,2,2} and a second initial time grouping timeTaken[b]={8,4,5,6,5}. In step S430, the time inclination may be further calculated according to the obtained first initial time grouping and the second initial time grouping.
[0064] According to some exemplary embodiments of the present disclosure, the time mean of the first initial time grouping is determined as the first time mean, and the time mean of the second initial time grouping is determined as the second time mean; the iteration time mean is determined according to the first time mean and the second time mean, and the task time series is iteratively divided according to the iteration time mean to obtain the iteration time grouping; wherein the iteration time grouping includes the first iteration time grouping and the second iteration time grouping; the time mean of the first iteration time grouping is determined as the third time mean, and the time mean of the second iteration time grouping is determined as the fourth time mean; the time inclination is determined according to the third time mean and the fourth time mean. The first time mean may be the average execution time of the computing tasks included in the first initial time grouping. The second time mean may be the average execution time of the computing tasks included in the second initial time grouping. The iteration time mean may be the time mean obtained by subtracting the second time mean from the first time mean, and the iteration time mean is used to perform iterative grouping processing on the initial time grouping. The iteration time grouping may be the time grouping obtained by re-grouping the initial time grouping using the iteration time mean. The first iteration time grouping may be a grouping composed of execution times whose execution times are less than the iteration time mean. The second iteration time grouping may be a grouping consisting of execution times whose execution times are greater than or equal to the iteration time mean. The third time mean may be the average execution time of the computing tasks included in the first iteration time grouping. The fourth time mean may be the average execution time of the computing tasks included in the second iteration time grouping.
[0065] It should be noted that in some exemplary embodiments of the present disclosure, when calculating the first time mean, the second time mean, the third time mean and the fourth time mean, the calculation results are rounded up; in other exemplary embodiments, the time mean is processed in a manner similar to rounding down, which falls within the scope of protection of the present disclosure and the present disclosure does not make any special limitation on this.
[0066] refer to Figure 5 , Figure 5A flowchart for determining the time inclination according to the initial time grouping according to an exemplary embodiment of the present disclosure is schematically shown. In step S510, the time means corresponding to the first initial time grouping and the second initial time grouping can be determined respectively. Specifically, the first time mean avg(a) of the first initial time grouping timeTaken[a] is 2, and the second time mean avg(b) of the second initial time grouping timeTaken[b] is 6. In step S520, the iteration time mean can be calculated according to the first time mean and the second time mean, so as to iteratively divide the initial time grouping according to the calculated iteration time mean. Specifically, avgTime2 can be used to represent the iteration time mean, avgTime2=avg(b)-avg(a)=4. The initial time grouping is iteratively divided according to the obtained iteration time mean avgTime2, and the iteration time grouping can be obtained, including the first iteration time grouping timeTaken[a']={1,2,2} and the second iteration time grouping timeTaken[b']={8,4,5,6,5}, and the iteration grouping result has not changed. In step S530, the third time average and the fourth time average corresponding to the first iteration time grouping and the second iteration time grouping are determined respectively, then avg(a') = 2, avg(b') = 6. In step S540, the time tilt is determined according to the third time average and the fourth time average.
[0067] According to some exemplary embodiments of the present disclosure, the smaller value of the third time mean and the fourth time mean is used as the smaller time mean; the absolute value of the difference between the third time mean and the fourth time mean is used as the absolute value of the time difference; the time inclination is determined according to the smaller time mean and the absolute value of the time difference. The smaller time mean may be the time mean with the smaller value between the third time mean and the fourth time mean. The absolute value of the time difference may be the value obtained by performing a difference process on the third time mean and the fourth time mean and performing an absolute value operation.
[0068] After calculating the third time mean and the fourth time mean, a smaller time mean can be determined from the third time mean and the fourth time mean. The smaller time mean can be MIN T Indicates. When calculating the minimum value MIN T If MIN T <=0, then set MIN T = 1. For example, MIN is obtained based on the third time average and the fourth time average. T =min(avg(a'),avg(b'))=2. The absolute value of the time difference is calculated based on the third time average and the fourth time average. The absolute value of the time difference can be calculated using ABS T For example, ABST = abs(avg(a')-avg(b')) = 4. After calculating the smaller time mean and the absolute value of the time difference, the absolute value of the time difference is divided by the smaller time mean to obtain the time tilt, that is, the time tilt valueT = ABS T / MIN T =2.
[0069] In step S130 , a data volume sequence is generated according to each data volume, and the data volume inclination is determined according to the data volume sequence and the number of tasks.
[0070] In some exemplary embodiments of the present disclosure, the data volume sequence may be a sequence consisting of the data volume sizes of each computing task. The data volume inclination may be the data inclination degree of the computing task determined according to the dimension of the data volume of the computing task, and the data volume inclination may be represented by valueD.
[0071] refer to Figure 3 In step S322, the data volumes of multiple subtasks may be obtained, and a data volume sequence may be generated according to the obtained data volume, so as to determine the data volume inclination according to the data volume sequence and the number of tasks. For example, the obtained data volume sequence is Data = {1, 2, 5, 7, 3, 9, 9, 3}.
[0072] According to some exemplary embodiments of the present disclosure, the total data volume of multiple subtasks is determined according to the data volume sequence, and the data volume mean of the multiple subtasks is determined according to the total data volume and the number of tasks; the data volume sequence is grouped according to the data volume mean to obtain an initial data volume grouping; wherein the initial data volume grouping includes a first initial data volume grouping and a second initial data volume grouping; the data volume inclination is determined according to the first initial data volume grouping and the second initial data volume grouping. The total data volume can be the sum of the data volumes of multiple subtasks, and the total data volume can be represented by sum(Data). The data volume mean can be the average data volume of multiple subtasks, and the data volume mean can be represented by avgData1. The initial data volume grouping can be a data volume grouping generated after the data volume sequence is grouped according to the data volume mean. The first initial data volume grouping can be a grouping composed of the data volumes corresponding to the computing tasks whose data volumes are less than the data volume mean. The second initial time grouping can be a grouping composed of the data volumes corresponding to the computing tasks whose data volumes are greater than or equal to the data volume mean.
[0073] refer to Figure 6 , Figure 6The flowchart of determining the data volume inclination according to the data volume sequence and the number of tasks according to an exemplary embodiment of the present disclosure is schematically shown. In step S610, the total data volume is calculated according to the data volumes corresponding to the multiple subtasks in the data volume sequence, and the data volume mean is calculated according to the total data volume and the number of tasks. The data volume mean can be obtained by dividing the total data volume by the number of tasks. For example, according to the data volume sequence Data = {1, 2, 5, 7, 3, 9, 9, 3}, the total data volume sum(Data) = 39 can be obtained, then the data volume mean avgData1 = sum(Data) / n = 4. In step S620, the data volume sequence can be grouped according to the data volume mean to obtain the first initial data volume grouping and the second initial data volume grouping. For example, according to the data volume mean avgData1 = 4, the data volume sequence can be divided into the first initial data volume grouping Data[c] = {1, 2, 3, 3} and the second initial data volume grouping Data[d] = {5, 7, 9, 9}. In step S630, the data volume inclination may be further calculated according to the obtained first initial data volume grouping and the second initial data volume grouping.
[0074] According to some exemplary embodiments of the present disclosure, the data volume mean of the first initial data volume group is determined as the first data volume mean, and the data volume mean of the second initial data volume group is determined as the second data volume mean; the iterative data volume mean is determined according to the first data volume mean and the second data volume mean, and the data volume sequence is iteratively divided according to the iterative data volume mean to obtain iterative data volume grouping; wherein the iterative data volume grouping includes the first iterative data volume grouping and the second iterative data volume grouping; the data volume mean of the first iterative data volume grouping is determined as the third data volume mean, and the data volume mean of the second iterative data volume grouping is determined as the fourth data volume mean; the data volume inclination is determined according to the third data volume mean and the fourth data volume mean. The first data volume mean may be the average data volume of the computing tasks included in the first initial data volume grouping. The second data volume mean may be the average data volume of the computing tasks included in the second initial data volume grouping. The iterative data volume mean may be the data volume mean obtained by subtracting the second data volume mean from the first data volume mean, and the iterative data volume mean is used to perform iterative grouping processing on the initial data volume grouping. The iterative data volume grouping may be a data volume grouping obtained by re-grouping the initial data volume grouping using the iterative data volume mean. The first iterative data volume grouping may be a grouping consisting of the data volumes corresponding to the computing tasks whose data volumes are less than the iterative data volume mean. The second iterative time grouping may be a grouping consisting of the data volumes corresponding to the computing tasks whose data volumes are greater than or equal to the iterative data volume mean. The third data volume mean may be the average data volume of the computing tasks included in the first iterative data volume grouping. The fourth data volume mean may be the average data volume of the computing tasks included in the second iterative data volume grouping.
[0075] Likewise, in the exemplary embodiments of the present disclosure, when calculating the first data volume mean, the second data volume mean, the third data volume mean, and the fourth data volume mean, the calculation results are all rounded up.
[0076] refer to Figure 7 , Figure 7 A flowchart for determining the time inclination according to the initial data volume grouping according to an exemplary embodiment of the present disclosure is schematically shown. In step S710, the data volume means corresponding to the first initial data volume grouping and the second initial data volume grouping can be determined respectively. Specifically, the first data volume mean avg(c) of the first initial data volume grouping Data[c] is 3, and the second data volume mean avg(d) of the second initial data volume grouping Data[d] is 8. In step S720, the iterative data volume mean can be calculated based on the first data volume mean and the second data volume mean, so as to iteratively divide the initial data volume grouping according to the calculated iterative data volume mean. Specifically, avgData2 can be used to represent the iterative data volume mean, avgData2=avg(d)-avg(c)=5. The initial data volume group is iteratively divided according to the obtained iterative data volume average avgData2, and iterative data volume groups can be obtained, including the first iterative data volume group Data[c']={1,2,3,3} and the second iterative data volume group Data[d']={5,7,9,9}. In step S730, the third data volume average and the fourth data volume average corresponding to the first iterative data volume group and the second iterative data volume group are respectively determined, and avg(c')=3, avg(d')=8. In step S740, the data volume inclination is determined according to the third data volume average and the fourth data volume average.
[0077] According to some exemplary embodiments of the present disclosure, the smaller value of the third data volume mean and the fourth data volume mean is used as the smaller data volume mean; the absolute value of the difference between the third data volume mean and the fourth data volume mean is used as the data volume difference absolute value; the data volume inclination is determined according to the smaller data volume mean and the data volume difference absolute value. The smaller data volume mean may be the data volume mean with the smaller value between the third data volume mean and the fourth data volume mean. The data volume difference absolute value may be the value obtained by performing a difference process on the third data volume mean and the fourth data volume mean and performing an absolute value operation.
[0078] After calculating the third data volume mean and the fourth data volume mean, a smaller data volume mean can be determined from the third data volume mean and the fourth data volume mean. The smaller data volume mean can be obtained by using MIN D Indicates. When calculating the minimum value MIN D If MIND <=0, then set MIN D = 1. For example, MIN is obtained based on the third data volume mean and the fourth data volume mean. D =min(avg(c'),avg(d'))=3. The absolute value of the data volume difference is calculated based on the third data volume mean and the fourth data volume mean. The absolute value of the data volume difference can be calculated using ABS D For example, ABS D = abs(avg(c')-avg(d')) = 5. After calculating the smaller data volume mean and the absolute value of the data volume difference, the absolute value of the data volume difference is divided by the smaller data volume mean to obtain the data volume inclination, that is, the data volume inclination valueD = ABS D / MIN D =1.
[0079] It is easy for those skilled in the art to understand that the above calculation method can be used to calculate the time inclination and data volume inclination for both Map data and Reduce data, and the present disclosure will not elaborate on the specific calculation process.
[0080] In step S140 , the data tilt level of the computing task is determined according to the time tilt and the data volume tilt, so as to process the computing task according to the data tilt level.
[0081] In some exemplary embodiments of the present disclosure, the data skew level may be a level indicating the severity of data skew generated by the data processing platform when performing task processing. Figure 3In step S330, when the severity of data tilt is calculated, the corresponding calculation weights of each calculation result can be set respectively, and after weighted processing of the obtained multiple tilts, the judgment result 310, i.e., the data tilt level of the calculation task, can be obtained. In the present disclosure, specific numerical values can be used to represent different data tilt levels. For example, the data tilt level can be set to 5 levels, and the numerical values corresponding to each level are 0, 1, 2, 3, and 4 respectively. Specifically, the value 0 can represent no tilt (none), the value 1 can represent low tilt (low), the value 2 can represent moderate tilt (moderate), the value 3 can represent high tilt (severe), and the value 4 can represent severe tilt (critical). In step S340, after the judgment result 310 is obtained, the judgment result 310 can be subjected to conditional judgment operation. In step S350, if the judgment result of the calculation task meets the judgment condition, the corresponding calculation task and related data are subjected to diagnostic operation. For example, after determining the data tilt level, the calculation task whose data tilt level meets certain conditions can be processed. If the judgment result does not meet the judgment condition, then end and return.
[0082] According to some exemplary embodiments of the present disclosure, a pre-configured business processing condition is obtained, and a query statement is generated according to the business processing condition; whether the computing task is a target computing task is determined according to the query statement; if the computing task is a target computing task, the task data corresponding to the computing task is stored and / or an early warning operation is performed on the computing task. The business processing condition may be a condition for screening computing tasks. In actual application scenarios, the business processing condition may be pre-configured according to business needs. For example, the business processing condition may be a computing task for screening data with a tilt level greater than 4. The query statement may be a query statement used to screen out a specific computing task from a plurality of different computing tasks. The target computing task may be a specific computing task that meets the conditions defined in the query statement. The task data may be basic information and other related data of the subtasks included in the computing task. For example, the basic information may include but is not limited to the amount of data of the subtasks included in the computing task, the amount of data read, the amount of data written, the task execution time, the task start time, the expected end time of the task, etc. The early warning operation may be an early warning operation performed on the computing task when the operating index of the computing task exceeds a preset threshold.
[0083] refer to Figure 2When the Storm stream processing platform and CEP components are integrated to formulate a rule engine, the pre-configured business processing conditions for computing tasks can be obtained, and query statements can be generated based on the business processing conditions. The query statements can be SQL-like statements. For example, when the business processing condition is to filter data that exceeds a certain variable threshold, the corresponding SQL-like statement can be "select a.test from test_table where val>100", where val>100 is a business processing condition, i.e., rule judgment. Taking the Siddhi engine as an example, Siddhi is a lightweight, simple, open source complex event flow engine that can use a SQL-like language to describe event flow tasks, which can well support the development of an extensible and configurable stream task execution engine. In traditional designs, in order to support different types of alarm rules, different business logic codes need to be written, but after using Siddhi, only different stream tasks Siddhiql need to be configured, that is, different rule tasks can be supported. By integrating the Storm stream processing platform and the CEP engine, a dynamically configurable business condition engine can be formed. That is, as specific business needs change, the corresponding business judgment conditions can be adjusted accordingly to meet the ever-changing business needs.
[0084] refer to Figure 8 , Figure 8 The data flow diagram for processing data using a complex event flow engine according to an exemplary embodiment of the present disclosure is schematically shown. The computing task and its related data are input into the engine kernel 830 through the input adapter 810, and the engine kernel 830 processes the input computing task and its related data, and can output the result, i.e., the target computing task, through the output adapter 820 to perform diagnostic operations on the target computing task. Among them, the SQL-like statement can be configured in the engine kernel 830 through the compiler 840 so that the engine kernel 830 can perform data screening operations.
[0085] After the target computing tasks are screened out through the above steps, the screened target computing tasks and related task diagnostic data can be stored in the database to store the screened data externally. In addition, a third-party application programming interface (API) can be called to allow third-party applications to intervene in and warn the target computing tasks. Figure 2After obtaining the task diagnostic data, the task diagnostic data can be stored in different databases. For example, database 241 can be a resource queue in the Kafka stream processing platform, and the Kafka stream processing platform can be used for other real-time processing tasks; database 242 can be an Hbase database, which is a distributed, column-oriented open source database, which can be used for instant queries of other tasks; database 243 can be a Mysql database, which is a relational database management system, which can be used for underlying relational data of other systems. In addition, the filtered data is transmitted to the third-party application program interface 244, and the third-party application program can warn and intervene in the filtered data, for example, to warn the computing task whose execution time has exceeded the expected completion time, so that the technicians can intervene in the relevant computing tasks in time.
[0086] It should be noted that the terms "first", "second", "third", "fourth", etc. used in the present disclosure are only for distinguishing different initial time groups, different time means, different iterative time groups, and different initial data volume groups, different data volume means, and different iterative data volume groups, and should not impose any limitations on the present disclosure.
[0087] In summary, the data processing method disclosed in the present invention obtains real-time data of a computing task; wherein the computing task includes multiple subtasks, and the real-time data includes the number of tasks of the multiple subtasks, the execution time of each subtask, and the data volume of each subtask; a task time sequence is generated according to each execution time, and the time inclination is determined according to the task time sequence and the number of tasks; a data volume sequence is generated according to each data volume, and the data volume inclination is determined according to the data volume sequence and the number of tasks; the data inclination level of the computing task is determined according to the time inclination and the data volume inclination, so as to process the computing task according to the data inclination level. Through the data processing method disclosed in the present invention, on the one hand, the real-time data of the computing task is obtained, and it can be judged in real time whether the computing task has data inclination according to the real-time data, which can avoid the lag of data inclination judgment and ensure the timeliness of task processing. On the other hand, the data inclination level of the computing task is comprehensively determined according to the two dimensions of execution time and data volume, and an objective and accurate judgment result can be obtained. On the other hand, through the calculation method of time inclination and data volume inclination, a more accurate data inclination calculation result can be obtained, which improves the calculation efficiency and the accuracy of the calculation result. On the other hand, the obtained judgment results can provide data basis for alarm and intervention of computing tasks.
[0088] It should be noted that, although the steps of the method of the present invention are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0089] In addition, in this exemplary embodiment, a data processing device is also provided. Fig. 9 The data processing device 900 may include: a real-time data acquisition module 910, a time inclination determination module 920, a data volume inclination determination module 930 and a processing module 940.
[0090] Specifically, the real-time data acquisition module 910 can be used to acquire real-time data of a computing task; wherein the computing task includes multiple subtasks, and the real-time data includes the number of tasks of the multiple subtasks, the execution time of each subtask, and the data volume of each subtask; the time inclination determination module 920 can be used to generate a task time series according to each execution time, and determine the time inclination according to the task time series and the number of tasks; the data volume inclination determination module 930 can be used to generate a data volume sequence according to each data volume, and determine the data volume inclination according to the data volume sequence and the number of tasks; the processing module 940 can be used to determine the data inclination level of the computing task according to the time inclination and the data volume inclination, so as to process the computing task according to the data inclination level.
[0091] In an exemplary embodiment of the present disclosure, the real-time data acquisition module also includes a real-time data acquisition unit for acquiring real-time operation data of the computing task and the historical log file of the computing task; and generating real-time data based on the real-time operation data and the historical log file.
[0092] In an exemplary embodiment of the present disclosure, a time inclination determination module includes a time inclination determination unit, which is used to determine the total task time of multiple subtasks based on the task time sequence, and determine the time mean of the multiple subtasks based on the total task time and the number of tasks; the task time sequence is grouped according to the time mean to obtain an initial time grouping; wherein the initial time grouping includes a first initial time grouping and a second initial time grouping; and the time inclination is determined based on the first initial time grouping and the second initial time grouping.
[0093] In an exemplary embodiment of the present disclosure, a time inclination determination unit includes a time inclination determination subunit, which is used to determine the time mean of a first initial time group as a first time mean, and determine the time mean of a second initial time group as a second time mean; determine an iteration time mean according to the first time mean and the second time mean, and iteratively divide the task time series according to the iteration time mean to obtain iteration time groups; wherein the iteration time groups include a first iteration time group and a second iteration time group; determine the time mean of the first iteration time group as a third time mean, and determine the time mean of the second iteration time group as a fourth time mean; determine the time inclination according to the third time mean and the fourth time mean.
[0094] In an exemplary embodiment of the present disclosure, the time gradient determination subunit includes a time gradient calculation subunit, which is used to take the smaller value of the third time mean and the fourth time mean as the smaller time mean; take the absolute value of the difference between the third time mean and the fourth time mean as the absolute value of the time difference; and determine the time gradient according to the smaller time mean and the absolute value of the time difference.
[0095] In an exemplary embodiment of the present disclosure, a data volume inclination determination module includes a data volume inclination determination unit, which is used to determine the total data volume of multiple subtasks based on a data volume sequence, and determine the data volume mean of the multiple subtasks based on the total data volume and the number of tasks; the data volume sequence is grouped according to the data volume mean to obtain an initial data volume grouping; wherein the initial data volume grouping includes a first initial data volume grouping and a second initial data volume grouping; and the data volume inclination is determined based on the first initial data volume grouping and the second initial data volume grouping.
[0096] In an exemplary embodiment of the present disclosure, a data volume inclination determination unit includes a data volume inclination determination subunit, which is used to determine the data volume mean of a first initial data volume grouping as a first data volume mean, and determine the data volume mean of a second initial data volume grouping as a second data volume mean; determine an iterative data volume mean according to the first data volume mean and the second data volume mean, and iteratively divide the data volume sequence according to the iterative data volume mean to obtain iterative data volume groups; wherein the iterative data volume groups include a first iterative data volume grouping and a second iterative data volume grouping; determine the data volume mean of the first iterative data volume grouping as a third data volume mean, and determine the data volume mean of the second iterative data volume grouping as a fourth data volume mean; determine the data volume inclination according to the third data volume mean and the fourth data volume mean.
[0097] In an exemplary embodiment of the present disclosure, a data amount inclination determination subunit includes a data amount inclination calculation subunit, which is used to take the smaller value of the third data amount mean and the fourth data amount mean as the smaller data amount mean; take the absolute value of the difference between the third data amount mean and the fourth data amount mean as the absolute value of the data amount difference; and determine the data amount inclination based on the smaller data amount mean and the absolute value of the data amount difference.
[0098] In an exemplary embodiment of the present disclosure, the processing module includes a processing unit for obtaining pre-configured business processing conditions and generating a query statement based on the business processing conditions; judging whether a computing task is a target computing task based on the query statement; if the computing task is a target computing task, storing task data corresponding to the computing task and / or performing an early warning operation on the computing task.
[0099] The specific details of the virtual modules of the above-mentioned data processing devices have been described in detail in the corresponding data processing methods, so they will not be repeated here.
[0100] It should be noted that, although several modules or units of the data processing device are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0101] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0102] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware embodiments, complete software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0103] Refer to the following Fig.10 The electronic device 1000 according to such an embodiment of the present invention will be described. Fig.10 The electronic device 1000 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0104] like Fig.10As shown, the electronic device 1000 is in the form of a general computing device. The components of the electronic device 1000 may include but are not limited to: the at least one processing unit 1010, the at least one storage unit 1020, a bus 1030 connecting different system components (including the storage unit 1020 and the processing unit 1010), and a display unit 1040.
[0105] The storage unit stores program codes, which can be executed by the processing unit 1010, so that the processing unit 1010 executes the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification.
[0106] The storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 1021 and / or a cache memory unit 1022 , and may further include a read-only memory unit (ROM) 1023 .
[0107] The storage unit 1020 may also include a program / utility 1024 having a set (at least one) of program modules 1025, such program modules 1025 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0108] Bus 1030 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0109] The electronic device 1000 may also communicate with one or more external devices 1070 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1000, and / or communicate with any device that enables the electronic device 1000 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1050. Furthermore, the electronic device 1000 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1060. As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 via a bus 1030. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0110] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
[0111] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0112] refer to Fig.11 As shown, a program product 1100 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0113] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0114] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0115] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0116] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0117] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0118] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0119] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A data processing method, It is characterized in that include: Acquire real-time data of a computing task; wherein the computing task includes a plurality of subtasks, and the real-time data includes the number of tasks of the plurality of subtasks, the execution time of each of the subtasks, and the data volume of each of the subtasks; Generating a task time sequence according to each of the execution times, and determining a time inclination according to the task time sequence and the number of tasks; Generating a data volume sequence according to each of the data volumes, and determining a data volume inclination according to the data volume sequence and the number of tasks; determining a data tilt level of the computing task according to the time tilt and the data volume tilt, so as to process the computing task according to the data tilt level; The determining of the time inclination according to the task time sequence and the task quantity comprises: The task time series is grouped according to the time averages of the multiple subtasks to obtain initial time groups; wherein the initial time groups include a first initial time group and a second initial time group; Determine the time mean of the first initial time grouping as a first time mean, and determine the time mean of the second initial time grouping as a second time mean; Determine an iteration time mean according to the first time mean and the second time mean, and iteratively divide the task time sequence according to the iteration time mean to obtain iteration time groups; wherein the iteration time groups include a first iteration time group and a second iteration time group; Determine the time mean of the first iteration time grouping as a third time mean, and determine the time mean of the second iteration time grouping as a fourth time mean; The time inclination is determined according to the third time mean and the fourth time mean.
2. The data processing method according to claim 1, It is characterized in that The obtaining of real-time data of the computing task includes: Obtaining real-time running data of the computing task and historical log files of the computing task; The real-time data is generated according to the real-time operation data and the historical log file.
3. The data processing method according to claim 1, It is characterized in that The determining of the time inclination according to the task time sequence and the task quantity further comprises: The total task time of the plurality of subtasks is determined according to the task time sequence, and the time average of the plurality of subtasks is determined according to the total task time and the number of tasks.
4. The data processing method according to claim 1, It is characterized in that The determining the time inclination according to the third time mean and the fourth time mean comprises: taking the smaller value of the third time mean and the fourth time mean as the smaller time mean; taking the absolute value of the difference between the third time mean and the fourth time mean as the absolute value of the time difference; The time inclination is determined according to the smaller time mean and the absolute value of the time difference.
5. The data processing method according to claim 1, It is characterized in that The step of determining the data volume inclination according to the data volume sequence and the task quantity includes: Determine the total data volume of the plurality of subtasks according to the data volume sequence, and determine the mean data volume of the plurality of subtasks according to the total data volume and the number of tasks; The data volume sequence is grouped according to the data volume mean to obtain an initial data volume group; wherein the initial data volume group includes a first initial data volume group and a second initial data volume group; The data amount inclination is determined according to the first initial data amount grouping and the second initial data amount grouping.
6. The data processing method according to claim 5, It is characterized in that The step of determining the data volume inclination according to the first initial data volume grouping and the second initial data volume grouping comprises: Determine the data amount mean of the first initial data amount group as the first data amount mean, and determine the data amount mean of the second initial data amount group as the second data amount mean; Determine an iterative data volume mean value according to the first data volume mean value and the second data volume mean value, and iteratively divide the data volume sequence according to the iterative data volume mean value to obtain iterative data volume groups; wherein the iterative data volume groups include first iterative data volume groups and second iterative data volume groups; Determine the data amount mean of the first iterative data amount grouping as the third data amount mean, and determine the data amount mean of the second iterative data amount grouping as the fourth data amount mean; The data amount inclination is determined according to the third data amount mean value and the fourth data amount mean value.
7. The data processing method according to claim 6, It is characterized in that The determining the data amount inclination according to the third data amount mean and the fourth data amount mean comprises: Taking the smaller value between the third data amount mean and the fourth data amount mean as the smaller data amount mean; taking the absolute value of the difference between the third data amount mean and the fourth data amount mean as the data amount difference absolute value; The data amount inclination is determined according to the smaller data amount mean and the absolute value of the data amount difference.
8. The data processing method according to claim 1, It is characterized in that The processing of the computing task according to the data tilt level includes: Obtaining pre-configured business processing conditions, and generating query statements according to the business processing conditions; Determine whether the computing task is a target computing task according to the query statement; If the computing task is a target computing task, the task data corresponding to the computing task is stored and / or an early warning operation is performed on the computing task.
9. A data processing device, It is characterized in that include: A real-time data acquisition module, used to acquire real-time data of a computing task; wherein the computing task includes a plurality of subtasks, and the real-time data includes the number of tasks of the plurality of subtasks, the execution time of each of the subtasks, and the data volume of each of the subtasks; A time inclination determination module, used to generate a task time sequence according to each of the execution times, and determine the time inclination according to the task time sequence and the number of tasks; A data volume inclination determination module, used to generate a data volume sequence according to each of the data volumes, and determine the data volume inclination according to the data volume sequence and the number of tasks; a processing module, configured to determine a data tilt level of the computing task according to the time tilt and the data volume tilt, so as to process the computing task according to the data tilt level; The time inclination determination module is further used to group the task time series according to the time averages of the multiple subtasks to obtain initial time groups; wherein the initial time groups include a first initial time group and a second initial time group; Determine the time mean of the first initial time grouping as a first time mean, and determine the time mean of the second initial time grouping as a second time mean; Determine an iteration time mean according to the first time mean and the second time mean, and iteratively divide the task time sequence according to the iteration time mean to obtain iteration time groups; wherein the iteration time groups include a first iteration time group and a second iteration time group; Determine the time mean of the first iteration time grouping as a third time mean, and determine the time mean of the second iteration time grouping as a fourth time mean; The time inclination is determined according to the third time mean and the fourth time mean.
10. An electronic device, It is characterized in that include: processor; as well as A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the data processing method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the data processing method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Load balancing method and device
CN109376013A
Database query method and device, electronic equipment and storage medium
CN110362611A
