Water level line generation method and device, equipment, storage medium and product
By using linear regression model to generate target water level lines in the big data real-time processing system, the real-time and accuracy balance problems caused by data out of order are solved, and more efficient data processing is achieved.
Patent Information
- Application Number
- CN202411439313.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-02-11
AI Technical Summary
In the field of real-time processing of big data, distributed system architectures cause data out of order due to the availability of node resources and uneven data distribution, and the existing technology is difficult to balance between real-time and accuracy, resulting in excessive system resource consumption or data discarding .
By obtaining the event time and system time of all events in the current cycle of the system and the previous few cycles, a linear regression model is trained, and the target water level line is generated based on the current event time and maximum delay time, improving the accuracy of dynamic water level line generation.
The accuracy and real-time nature of system data processing are improved, and the water level line is dynamically adjusted according to the degree of data out of order and accuracy requirements to ensure the real-time and accuracy of data to the greatest extent.
Smart Images

Figure CN119416625A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a water level generation method, device, equipment, storage medium and product. Background Art
[0002] As modern society enters the digital age, it promotes the digital transformation of enterprises, empowers enterprises with high-quality development through digitalization, and brings the development of enterprise informatization to a new level. On this basis, the demand for real-time acquisition, application and decision-making of information is imminent. Data is the carrier of information. The real-time and accuracy of data processing directly determine the real-time and accuracy of information acquisition. In order to improve the real-time performance of data processing, we can start with the throughput of data processing. At present, the distributed system architecture is mainly used in the field of big data real-time processing. Data is distributed on multiple nodes and calculated simultaneously to increase the throughput of the big data processing system. However, due to the different resource availability (CPU, memory, etc.) of each node and the uneven distribution of data on each node, it is easy to cause data disorder. Although the problem of disordered data delay can be solved by setting the delay time, due to the different disorder degrees of different business data, even the disorder degrees of the same business data are different at different times, the setting of the waterline delay time becomes the key parameter for the trade-off between real-time and accuracy in data processing. If the delay time is set with the maximum event time delay, the system will be idle when there is no data delay, and it will also increase the retention time of data in the system, increase the resource consumption of the system, and make the real-time performance of the real-time computing system impossible to guarantee. If the delay time is set too small, when the disorder is large, all data exceeding the delay time will be discarded, and the accuracy of the system cannot be guaranteed. Summary of the invention
[0003] The present invention provides a water level generation method, device, equipment, storage medium and product, which can generate a target water level for the current cycle based on a linear regression model and a maximum delay time trained according to the event time and system time of all events in the current cycle and previous cycles, thereby improving the accuracy of dynamic water level generation, thereby improving the real-time performance of the system while improving the accuracy of system data processing.
[0004] In order to achieve the above object, an embodiment of the present invention provides a water level line generation method, comprising:
[0005] Obtaining the event time and system time of all events in several cycles before the current cycle of the system, and generating a linear regression model of the water level of the current cycle according to the event time and system time; wherein the event time and system time correspond to each other one by one;
[0006] According to the current event time and the current system time of all events in the current period, the linear regression model is used to calculate the time difference corresponding to each event in the current period;
[0007] Calculate the maximum delay time of the current cycle based on all time differences and a preset confidence interval;
[0008] The linear regression model is used to generate the target water level line of the current cycle according to the current event time and the maximum delay time.
[0009] As an improvement of the above solution, the method of obtaining the event time and system time of all events in several cycles before the current cycle of the system, and generating a linear regression model of the water level line of the current cycle according to the event time and system time, includes:
[0010] Obtaining the event time and system time of all events in several cycles before the current cycle of the system, and using the event time and system time as training data;
[0011] The training data is trained using the least squares method to obtain a linear regression model of the water level line of the current period.
[0012] As an improvement of the above solution, the linear regression model is used to calculate the time difference corresponding to each event in the current period according to the current event time of all events in the current period and the current system time, including:
[0013] Get the current event time and current system time of all events in the current period;
[0014] Inputting all current system times into the linear regression model to generate a reference water level line for the current period;
[0015] According to the current event time of each event in the current period, find the value of the reference water level line corresponding to the current event time, subtract the corresponding current event time from the value of the corresponding reference water level line, and obtain the time difference corresponding to each event.
[0016] As an improvement of the above solution, the maximum delay time of the current cycle is calculated based on all time differences and a preset confidence interval, including:
[0017] Calculate the mean and standard deviation of all time differences;
[0018] The maximum delay time of the current cycle is calculated based on the mean, the standard deviation and a preset confidence interval.
[0019] As an improvement of the above solution, the step of generating the target water level line of the current cycle by using the linear regression model according to the current event time and the maximum delay time includes:
[0020] Inputting all current event times into the linear regression model to obtain the target reference water level line of the current period;
[0021] The maximum delay time is subtracted from the value of each target reference water level to obtain the target water level of the current cycle.
[0022] In order to achieve the above-mentioned purpose, an embodiment of the present invention provides a water level line generating device, including:
[0023] A regression model generation module, used to obtain the event time and system time of all events in a number of cycles before the current cycle of the system, and generate a linear regression model of the water level of the current cycle according to the event time and system time; wherein the event time and system time correspond to each other one by one;
[0024] A time difference calculation module, used to calculate the time difference corresponding to each event in the current period according to the current event time and the current system time of all events in the current period using the linear regression model;
[0025] A delay time calculation module, used to calculate the maximum delay time of the current cycle according to all time differences and a preset confidence interval;
[0026] The target water level generation module is used to generate the target water level of the current cycle using the linear regression model according to the current event time and the maximum delay time.
[0027] As an improvement of the above solution, the regression model generation module is used to:
[0028] Obtaining the event time and system time of all events in several cycles before the current cycle of the system, and using the event time and system time as training data;
[0029] The training data is trained using the least squares method to obtain a linear regression model of the water level line of the current period.
[0030] In order to achieve the above-mentioned purpose, an embodiment of the present invention provides a water level line generation device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the above-mentioned water level line generation method when executing the computer program.
[0031] In order to achieve the above-mentioned purpose, an embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned water level generation method.
[0032] To achieve the above objective, an embodiment of the present invention further provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the above water level generation method.
[0033] Compared with the prior art, the embodiments of the present invention disclose a water level generation method, device, equipment, storage medium and product, which obtain the event time and system time of all events in several cycles before the current cycle of the system, and generate a linear regression model of the water level of the current cycle according to the event time and system time; wherein the event time and system time correspond one to one; according to the current event time and the current system time of all events in the current cycle, the linear regression model is used to calculate the time difference corresponding to each event in the current cycle; according to all time differences and a preset confidence interval, the maximum delay time of the current cycle is calculated; according to the current event time and the maximum delay time, the linear regression model is used to generate the target water level of the current cycle. It can generate the target water level line of the current cycle based on the linear regression model and maximum delay time trained according to the event time and system time of all events in the current cycle and previous cycles. It can set the preset confidence interval according to the degree of current data disorder and the accuracy required by the result. When the degree of data disorder is small, a smaller target water level line will be predicted and the real-time performance of the data will be guaranteed. When the degree of data disorder is large, a larger target water level line will be output in real time. This ensures the real-time performance of the data to the greatest extent while meeting the data accuracy, and improves the accuracy of dynamic water level line generation, thereby improving the real-time performance of the system while improving the accuracy of system data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a flow chart of a water level line generation method provided by an embodiment of the present invention;
[0035] Figure 2 is a time curve diagram of output under different delays provided by an embodiment of the present invention;
[0036] Figure 3 is a curve diagram of the amount of inverted data output under different delays provided by an embodiment of the present invention;
[0037] Figure 4 It is a structural schematic diagram of a water level line generating device provided by an embodiment of the present invention;
[0038] Figure 5 It is a structural block diagram of a water level line generating device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] It should be noted that the terms "comprises" and "specifically" and any variations of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or inherent to these processes, methods, products or apparatuses.
[0041] See also Figure 1 , Figure 1 1 is a flow chart of a water level line generation method provided by an embodiment of the present invention, the water level line generation method comprising:
[0042] S1, obtaining the event time and system time of all events in several cycles before the current cycle of the system, and generating a linear regression model of the water level of the current cycle according to the event time and system time; wherein the event time and system time correspond to each other one by one;
[0043] S2, according to the current event time and the current system time of all events in the current period, using the linear regression model, calculate the time difference corresponding to each event in the current period;
[0044] S3, calculating the maximum delay time of the current cycle according to all time differences and a preset confidence interval;
[0045] S4, generating the target water level line of the current cycle by using the linear regression model according to the current event time and the maximum delay time.
[0046] Exemplarily, the waterline generation method is implemented by a waterline generation server, and the waterline generation server can exchange information with the target user. The watermark generation server obtains the event time and system time of all events in several cycles before the current cycle of the data processing system (for example, several cycles are X cycles, X can be set as needed, with a fixed time interval Δt or a fixed data volume Δn as one cycle), and uses the least squares method to fit the event time and system time into a linear regression model. The linear regression model is used to predict the reference watermark of the current cycle, obtain the target event time corresponding to each event in the current cycle of the data processing system, find the corresponding value from the reference watermark through the target event time, subtract the target event time from the value to obtain the time difference corresponding to each event; calculate the mean and standard deviation of all time differences; and calculate the maximum delay time of the current cycle according to the mean μ, the standard deviation σ and the preset confidence interval Y (for example, according to formula (1) delay=μ+z*σ, where delay is the maximum delay time and z is the value corresponding to the preset confidence interval Y. The preset confidence interval Y can be set as needed and is generally 99.7%). It is worth noting that if the preset confidence intervals are 68.27%, 90%, 95%, 99%, and 99.73%, the corresponding values z are 1, 1.64, 1.96, 2.58, and 3, respectively. When the accuracy of the data is required to be higher, the preset confidence interval should be set larger, and the corresponding value z is also larger. When the real-time requirement of the data is higher, the preset confidence interval can be relatively smaller, and the corresponding value z is also reduced accordingly. The current event time of all events in the current cycle is input into the linear regression model to obtain the target reference water level of the current cycle, and the value of the target reference water level corresponding to each event is subtracted from the maximum delay time to obtain the target water level of the current cycle. The embodiment of the present invention can generate the target water level of the current cycle based on the linear regression model and the maximum delay time obtained by training the event time and system time of all events in the previous cycles, thereby improving the accuracy of the dynamic water level generation, thereby improving the accuracy of the system processing data while improving the real-time performance of the system.
[0047] It should be noted that the event time described in the embodiment of the present invention is an inherent characteristic of the data stream itself carrying events, which refers to the time when each event occurs on the corresponding device, that is, the time when the data is generated; the system time is the time corresponding to the event entering the system; each event has a corresponding event time and system time, and the event time and system time correspond one to one. The watermark is a timestamp indicating the arrival of the upstream event time. The watermark is sent by each node and then received by the downstream business processing node. If the watermark of a certain event time sent by all upstream nodes is received downstream, it means that all data before this event time has arrived. In order to solve the problem of delayed arrival of some data, the usual practice is to add a delay time on the basis of the current event time when sending the watermark. This delay time indicates the delay degree that allows data to arrive out of order. The data arriving within this delay time can still be counted by the business calculation program as normal data.
[0048] Specifically, the step S1 includes:
[0049] S11, obtaining the event time and system time of all events in several cycles before the current cycle of the system, and using the event time and system time as training data;
[0050] S12, using the least square method to train the training data to obtain a linear regression model of the water level line of the current period.
[0051] Exemplarily, X groups of event times and corresponding system times of fixed time intervals Δt or fixed data volumes Δn before the current system time are collected, an average event time queue queueAET and an average system time queue queueAST are created as training data, and a linear regression model is fitted using the least squares method. The linear regression model expression is LR(t)=LS(queueAST,queueAET).
[0052] Specifically, the step S2 includes:
[0053] S21, obtaining the current event time and current system time of all events in the current period;
[0054] S22, inputting all current system time into the linear regression model to generate the reference water level line of the current period;
[0055] S23, according to the current event time of each event in the current period, find the value of the reference water level line corresponding to the current event time, subtract the corresponding current event time from the value of the corresponding reference water level line, and obtain the time difference corresponding to each event.
[0056] For example, taking a fixed time interval Δt as an example, the water level line sending cycle is initialized, w n =t c +Δt, where w n The water level sending time of the current cycle, t c is the current time of the system, and obtains the current event time t of all events within the current time Δt e and the current system time t s , set all current system time t s Input the linear regression model to generate the reference water level of the current period, w s =LR(t s ), where w s is the reference water level of the current cycle, LR(*) is a linear regression model, and according to the current event time of each event in the current cycle, the value of the reference water level corresponding to the current event time is found, and the corresponding current event time is subtracted from the value of the corresponding reference water level to obtain the time difference r corresponding to each event, r=LR(t s )-t e .
[0057] Specifically, the step S3 includes:
[0058] S31, calculating the mean and standard deviation of all time differences;
[0059] S32: Calculate the maximum delay time of the current cycle according to the mean, the standard deviation and a preset confidence interval.
[0060] Specifically, the step S4 includes:
[0061] S41, inputting all current event times into the linear regression model to obtain the target reference water level line of the current period;
[0062] S42, subtract the maximum delay time from the value of each target reference water level to obtain the target water level of the current cycle.
[0063] For example, all current event times t e Input the linear regression model to obtain the target reference water level line w of the current cycle e , w e =LR(t e ), subtract the maximum delay time from the value of each target reference water level to obtain the target water level w of the current cycle c , where w c =LR(t e )-delay.
[0064] For example, the water level line generation method described in the embodiment of the present invention can be implemented by a programming language, and the main program of the water level line generation process is:
[0065]
[0066]
[0067] In the specific implementation, the watermark adaptively generated by the embodiment of the present invention pre-sets the length of the micro-cluster to 20,000 at 2σ, 2.58σ, and 3σ, and tests the fixed watermark with a maximum tolerable delay of one window period of 1 in a data environment with large disorder, starts the flink job, and then checks the statistical results when the maximum tolerable delay is 1 window time. In addition, compared with the processing results without using the present invention, a job using flink's own watermark generator and a job using the watermark generation method provided by the embodiment of the present invention are started. The statistical results are shown in Table 1, and the results show that the accuracy of the statistics in real-time calculations using the watermark generation method provided by the embodiment of the present invention is greater than the accuracy of the statistical results calculated using the original flink watermark generation method.
[0068] Table 1 Statistical results of the fixed water level and the water level of the embodiment of the present invention at 2σ, 2.58σ, and 3σ delays within one hour
[0069]
[0070] It can be seen from Table 1 that when the disorder is serious, in each cycle within an hour, the water level generation method provided by the embodiment of the present invention has a much smaller delay than the statistical result of the water level output generated by the original fixed time when the delay is 2σ and 2.58σ, such as Figure 2 As shown, Figure 2 is a time curve diagram of output under different delays provided by an embodiment of the present invention. When the delay is 3σ, the delay is greater than the fixed delay waterline by 300s. The corresponding data inversion data volume is as follows: Figure 3 As shown, Figure 3 It is a curve chart of the amount of reversed data output under different delays provided by an embodiment of the present invention. It can be seen that when the confidence interval is relatively small, the delay is small, indicating good real-time performance. When the confidence interval is 3σ, it means that when the interval is close to 100%, when the data disorder is more serious, the delay will exceed the fixed delay water level line. It can be seen that the embodiment of the present invention accurately predicts the trend of the water level line, greatly improves the real-time performance with less accuracy impact, and the corresponding confidence interval can be set according to the trade-offs between real-time performance and accuracy requirements of different operations.
[0071] A water level generation method disclosed in an embodiment of the present invention obtains the event time and system time of all events in several cycles before the current cycle of the system, and generates a linear regression model of the water level of the current cycle according to the event time and system time; wherein the event time and system time correspond one to one; according to the current event time and the current system time of all events in the current cycle, the linear regression model is used to calculate the time difference corresponding to each event in the current cycle; according to all the time differences and a preset confidence interval, the maximum delay time of the current cycle is calculated; according to the current event time and the maximum delay time, the linear regression model is used to generate the target water level of the current cycle. It can generate the target water level line of the current cycle based on the linear regression model and maximum delay time trained according to the event time and system time of all events in the current cycle and previous cycles. It can set the preset confidence interval according to the degree of current data disorder and the accuracy required by the result. When the degree of data disorder is small, a smaller target water level line will be predicted and the real-time performance of the data will be guaranteed. When the degree of data disorder is large, a larger target water level line will be output in real time. This ensures the real-time performance of the data to the greatest extent while meeting the data accuracy, and improves the accuracy of dynamic water level line generation, thereby improving the real-time performance of the system while improving the accuracy of system data processing.
[0072] See also Figure 4 , Figure 4 1 is a schematic diagram of the structure of a water level line generating device 10 provided in an embodiment of the present invention. The water level line generating device 10 includes:
[0073] The regression model generation module 11 is used to obtain the event time and system time of all events in a number of cycles before the current cycle of the system, and generate a linear regression model of the water level of the current cycle according to the event time and system time; wherein the event time and system time correspond to each other one by one;
[0074] A time difference calculation module 12 is used to calculate the time difference corresponding to each event in the current period according to the current event time and the current system time of all events in the current period using the linear regression model;
[0075] The delay time calculation module 13 is used to calculate the maximum delay time of the current cycle according to all time differences and a preset confidence interval;
[0076] The target water level generation module 14 is used to generate the target water level of the current cycle by using the linear regression model according to the current event time and the maximum delay time.
[0077] Specifically, the regression model generation module 11 is used to:
[0078] Obtaining the event time and system time of all events in several cycles before the current cycle of the system, and using the event time and system time as training data;
[0079] The training data is trained using the least squares method to obtain a linear regression model of the water level line of the current period.
[0080] Specifically, the time difference calculation module 12 is used to:
[0081] Get the current event time and current system time of all events in the current period;
[0082] Inputting all current system times into the linear regression model to generate a reference water level line for the current period;
[0083] According to the current event time of each event in the current period, find the value of the reference water level line corresponding to the current event time, subtract the corresponding current event time from the value of the corresponding reference water level line, and obtain the time difference corresponding to each event.
[0084] Specifically, the delay time calculation module 13 is used to:
[0085] Calculate the mean and standard deviation of all time differences;
[0086] The maximum delay time of the current cycle is calculated based on the mean, the standard deviation and a preset confidence interval.
[0087] Specifically, the target water level generating module 14 is used to:
[0088] Inputting all current event times into the linear regression model to obtain the target reference water level line of the current period;
[0089] The maximum delay time is subtracted from the value of each target reference water level to obtain the target water level of the current cycle.
[0090] A water level line generating device 10 provided in an embodiment of the present invention can implement all processes of the water level line generating method of the above embodiment. The functions of each module in the device and the technical effects achieved are respectively the same as the functions and technical effects achieved by the water level line generating method of the above embodiment, and will not be repeated here.
[0091] See also Figure 5 , Figure 5: is a structural schematic diagram of a water level line generating device 20 provided in an embodiment of the present invention. The water level line generating device 20 of this embodiment includes: a processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. When the processor 21 executes the computer program, the steps in the above-mentioned water level line generating method embodiment are implemented. Alternatively, when the processor 21 executes the computer program, the functions of each module in the above-mentioned water level line generating device embodiment are implemented.
[0092] Exemplarily, the computer program may be divided into one or more modules, which are stored in the memory 22 and executed by the processor 21 to implement the present invention. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the water level generating device 20.
[0093] The waterline generating device 20 may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The waterline generating device 20 may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art may understand that the schematic diagram is only an example of the waterline generating device 20 and does not constitute a limitation on the waterline generating device 20. The waterline generating device 20 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the waterline generating device 20 may also include input and output devices, network access devices, buses, etc.
[0094] The processor 21 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 21 is the control center of the water level line generating device 20, and uses various interfaces and lines to connect various parts of the entire water level line generating device 20.
[0095] The memory 22 can be used to store the computer program and / or module. The processor 21 realizes various functions of the water level line generating device 20 by running or executing the computer program and / or module stored in the memory 22 and calling the data stored in the memory 22. The memory 22 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.). In addition, the memory 22 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0096] Wherein, if the module integrated in the water level line generating device 20 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor 21, the steps of the above-mentioned various method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electrical carrier signals and telecommunication signals.
[0097] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0098] An embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the water level generation method as in the above embodiment.
[0099] In addition, an embodiment of the present invention further provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the water level generation method of the above embodiment.
[0100] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A water level line generation method, characterized in that: include: Obtaining the event time and system time of all events in several cycles before the current cycle of the system, and generating a linear regression model of the water level of the current cycle according to the event time and system time; wherein the event time and system time correspond to each other one by one; According to the current event time and the current system time of all events in the current period, the linear regression model is used to calculate the time difference corresponding to each event in the current period; Calculate the maximum delay time of the current cycle based on all time differences and a preset confidence interval; The linear regression model is used to generate the target water level line of the current cycle according to the current event time and the maximum delay time.
2. The water level generating method according to claim 1, characterized in that: The step of obtaining the event time and system time of all events in a number of cycles before the current cycle of the system, and generating a linear regression model of the water level line of the current cycle according to the event time and system time, includes: Obtaining the event time and system time of all events in several cycles before the current cycle of the system, and using the event time and system time as training data; The training data is trained using the least squares method to obtain a linear regression model of the water level line of the current period.
3. The water level generating method according to claim 1, characterized in that: The linear regression model is used to calculate the time difference corresponding to each event in the current period according to the current event time and the current system time of all events in the current period, including: Get the current event time and current system time of all events in the current period; Inputting all current system times into the linear regression model to generate a reference water level line for the current period; According to the current event time of each event in the current period, find the value of the reference water level line corresponding to the current event time, subtract the corresponding current event time from the value of the corresponding reference water level line, and obtain the time difference corresponding to each event.
4. The water level generating method according to claim 1, characterized in that: The step of calculating the maximum delay time of the current cycle according to all time differences and a preset confidence interval includes: Calculate the mean and standard deviation of all time differences; The maximum delay time of the current cycle is calculated based on the mean, the standard deviation and a preset confidence interval.
5. The water level generating method according to claim 1, characterized in that: The step of generating the target waterline of the current cycle by using the linear regression model according to the current event time and the maximum delay time includes: Inputting all current event times into the linear regression model to obtain the target reference water level line of the current period; The maximum delay time is subtracted from the value of each target reference water level to obtain the target water level of the current cycle.
6. A water level line generating device, characterized in that: include: A regression model generation module, used to obtain the event time and system time of all events in a number of cycles before the current cycle of the system, and generate a linear regression model of the water level of the current cycle according to the event time and system time; wherein the event time and system time correspond to each other one by one; A time difference calculation module, used to calculate the time difference corresponding to each event in the current period according to the current event time and the current system time of all events in the current period using the linear regression model; A delay time calculation module, used to calculate the maximum delay time of the current cycle according to all time differences and a preset confidence interval; The target water level generation module is used to generate the target water level of the current cycle using the linear regression model according to the current event time and the maximum delay time.
7. The water level line generating method and device according to claim 6, characterized in that: The regression model generation module is used to: Obtain the event time and system time of all events in several cycles before the current cycle of the system, and use the event time and system time as training data; The training data is trained using the least squares method to obtain a linear regression model of the water level line of the current period.
8. A water level line generating device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the water level line generating method according to any one of claims 1 to 5 when executing the computer program.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the water level generation method according to any one of claims 1 to 5.
10. A computer program product, characterized in that The computer program product is stored in a storage medium, and the program product is executed by at least one processor to implement the steps of the water level generation method according to any one of claims 1 to 6.