A query timeout prediction method and device
By linearly fitting the data volume of the target data table, it predicts the query time in the expected archive time, solving the query time in the system database, achieving improvements in prediction accuracy and efficiency, and avoiding insufficient storage space and querying Timeout error.
Patent Information
- Application Number
- CN202111339471.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-12
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2041-11-12
AI Technical Summary
In the system database, due to the increasing amount of data, the system's storage space is insufficient or the query timeout error is reported. It is difficult for the prior art to accurately predict whether the target data table has a query timeout during the expected archive time.
By obtaining the data amount of the target data table at the expected archive time, performing linear fitting, obtaining the query time fitting curve for the corresponding relationship between the query data amount and the query time, determining the estimated query time based on the fitting curve, and determining whether it exists Query timeout and adjust archive time or optimize storage if necessary.
Accurately predict query timeouts, avoid insufficient system storage space caused by excessive data, or query timeout errors, and improve query efficiency.
Smart Images

Figure CN114116835B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and more specifically, to a query timeout prediction method and device. Background Art
[0002] With the development of information technology, various organizations generally adopt digital office, and relevant data are stored in the system database.
[0003] Since new data may be generated in the system at any time, the amount of data in the system database will continue to increase, which may lead to insufficient system storage space or slow data query, or even insufficient system storage space error or query timeout error. Summary of the invention
[0004] In view of this, the present invention provides a query timeout prediction method and device to accurately determine whether a query timeout occurs in a target data table at the estimated archiving time.
[0005] In order to achieve the above-mentioned invention object, the specific technical solution provided by the present invention is as follows:
[0006] A query timeout prediction method, comprising:
[0007] Get the data volume of the target data table at the estimated archiving time;
[0008] Performing linear fitting on historical data to obtain a query time fitting curve representing the corresponding relationship between the query data volume and the query time;
[0009] Determine, based on the query time fitting curve, an estimated query time corresponding to the data volume of the target data table at the estimated archiving time;
[0010] Based on the estimated query time, it is determined whether there is a query timeout for the target data table at the estimated archiving time.
[0011] Optionally, obtaining the data volume of the target data table when it is archived includes:
[0012] Obtaining the estimated archiving time of the target data table;
[0013] The data volume of the target data table at the expected archiving time is predicted based on historical data.
[0014] Optionally, obtaining the estimated archiving time of the target data table includes:
[0015] Analyze the filing rules of the target data table described in the historical data;
[0016] According to the filing rule of the target data table, the estimated filing time of the target data table is determined.
[0017] Optionally, predicting the data volume of the target data table at the estimated archiving time based on historical data includes:
[0018] Performing linear fitting on the data volume of the target data table in the historical data at different times to obtain a data volume fitting curve representing the corresponding relationship between the data volume and time;
[0019] The data volume of the target data table at the estimated archiving time is predicted based on the data volume fitting curve.
[0020] Optionally, predicting the data volume of the target data table at the estimated archiving time based on historical data includes:
[0021] Get the time characteristics of the estimated archiving time;
[0022] The time characteristics of the expected archiving time are input into a pre-built data volume prediction model for processing to obtain the data volume of the target data table at the expected archiving time. The data volume prediction model is obtained by training and verifying the neural network model in advance using training samples marked with data volume. The training samples are data volume samples of the target data table under different time characteristics.
[0023] Optionally, the method further includes:
[0024] When it is determined that a query timeout occurs in the target data table at the estimated archiving time, the archiving time of the target data table is adjusted so that the adjusted archiving time is before the estimated archiving time.
[0025] Optionally, the method further includes:
[0026] When it is determined that a query timeout occurs in the target data table at the estimated archiving time, the target data table is distributedly stored according to a preset rule, and a query route of the target data table is modified.
[0027] Optionally, after obtaining the data volume of the target data table at the estimated archiving time, the method further includes:
[0028] Determine whether the data volume of the target data table at the estimated archiving time exceeds the maximum data volume;
[0029] If the maximum amount of data is exceeded, it is prompted that the storage space of the target data table is insufficient at the estimated archiving time;
[0030] If the maximum data volume is not exceeded, the linear fitting of the historical data is performed to obtain a query time fitting curve representing the corresponding relationship between the query data volume and the query time.
[0031] A query timeout prediction device, comprising:
[0032] A data volume acquisition unit, used to acquire the data volume of a target data table at an estimated archiving time;
[0033] A linear fitting unit, used to perform linear fitting on historical data to obtain a query time fitting curve representing the corresponding relationship between the query data volume and the query time;
[0034] A query time prediction unit, used to determine the estimated query time corresponding to the data volume of the target data table at the expected archiving time according to the query time fitting curve;
[0035] A query timeout determination unit is used to determine whether a query timeout occurs in the target data table at the estimated archiving time based on the estimated query time.
[0036] Optionally, the data volume acquisition unit includes:
[0037] A filing time acquisition subunit, used to acquire the estimated filing time of the target data table;
[0038] The data volume prediction subunit is used to predict the data volume of the target data table at the expected archiving time based on historical data.
[0039] Optionally, the archiving time acquisition subunit is specifically used to:
[0040] Analyze the filing rules of the target data table described in the historical data;
[0041] According to the filing rule of the target data table, the estimated filing time of the target data table is determined.
[0042] Optionally, the data volume prediction subunit is specifically used to:
[0043] Performing linear fitting on the data volume of the target data table in the historical data at different times to obtain a data volume fitting curve representing the corresponding relationship between the data volume and time;
[0044] The data volume of the target data table at the estimated archiving time is predicted based on the data volume fitting curve.
[0045] Optionally, the data volume prediction subunit is specifically used to:
[0046] Get the time characteristics of the estimated archiving time;
[0047] The time characteristics of the expected archiving time are input into a pre-built data volume prediction model for processing to obtain the data volume of the target data table at the expected archiving time. The data volume prediction model is obtained by training and verifying the neural network model in advance using training samples marked with data volume. The training samples are data volume samples of the target data table under different time characteristics.
[0048] Optionally, the device further comprises:
[0049] The filing time adjustment unit is used to adjust the filing time of the target data table when it is determined that a query timeout occurs at the estimated filing time, so that the adjusted filing time is before the estimated filing time.
[0050] Optionally, the device further comprises:
[0051] The storage optimization unit is used to distribute the target data table and modify the query route of the target data table according to preset rules when it is determined that the query timeout exists in the target data table at the expected archiving time.
[0052] Optionally, the device further comprises:
[0053] The storage space judgment unit is used to judge whether the data volume of the target data table at the expected archiving time exceeds the maximum data volume; if it exceeds the maximum data volume, it prompts that the storage space of the target data table at the expected archiving time is insufficient; if it does not exceed the maximum data volume, the linear fitting unit is triggered.
[0054] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0055] The present invention discloses a query timeout prediction method, which obtains a query time fitting curve representing the corresponding relationship between the query data volume and the query time by performing linear fitting on historical data. The estimated query time corresponding to the data volume of a target data table at the estimated archiving time can be accurately determined based on the fitting curve, so as to determine whether there is a query timeout for the target data table at the estimated archiving time based on the estimated query time. This facilitates adjusting the archiving time or optimizing the storage of the target data table as soon as possible when it is determined that there is a query timeout for the target data table at the estimated archiving time, thereby avoiding an error message of insufficient system storage space or a query timeout error message caused by an excessively large data volume of the target data table, thereby improving query efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0057] Figure 1 A flowchart of a query timeout prediction method disclosed in an embodiment of the present invention;
[0058] Figure 2 A schematic diagram of a flow chart of another query timeout prediction method disclosed in an embodiment of the present invention;
[0059] Figure 3 A schematic diagram of a flow chart of another query timeout prediction method disclosed in an embodiment of the present invention;
[0060] Figure 4 A schematic diagram of the structure of a query timeout prediction device is disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0061] 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.
[0062] The inventor has found through research that in some systems, such as banking systems, there is a type of data table whose data volume will continue to increase. However, since the data is relatively important and needs to be queried regularly or irregularly, the data cannot be archived frequently. The data needs to be archived as late as possible, but the query timeout or insufficient storage space cannot be caused due to the large amount of data. Therefore, it is necessary to accurately predict whether the data table will have a query timeout at the expected archiving time.
[0063] On this basis, the present invention provides a query timeout prediction method and device, which accurately predict whether there will be a query timeout for the data table at the expected archiving time, and then facilitate adjusting the archiving time or optimizing the storage of the target data table as soon as possible when it is determined that there will be a query timeout for the target data table at the expected archiving time, thereby avoiding errors such as insufficient system storage space or query timeout errors caused by excessive data volume in the target data table, thereby improving query efficiency.
[0064] For details, please refer to Figure 1 This embodiment discloses a query timeout prediction method, comprising the following steps:
[0065] S101: Obtaining the data volume of the target data table at the estimated archiving time;
[0066] The target data table is a centralized storage, specifically a relatively important data table that needs to be queried regularly or irregularly and cannot be archived frequently.
[0067] The estimated archiving time can be estimated manually or predicted based on historical data.
[0068] To obtain the data volume of the target data table at the estimated archiving time, it is first necessary to obtain the estimated archiving time of the target data table, and then predict the data volume of the target data table at the estimated archiving time based on historical data.
[0069] There are many ways to obtain the expected filing time of the target data table, such as obtaining the expected filing time of the target data table input manually. The expected filing time is estimated by experts based on experience, or it can be predicted by a computer based on historical data.
[0070] There are also many ways to predict the estimated archiving time of the target data table based on historical data. The following example illustrates this:
[0071] Analyze the archiving rules of the target data table in the historical data, such as analyzing the archiving time of different data tables in the historical data, and predict the archiving rules of the target data table with the help of a machine learning model. The machine learning model is trained through historical data, and the historical data is the historical archiving time of different data tables collected in advance. After determining the archiving rules of the target data table, determine the estimated archiving time of the target data table according to the archiving rules of the target data table.
[0072] After determining the expected archiving time of the target data table, the data volume of the target data table at the expected archiving time is predicted based on historical data. There are many ways to achieve this. The following two examples illustrate this:
[0073] Example 1
[0074] First, this embodiment assumes that the data volume of the target data table is mainly related to time. On this basis, linear fitting is performed on the data volume of the target data table at different times in the historical data to obtain a data volume fitting curve representing the corresponding relationship between the data volume and time.
[0075] Then, based on the data volume fitting curve, the data volume of the target data table at the expected archiving time can be predicted.
[0076] Example 2
[0077] First, the time feature of the estimated archiving time is obtained. The time feature is related to the data volume growth feature of the target data table. The time feature of the estimated archiving time can be pre-set according to the data volume growth feature of the target data table. For example, if the data volume of the target data table grows faster on each working day than on non-working days, the time feature of the estimated archiving time should include whether it is a working day. If the data volume of the target data table grows faster on holidays or e-commerce shopping festivals, the time feature of the estimated archiving time should include whether it is a holiday or e-commerce shopping festival. It should be noted that the above time features are only examples, and the present invention is not limited thereto.
[0078] The time characteristics of the expected archiving time are input into the pre-built data volume prediction model for processing to obtain the data volume of the target data table at the expected archiving time. The data volume prediction model is obtained by training and verifying the neural network model in advance using training samples marked with data volume. The training samples are data volume samples of the target data table under different time characteristics.
[0079] It should be noted that the above two examples are merely optional implementation methods for predicting the data volume of the target data table at the estimated archiving time based on historical data, and the present invention is not limited thereto.
[0080] S102: performing linear fitting on historical data to obtain a query time fitting curve representing a corresponding relationship between the query data volume and the query time;
[0081] Specifically, this embodiment, assuming that the hardware and system resources are stable, and based on the assumption that the main influencing factor of query time is the query data volume, performs linear fitting on the query times corresponding to different query data volumes in historical data to obtain a query time fitting curve that represents the corresponding relationship between the query data volume and the query time.
[0082] S103: determining an estimated query time corresponding to the amount of data in the target data table at the estimated archiving time according to the query time fitting curve;
[0083] According to the correspondence between the query data volume and query time of the target data table in the query time fitting curve, the estimated query time corresponding to the data volume of the target data table at the expected archiving time is determined. It can be understood that the query time is estimated.
[0084] S104: Determine whether there is a query timeout in the target data table at the estimated archiving time based on the estimated query time.
[0085] Specifically, by comparing the estimated query time with the maximum query time pre-set by the system, when the estimated query time is greater than the maximum query time pre-set by the system, it is determined that there is a query timeout for the target data table at the expected archiving time; otherwise, it is determined that there is no query timeout for the target data table at the expected archiving time.
[0086] It should be noted that if there is no query timeout for the target data table at the estimated archiving time, the target data table can be archived according to the estimated archiving time.
[0087] It can be seen that the query timeout prediction method disclosed in this embodiment obtains a query time fitting curve representing the corresponding relationship between the query data volume and the query time by performing linear fitting on historical data. According to the fitting curve, the estimated query time corresponding to the data volume of the target data table at the expected archiving time can be accurately determined, thereby accurately determining whether there is a query timeout for the target data table at the expected archiving time based on the estimated query time.
[0088] Furthermore, when it is determined that a query timeout has occurred in the target data table at the expected archiving time, the archiving time can be adjusted as early as possible or the storage of the target data table can be optimized to avoid errors due to insufficient system storage space or query timeout caused by excessive data volume in the target data table, thereby improving query efficiency.
[0089] See also Figure 2 The embodiment of the present invention discloses a query timeout prediction method, which specifically includes the following steps:
[0090] S201: Obtaining the data volume of the target data table at the estimated archiving time;
[0091] S202: performing linear fitting on historical data to obtain a query time fitting curve representing a corresponding relationship between the query data volume and the query time;
[0092] S203: determining an estimated query time corresponding to the amount of data in the target data table at the estimated archiving time according to the query time fitting curve;
[0093] S204: determining whether there is a query timeout in the target data table at the estimated archiving time based on the estimated query time;
[0094] S205: When it is determined that a query timeout occurs in the target data table at the estimated archiving time, the archiving time of the target data table is adjusted so that the adjusted archiving time is before the estimated archiving time.
[0095] The specific implementation of S201 to S204 may be referred to S101 to S104 in the above embodiment, which will not be described in detail here.
[0096] Specifically, the filing time of the target data table may be adjusted according to a preset step length so that the adjusted filing time is before the expected filing time.
[0097] After adjusting the archiving time of the target data table, obtain the data volume of the target data table at the adjusted estimated archiving time, and then determine the adjusted estimated query time corresponding to the data volume of the target data table at the adjusted estimated archiving time based on the query time fitting curve, and then determine whether there is a query timeout for the target data table at the adjusted estimated archiving time based on the adjusted estimated query time. If there is no timeout, archive the target data table according to the adjusted estimated archiving time. If there is still a timeout, continue to adjust the archiving time of the target data table according to the preset step size until there is no query timeout for the target data table at the adjusted estimated archiving time.
[0098] See also Figure 3 The embodiment of the present invention discloses a query timeout prediction method, which specifically includes the following steps:
[0099] S301: Obtain the data volume of the target data table at the estimated archiving time;
[0100] S302: Performing linear fitting on historical data to obtain a query time fitting curve representing the corresponding relationship between the query data volume and the query time;
[0101] S303: Determine the estimated query time corresponding to the data volume of the target data table at the estimated archiving time according to the query time fitting curve;
[0102] S304: determining whether there is a query timeout in the target data table at the estimated archiving time based on the estimated query time;
[0103] S305: When it is determined that a query timeout occurs in the target data table during the estimated archiving time, the target data table is distributedly stored according to a preset rule, and a query route of the target data table is modified.
[0104] The specific implementation of S301 to S304 may be referred to S101 to S104 in the above embodiment, which will not be described in detail here.
[0105] The preset rules for distributed storage of the target data table are set by an expert system, or can be set manually by an expert.
[0106] Specifically, other distributed storage spaces in the intranet may be queried, and the target data table may be distributedly stored in these storage spaces to ensure that the target data table has sufficient storage space.
[0107] It should be noted that since the storage method of the target data table has changed, the query route of the target data table needs to be modified according to the distributed storage method of the target data table, so that the modification of the storage method of the target data table is imperceptible to the user, and the user can access the target data table normally according to the modified query route.
[0108] Furthermore, the data volume of the target data table at the estimated archiving time may exceed the maximum data volume, resulting in insufficient storage space for the target data table.
[0109] On this basis, after obtaining the data volume of the target data table at the expected archiving time, this embodiment determines whether the data volume of the target data table at the expected archiving time exceeds the maximum data volume. If it exceeds the maximum data volume, it indicates that the storage space of the target data table at the expected archiving time is insufficient. If it does not exceed the maximum data volume, a linear fitting of the historical data is performed to obtain a query time fitting curve representing the corresponding relationship between the query data volume and the query time.
[0110] When it is prompted that the storage space of the target data table is insufficient at the expected archiving time, the archiving time of the target data table can be adjusted so that the adjusted archiving time is before the expected archiving time. The target data table can also be distributed stored according to preset rules and the query routing of the target data table can be modified to solve the problem of insufficient storage space of the target data table at the expected archiving time.
[0111] Based on the query timeout prediction method disclosed in the above embodiment, this embodiment correspondingly discloses a query timeout prediction device. Figure 4 , the device comprises:
[0112] A data volume acquisition unit 401 is used to acquire the data volume of the target data table at the estimated archiving time;
[0113] A linear fitting unit 402, used to perform linear fitting on the historical data to obtain a query time fitting curve representing the corresponding relationship between the query data volume and the query time;
[0114] A query time prediction unit 403, configured to determine an estimated query time corresponding to the amount of data in the target data table at the estimated archiving time according to the query time fitting curve;
[0115] The query timeout determination unit 404 is used to determine whether there is a query timeout for the target data table at the estimated archiving time based on the estimated query time.
[0116] Optionally, the data volume acquisition unit 401 includes:
[0117] A filing time acquisition subunit, used to acquire the estimated filing time of the target data table;
[0118] The data volume prediction subunit is used to predict the data volume of the target data table at the expected archiving time based on historical data.
[0119] Optionally, the archiving time acquisition subunit is specifically used to:
[0120] Analyze the filing rules of the target data table described in the historical data;
[0121] According to the filing rule of the target data table, the estimated filing time of the target data table is determined.
[0122] Optionally, the data volume prediction subunit is specifically used to:
[0123] Performing linear fitting on the data volume of the target data table in the historical data at different times to obtain a data volume fitting curve representing the corresponding relationship between the data volume and time;
[0124] The data volume of the target data table at the estimated archiving time is predicted based on the data volume fitting curve.
[0125] Optionally, the data volume prediction subunit is specifically used to:
[0126] Get the time characteristics of the estimated archiving time;
[0127] The time characteristics of the expected archiving time are input into a pre-built data volume prediction model for processing to obtain the data volume of the target data table at the expected archiving time. The data volume prediction model is obtained by training and verifying the neural network model in advance using training samples marked with data volume. The training samples are data volume samples of the target data table under different time characteristics.
[0128] Optionally, the device further comprises:
[0129] The filing time adjustment unit is used to adjust the filing time of the target data table when it is determined that a query timeout occurs at the estimated filing time, so that the adjusted filing time is before the estimated filing time.
[0130] Optionally, the device further comprises:
[0131] The storage optimization unit is used to distribute the target data table and modify the query route of the target data table according to preset rules when it is determined that the query timeout exists in the target data table at the expected archiving time.
[0132] Optionally, the device further comprises:
[0133] The storage space judgment unit is used to judge whether the data volume of the target data table at the expected archiving time exceeds the maximum data volume; if it exceeds the maximum data volume, it prompts that the storage space of the target data table at the expected archiving time is insufficient; if it does not exceed the maximum data volume, the linear fitting unit is triggered.
[0134] The present embodiment discloses a query timeout prediction device, which obtains a query time fitting curve representing the corresponding relationship between the query data volume and the query time by performing linear fitting on historical data. The estimated query time corresponding to the data volume of the target data table at the estimated archiving time can be accurately determined based on the fitting curve, thereby determining whether there is a query timeout for the target data table at the estimated archiving time based on the estimated query time. This facilitates adjusting the archiving time or optimizing the storage of the target data table as soon as possible when it is determined that there is a query timeout for the target data table at the estimated archiving time, thereby avoiding errors such as insufficient system storage space or query timeout caused by excessive data volume in the target data table, thereby improving query efficiency.
[0135] It should be noted that the query timeout prediction method and device provided by the present invention can be applied to the distributed field or the financial field. The above is only an example and does not limit the application field of the query timeout prediction method and device provided by the present invention.
[0136] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0137] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0138] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0139] The above-mentioned embodiments may be combined arbitrarily. For the above description of the disclosed embodiments, the features recorded in the embodiments in this specification may be replaced or combined with each other, so that professional and technical personnel in this field can implement or use the present application.
[0140] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A query timeout prediction method, characterized in that: include: Get the data volume of the target data table at the estimated archiving time; Performing linear fitting on historical data to obtain a query time fitting curve representing the corresponding relationship between the query data volume and the query time; Determine, based on the query time fitting curve, an estimated query time corresponding to the data volume of the target data table at the estimated archiving time; Determining whether a query timeout has occurred in the target data table at the estimated archiving time based on the estimated query time; The step of obtaining the data volume of the target data table at the estimated archiving time includes: Analyze the filing rules of the target data table described in the historical data; Determining an estimated archiving time of the target data table according to the archiving rule of the target data table; Predicting the amount of data in the target data table at the expected archiving time based on historical data; The predicting the data volume of the target data table at the estimated archiving time according to the historical data includes: Performing linear fitting on the data volume of the target data table in the historical data at different times to obtain a data volume fitting curve representing the corresponding relationship between the data volume and time; Predicting the data volume of the target data table at the estimated archiving time according to the data volume fitting curve; Alternatively, predicting the data volume of the target data table at the estimated archiving time based on historical data includes: Get the time characteristics of the estimated archiving time; The time characteristics of the expected archiving time are input into a pre-built data volume prediction model for processing to obtain the data volume of the target data table at the expected archiving time. The data volume prediction model is obtained by training and verifying the neural network model in advance using training samples marked with data volume. The training samples are data volume samples of the target data table under different time characteristics.
2. The method according to claim 1, characterized in that The method further comprises: When it is determined that a query timeout occurs in the target data table at the estimated archiving time, the archiving time of the target data table is adjusted so that the adjusted archiving time is before the estimated archiving time.
3. The method according to claim 1, characterized in that The method further comprises: When it is determined that a query timeout occurs in the target data table at the estimated archiving time, the target data table is distributedly stored according to a preset rule, and a query route of the target data table is modified.
4. The method according to claim 1, characterized in that After obtaining the data volume of the target data table at the estimated archiving time, the method further includes: Determine whether the data volume of the target data table at the estimated archiving time exceeds the maximum data volume; If the maximum amount of data is exceeded, it is prompted that the storage space of the target data table is insufficient at the estimated archiving time; If the maximum data volume is not exceeded, the linear fitting of the historical data is performed to obtain a query time fitting curve representing the corresponding relationship between the query data volume and the query time.
5. A query timeout prediction device, characterized in that: include: A data volume acquisition unit, used to acquire the data volume of a target data table at an estimated archiving time; A linear fitting unit, used to perform linear fitting on historical data to obtain a query time fitting curve representing the corresponding relationship between the query data volume and the query time; A query time prediction unit, used to determine the estimated query time corresponding to the data volume of the target data table at the expected archiving time according to the query time fitting curve; A query timeout determination unit, configured to determine whether a query timeout has occurred in the target data table at an estimated archiving time based on the estimated query time; Wherein, the data volume acquisition unit includes: The filing time acquisition subunit is used to analyze the filing rule of the target data table in the historical data; and determine the estimated filing time of the target data table according to the filing rule of the target data table; A data volume prediction subunit, used to predict the data volume of the target data table at the expected archiving time based on historical data; The data volume prediction subunit is specifically used for: Performing linear fitting on the data volume of the target data table in the historical data at different times to obtain a data volume fitting curve representing the corresponding relationship between the data volume and time; Predicting the data volume of the target data table at the estimated archiving time according to the data volume fitting curve; Alternatively, the data volume prediction subunit is specifically used for: Get the time characteristics of the estimated archiving time; The time characteristics of the expected archiving time are input into a pre-built data volume prediction model for processing to obtain the data volume of the target data table at the expected archiving time. The data volume prediction model is obtained by training and verifying the neural network model in advance using training samples marked with data volume. The training samples are data volume samples of the target data table under different time characteristics.
Citation Information
Patent Citations
Data query method, system and device and electronic equipment
CN110096489A
Data monitoring method, system, device and computer program product
CN113360357A