A method, device, equipment and medium for determining an index value of a time series index
Through clustering and shared window technology, it solves the problems of low calculation efficiency and waste of resources in determining index values in the existing technology, and achieves efficient index value calculation and resource saving. It is suitable for scenarios with multiple indicators and multiple data types, and can be used in scenarios with multiple indicators and multiple data types. Maintain data accuracy despite network delays.
Patent Information
- Application Number
- CN202410658515.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-05-27
AI Technical Summary
The calculation efficiency of the index value determination method in the existing technology is low and the resource waste is serious. Especially when the data type and quantity are large, the traditional time window method leads to excessive resource occupation.
By extracting indicator features, clustering the same indicators and constructing shared windows, and using shared window collections to determine indicator values, efficient calculation of indicator values and resource saving are achieved.
It improves computing efficiency, saves resources, supports the determination of indicator values for multiple indicators and multiple data types, meets complex business needs, and maintains data accuracy when network delays exist.
Smart Images

Figure CN118229158B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of safety monitoring, and in particular to a method, device, equipment and medium for determining an indicator value of a time series indicator. Background Art
[0002] With the improvement of security awareness and the development of computers, the indicator value determination method of security monitoring indicators has been applied in many fields, such as fraud detection, risk prevention and control, network security, monitoring and alarm, etc. By calculating the indicators in various fields to determine the indicator values, problems can be discovered in time according to the indicator values to ensure property safety, information security and equipment safety.
[0003] Existing indicators usually involve time series indicators with time sequence and time range restrictions of data. Therefore, the method of determining indicator values usually needs to rely on time windows. When the data types and quantities of indicators are too large, the traditional indicator calculation method determines the indicator value, such as creating a corresponding time window for each indicator, and using the corresponding time window to calculate the corresponding indicator to determine the indicator value of the indicator. This method will lead to low calculation efficiency and waste of resources.
[0004] Therefore, the problems of low computational efficiency and waste of resources in the current index value determination methods are issues that need to be urgently addressed. Summary of the invention
[0005] In view of this, an object of the present invention is to provide a method, device, equipment and medium for determining an indicator value of a timing indicator, which solves the problems of low computational efficiency and waste of resources in indicator value determination in the prior art.
[0006] In order to solve the above technical problems, the present invention provides a method for determining an indicator value of a time series indicator, comprising:
[0007] Extract the indicator characteristics of each indicator in the indicator set to obtain the indicator information of each indicator; the indicator characteristics are data types, filtering conditions and window types; the indicators in the indicator set are security monitoring indicators with time sequence requirements;
[0008] Clustering the indicators with the same indicator information into a cluster to obtain individual clusters, and constructing corresponding shared windows for each of the clusters to obtain a shared window set;
[0009] When a processing instruction is received, the indicator characteristics of the indicator to be processed are extracted to obtain the indicator information to be processed; the indicator to be processed is one or more indicators in the indicator set;
[0010] Selecting a corresponding shared window from the shared window set according to the to-be-processed indicator information as a first target shared window;
[0011] Searching for data of the to-be-processed indicator within a preset time period from the data set of the first target shared window; the preset time period is a time period specified in the to-be-processed indicator;
[0012] The indicator value of the indicator to be processed is determined based on the data within the preset time period.
[0013] Optionally, constructing a corresponding shared window for each of the clusters respectively includes:
[0014] A corresponding shared precision window is constructed for each cluster; the shared precision window consists of a data type, a filtering condition, a precision window type, a window length, a data set and an indicator set; the precision window type is a precision time window or a precision counting window; the data set is an ordered data set sorted according to the timestamp of the data; the window length is the maximum value of the time length in the cluster; the indicator information of all indicators in the indicator set is the same.
[0015] Optionally, the data set includes:
[0016] Acquire new time series data in real time, take the window that successfully matches the data type and filtering conditions of the shared precision window with the new time series data as the second target shared window, and put the new time series data into the data set of the second target shared window in sequence according to the time when the data was generated.
[0017] Optionally, also include:
[0018] Determine in real time whether the time difference between the first data and the last data in the data set of each shared precise window exceeds the window length of each shared precise window;
[0019] If it exceeds, the redundant data is deleted so that the time difference between the first data and the last data in the data set of each shared precise window does not exceed the window length of each shared precise window.
[0020] Optionally, the indicators in the indicator set are relevant indicators in the field of fraud detection, or relevant indicators in the field of risk prevention and control, or relevant indicators in the field of network security, or relevant indicators in the field of monitoring and alarm.
[0021] Optionally, also include:
[0022] When a new indicator is added to the indicator set, the indicator feature of the new indicator is extracted as new indicator information;
[0023] The cluster in which the indicator information of each indicator is the same as the new indicator information is located is used as the first target cluster, the shared window corresponding to the first target cluster is used as the third target shared window, and the new indicator is added to the first target cluster so that the new indicator can share the third target shared window;
[0024] If the new indicator information is different from the indicator information of each indicator, the new indicator automatically becomes a new cluster, a new shared window is created for the new cluster, and the new shared window is added to the shared window set;
[0025] When an indicator is deleted from the indicator set, the cluster where the deleted indicator is located is determined according to the indicator information of the deleted indicator and used as the second target cluster, and the shared window corresponding to the second target cluster is used as the fourth target shared window;
[0026] If there is only the deletion indicator in the second target cluster, deleting the fourth target shared window from the shared window set;
[0027] If the second target cluster includes more than the deletion indicator, determining the window length of the deletion indicator and the window length of the fourth target shared window;
[0028] If the window length of the deletion indicator is equal to the window length of the fourth target shared window, the window length of the fourth target shared window is adjusted to the second largest value of the time length in the second target cluster, and the data set in the fourth target shared window is adjusted accordingly;
[0029] If the window length of the deletion indicator is smaller than the window length of the fourth target shared window, the window length of the fourth target shared window remains unchanged.
[0030] Optionally, after taking the clustering cluster where the indicator information identical to the new indicator information in the indicator information of each indicator is located as the first target cluster, taking the shared window corresponding to the first target cluster as the third target shared window, and adding the new indicator to the first target cluster, the method further includes:
[0031] Obtaining the window length of the third target shared window and the time length of the new indicator;
[0032] When the time length of the new indicator exceeds the window length of the third target sharing window, the window length of the third target sharing window is adjusted to the time length of the new indicator, and the data in the data set in the third target sharing window is adjusted accordingly;
[0033] Otherwise, the window length of the third target shared window remains unchanged.
[0034] The present invention also provides a device for determining an indicator value of a time series indicator, comprising:
[0035] The first feature extraction module is used to extract the indicator features of each indicator in the indicator set to obtain the indicator information of each indicator; the indicator features are data types, filtering conditions and window types; the indicators in the indicator set are security monitoring indicators with time sequence requirements;
[0036] A window construction module, used for clustering the indicators with the same indicator information into a cluster to obtain each cluster, and constructing a corresponding shared window for each cluster to obtain a shared window set;
[0037] A second feature extraction module is used to extract the indicator features of the indicator to be processed and obtain the indicator information to be processed when receiving the processing instruction; the indicator to be processed is one or more indicators in the indicator set;
[0038] A target window selection module, configured to select a corresponding shared window from the shared window set according to the to-be-processed indicator information as a first target shared window;
[0039] A search module, used to search the data of the to-be-processed indicator within a preset time period from the data set of the first target shared window; the preset time period is a time period specified in the to-be-processed indicator;
[0040] The indicator value determination module is used to determine the indicator value of the indicator to be processed based on the data within the preset time period.
[0041] The present invention also provides an indicator value determination device for a timing indicator, comprising:
[0042] Memory for storing computer programs;
[0043] A processor is used to implement the steps of the method for determining the indicator value of the timing indicator when executing the computer program.
[0044] The present invention also provides a medium, in which computer executable instructions are stored. When the computer executable instructions are loaded and executed by a processor, the steps of the method for determining the indicator value of the timing indicator are implemented.
[0045] It can be seen that the present invention is based on the indicator characteristics of different indicators with timing requirements, and constructs a shared window according to the principle of completely identical data types, filtering conditions, and window types. All indicators in the same cluster can use the shared window corresponding to the cluster to determine the indicator value. Compared with the traditional one-to-one window determination of indicator values, the calculation efficiency is improved, and a large amount of memory space is not required, saving resources; and this method can also support the determination of indicator values for many indicators and many data types to meet complex business needs; precise window reuse of different indicators can save resources and improve calculation efficiency. This technical innovation is based on innovative research on real-time intelligent technology systems to achieve technical improvements in the determination of indicator values for timing indicators.
[0046] In addition, the present invention also provides an apparatus, device and medium for determining an indicator value of a timing indicator, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] 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.
[0048] Figure 1 A flowchart of a method for determining an indicator value of a timing indicator provided by an embodiment of the present invention;
[0049] Figure 2 An example diagram of a window sharing condition determination provided by an embodiment of the present invention;
[0050] Figure 3 An example diagram of a shared window set updating method provided by an embodiment of the present invention;
[0051] Figure 4 A schematic diagram of the structure of a device for determining an indicator value of a timing indicator provided by an embodiment of the present invention;
[0052] Figure 5 A schematic diagram of the structure of a device for determining an indicator value of a timing indicator provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.
[0054] Please refer to Figure 1 , Figure 1 A flowchart of a method for determining an indicator value of a timing indicator provided by an embodiment of the present invention. The method may include:
[0055] S101: extracting the indicator characteristics of each indicator in the indicator set to obtain the indicator information of each indicator; the indicator characteristics are data type, filter condition and window type; the indicators in the indicator set are security monitoring indicators with time sequence requirements.
[0056] The indicators in the indicator set in this embodiment are various security monitoring indicators with timing requirements set by the user according to actual conditions or expert experience, so as to monitor the security status by using the indicators; that is, the determination of the indicator values in the indicator set is associated with the timing data. Timing indicators refer to indicators with timing requirements. Specifically, the security monitoring indicators in the indicator set can be relevant indicators in the field of fraud detection, or relevant indicators in the field of risk prevention and control, or relevant indicators in the field of network security, or relevant indicators in the field of monitoring and alarm. Of course, in actual applications, there may be more than security monitoring indicators in the above-mentioned fields. In general, there are a large number of indicators in the indicator set, and there are hundreds or thousands of indicators. In order to better understand the security monitoring indicators with timing requirements, examples are as follows:
[0057] Based on the transaction data, we set the indicator of the number of consecutive decreases in the amount of failed transactions with the same card number in the past 5 minutes. Based on this indicator, we can get the following:
[0058] 1. Data type (data): transaction data;
[0059] 2. Filter condition: failed transactions;
[0060] 3. Time length / time limit (ATW, accurate time window): 5 minutes;
[0061] 4. Primary key: card number;
[0062] 5. Calculation method (function): Continuous decreasing number;
[0063] Therefore, the abstract description of this indicator is Index(data, filter, ATW, key, function). The data set that determines the value of this indicator is the transaction data of failed transactions with time series in the past 5 minutes. The data in this data set needs to be sorted by time and has time series, which means that this indicator is an indicator with time series requirements.
[0064] This embodiment extracts features from indicators to obtain feature values of each feature, and finds the commonality of each feature based on the feature values. The extracted indicator features in this embodiment can be data types, filter conditions, and window types. Based on these three indicator features, each feature is clustered. Of course, other indicator features can also be used for feature extraction. Preferably, this embodiment uses data types, filter conditions, and window types, and the clustering effect and efficiency are better.
[0065] S102: Clustering indicators with the same indicator information into a cluster to obtain individual clusters, and constructing corresponding shared windows for each cluster to obtain a shared window set.
[0066] When constructing a shared window, as long as the data type, filter condition and window type of the indicator are consistent, a shared window can be created for this type of indicator. In this way, for indicators with the same data type, filter condition and window type, a shared precision window is used to determine the indicator value, thus saving resources. Figure 2 As shown in the figure, there are index 1 (Index1) and index 2 (Index2) in the index set. If the data type, filter condition, and window type of index1 and Index2 are the same, then Index1 and Index2 can share a shared window, and the window length of the shared window is the maximum value of the time length of the two indicators. If there is a difference in the data type, filter condition, and window type of Index1 and Index2, then Index1 and Index2 cannot share a window.
[0067] To better understand step S102, refer to the following example:
[0068] The following indicators exist in the indicator set:
[0069] Index3(data1, filter1, AWT1, key1, function);
[0070] Index4(data1, filter1, AWT1, key, function);
[0071] Index5(data2, filter1, AWT1, key, function);
[0072] Index6(data1, filter2, AWT1, key, function);
[0073] Index7(data1, filter1, AWT2, key, function);
[0074] Index8(data2, filter1, AWT1, key1, function).
[0075] Index3 and Index4 have the same data type, filter condition and window type, so they can share a precise window. Index5 and Index8 have the same data type, filter condition and window type, so they can share a precise window. Shared windows are created separately for Index6 and Index7.
[0076] Furthermore, in order to improve the accuracy of the index value calculation, considering the impact of network delay on data storage, the above-mentioned construction of the corresponding shared window for each cluster cluster may include the following steps:
[0077] A corresponding shared precise window SAWT (data, filter, type, length, data-set, indexes) is constructed for each cluster respectively; data, filter, type, length, data-set and indexes respectively represent the data type, filter condition, precise window type, window length, data set and indicator set of the shared precise window; the precise window type is a precise time window or a precise counting window; the data set is an ordered data set sorted according to the timestamp of the data; the window length is the maximum value of the time length of all indicators in the cluster; the indicator information of all indicators in the indicator set is the same.
[0078] This embodiment takes into account that network delay may affect data storage, resulting in that the first generated data may be stored later in the data set, resulting in inaccurate data when obtaining data from the data set, and further resulting in inaccurate calculation of the index value. Therefore, this embodiment creates a shared precise window (SAWT), which consists of a data type (data), a filter condition (filter), a window type (type: precise time window or precise counting window), a window length (length), a data set (data-set, which is an ordered set sorted according to the timestamp of the data), and an index set (indexes) sharing the window, so the description of a precise window is abstracted into SAWT (data, filter, type, length, data-set, indexes). Among them, the data set of the shared precise window is an ordered set sorted according to the timestamp of the data. Even if the network delay causes the data to arrive out of order, the data in the data set is stored according to the time when the data was generated, which solves the problem of inaccurate data.
[0079] Furthermore, in order to ensure the accuracy of the data in the data set, the generation of the above data set may include the following steps:
[0080] Acquire new time series data in real time, take the window that successfully matches the data type and filtering conditions of the shared precision window as the second target shared window, and put the new time series data into the data set of the second target shared window in sequence according to the time when the data was generated.
[0081] After the shared window is created, it is necessary to monitor the data generation. When new data is detected, the newly generated time series data needs to be added to the data set of the corresponding shared precise window. Specifically, when new time series data arrives, the shared windows are matched one by one. When the new time series data successfully matches the data type and filter conditions of the shared window, the new time series data is placed in the data set data-set of the shared precise window in chronological order.
[0082] Furthermore, in order to ensure the orderliness of data storage in the data set and the accuracy of subsequent calculations, the following steps may also be included:
[0083] It is determined in real time whether the time difference between the first data and the last data in the data set of each shared precise window exceeds the window length of each shared precise window; if it exceeds, the redundant data is deleted so that the time difference between the first data and the last data in the data set of each shared precise window does not exceed the window length of each shared precise window.
[0084] In this embodiment, new time series data is continuously stored in the data set of the shared precise window, and at the same time, it is determined whether the time difference between the first data and the last data in the data set data-set exceeds the window length length. If it exceeds, it is necessary to delete the redundant data with a smaller time span to ensure that the time span of the data in the data set data-set does not exceed the window length length. In this way, even if the data arrives out of order, it can be stored in order in the data set data-set, and there is no need to store too much historical data.
[0085] S103: When a processing instruction is received, extract the indicator characteristics of the indicator to be processed to obtain the indicator information to be processed; the indicator to be processed is one or more indicators in the indicator set.
[0086] Step S101 and step S102 are both to create a corresponding shared window for the indicator in the indicator set. After the creation is completed, when a processing instruction is received, the indicator information is determined according to the obtained indicator to be processed. It can be understood that the indicator to be processed is one or more indicators in the indicator set, and the three characteristics of the data type, filter condition and window type of the indicator to be processed are also extracted to obtain the indicator information of the indicator to be processed.
[0087] S104: Selecting a corresponding shared window from the shared window set according to the to-be-processed indicator information as a first target shared window.
[0088] The to-be-processed indicator information extracted in step S103 is matched with the indicator information corresponding to each shared window in the shared window set, so as to determine the shared window corresponding to the to-be-processed indicator information.
[0089] S105: searching for data of the to-be-processed indicator within a preset time period from the data set of the first target shared window; the preset time period is a time period specified in the to-be-processed indicator.
[0090] The preset time period in this embodiment is the time period specified in the indicator to be processed, for example, 5 minutes in the indicator of the consecutive decreasing number of failed transaction amounts with the same card number in the past 5 minutes, that is, the time length / time limit (ATW). The data set in the shared window stores the failed transaction data of this data type in the past 5 minutes generated in real time.
[0091] S106: Determine the indicator value of the indicator to be processed based on the data within a preset time period.
[0092] This embodiment uses a shared window to obtain data within a specified time period in the indicator to be processed from the data set of the window, and the indicator value of the indicator can be calculated based on the data. When there are many indicators to be processed, they can be matched with the shared windows in the shared window data set at the same time, and the shared windows obtained by matching can be used to obtain the required data from the data set of the corresponding shared windows based on the time period of each indicator itself, and the indicator value of each indicator to be processed can be calculated based on the obtained data and the calculation method in the indicator to be processed.
[0093] From the introduction of the above detailed steps, it can be seen that step S101 and step S102 create a shared window set for the indicators in the indicator set, and step S103 to step S106 determine the shared window to be used for the indicator to be processed based on the shared window set created in the above steps, and use the data in the data set of the shared window to calculate the indicator value. Based on the above embodiment, the following situations may also exist:
[0094] When the indicators in the indicator set change, the number of shared windows in the shared window set or the window length of the shared window may also change dynamically. Figure 3 , Figure 3 An example diagram of a shared window set update method provided for an embodiment of the present invention can re-execute steps S101 and S102 based on the changed indicator set to generate a current shared window set, and then search in the historical shared window set according to the data type data, filter condition filter and window type type of each current shared window in the current shared window set. If found, it means that the historical shared window can be reused, and then the window length of the current shared window and the historical shared window are further compared. If they are equal, there is no need to adjust the window length. If the window length of the current shared window is less than the window length of the historical shared window, the window length of the historical shared window is reduced to the window length of the current shared window, and the data set of the historical shared window is cleaned according to the reduced window length accordingly, and the adjusted historical shared window is added to the new shared window set; if the window length of the current shared window is greater than the window length of the historical shared window, the window length of the historical shared window is increased to the window length of the current shared window, and the adjusted historical shared window is added to the new shared window set; if not found, the current shared window needs to be added to the new shared window set. Alternatively, the following scheme can be used to update the shared window set:
[0095] When a new indicator is added to the indicator set, the indicator characteristics of the new indicator are extracted as the new indicator information;
[0096] The cluster in which the indicator information of each indicator is the same as the new indicator information is located is used as the first target cluster, the shared window corresponding to the first target cluster is used as the third target shared window, and the new indicator is added to the first target cluster so that the new indicator can share the third target shared window;
[0097] If the new indicator information is different from the indicator information of each indicator, the new indicator automatically becomes a new cluster, a new shared window is created for the new cluster, and the new shared window is added to the shared window set;
[0098] When an indicator is deleted from the indicator set, the cluster where the deleted indicator is located is determined according to the indicator information of the deleted indicator and used as the second target cluster, and the shared window corresponding to the second target cluster is used as the fourth target shared window;
[0099] If there is only a deletion indicator in the second target cluster, the fourth target shared window is deleted from the shared window set;
[0100] If the second target cluster contains more than just the deletion indicator, determining the window length of the deletion indicator and the window length of the fourth target shared window;
[0101] If the window length of the deletion indicator is equal to the window length of the fourth target shared window, the window length of the fourth target shared window is adjusted to the second largest value of the time length in the second target cluster, and the data set in the fourth target shared window is adjusted accordingly;
[0102] If the window length of the deletion indicator is smaller than the window length of the fourth target shared window, the window length of the fourth target shared window remains unchanged.
[0103] Compared with the method for updating the shared window set provided in this embodiment, Figure 3The update method provided is: re-execute step S101 and step S102 to obtain a new shared window set, and then compare it with the historical shared window set to determine which historical shared windows can be reused and which need to be updated. This update method does not need to repeatedly execute step 101 and step S102 and subsequent comparison operations, and only needs to operate on the changed indicators, which can improve the update efficiency. The indicator update in this embodiment includes two types, the first is that a new indicator is added to the indicator set, and the other is that the old indicator is deleted from the indicator set. For the newly added new indicator, the indicator feature of the new indicator is extracted to obtain the new indicator feature value. According to the new indicator feature value, it is determined to which cluster the new indicator belongs. After the target cluster is determined, it can be determined which shared window is needed to calculate the new indicator; and when there is no corresponding cluster with the same feature value as the new indicator, it is necessary to build a new shared window for the new indicator. For deleted indicators, it is necessary to determine whether the time length of the deleted indicator and the number of indicators in the cluster have an impact on the shared window corresponding to the deleted indicator. For better explanation, the example is as follows:
[0104] The shared window corresponding to the deleted indicator is shared window A. The window length of shared window A is 10 minutes, including the following situations:
[0105] Case 1: The number of indicators sharing the shared window A is 1, that is, only the deletion indicator uses the shared window A. In this case, when deleting the deletion indicator from the indicator set, the shared window A also needs to be deleted from the shared window set;
[0106] Case 2: When there are multiple indicators sharing the shared window A, the time length of the deleted indicator is obtained (if it is 5 minutes), and the deletion of the indicator has no effect on the window length of the shared window;
[0107] Case 3: When there are multiple indicators sharing the shared window A, the time length of the deletion indicator is obtained (if it is 10 minutes). At this time, it is necessary to obtain the time length of all indicators sharing the shared window A. In addition to the deletion indicator, all indicators sharing the shared window A include indicator 1 (time length is 3 minutes), indicator 3 (time length is 8 minutes) and indicator 9 (time length is 5 minutes). At this time, the window length of shared window A needs to be modified to 8 minutes. Correspondingly, the data set of shared window A will also change accordingly, from obtaining the data of the last 10 minutes to obtaining the data of the last 8 minutes.
[0108] Furthermore, when the number of shared windows does not change, the length of the shared window is also determined to accurately construct the shared window. After the clustering cluster containing the same indicator information as the new indicator information in the indicator information of each indicator is used as the first target cluster, and the shared window corresponding to the first target cluster is used as the third target shared window, and the new indicator is added to the first target cluster, the following steps may also be included:
[0109] Obtain the window length of the third target shared window and the time length of the new indicator;
[0110] When the time length of the new indicator exceeds the window length of the third target shared window, the window length of the third target shared window is adjusted to the time length of the new indicator, and the data in the data set in the third target shared window is adjusted accordingly;
[0111] Otherwise, the window length of the third target shared window remains unchanged.
[0112] In this embodiment, when adding a new indicator, the new indicator does not affect the number of windows in the original shared window set, but it is also necessary to determine whether the new indicator affects the window length of the shared window corresponding to the new indicator. The specific judgment process is consistent with the judgment process of the window length of the original shared window when the indicator is deleted, because the change of the indicator not only affects the number of shared windows, but also affects the window length of the shared window, and further affects the data storage capacity in the data set.
[0113] The method for determining the index value of the timing index provided by the embodiment of the present invention is applied, and the index information of each index is obtained by extracting the index characteristics of each index in the index set; the index characteristics are data types, filtering conditions and window types; the index in the index set is a security monitoring index with timing requirements; the indicators with the same index information are clustered into a cluster to obtain each cluster cluster, and the corresponding shared windows are respectively constructed for each cluster cluster to obtain a shared window set; when a processing instruction is received, the index characteristics of the to-be-processed index are extracted to obtain the to-be-processed index information; the to-be-processed index is one or more indicators in the index set; according to the to-be-processed index information, the corresponding shared window is selected from the shared window set as the first target shared window; the data of the to-be-processed index within a preset time period is searched from the data set of the first target shared window; the preset time period is the time period specified in the to-be-processed index; the index value of the to-be-processed index is determined based on the data within the preset time period. This method is based on the index characteristics of different indicators with timing requirements, and according to the principle that the data type, filtering condition and window type are completely the same, a shared window is constructed, and all indicators in the same cluster can use the shared window corresponding to the cluster to determine the index value. Compared with the traditional one-to-one window determination of indicator values, the calculation efficiency is improved, and a large amount of memory space is not required, saving resources; it can also support the determination of indicator values for many indicators and many data types to meet complex business needs; the reuse of precise windows for different indicators can save resources and improve calculation efficiency; and the method can also construct a shared precise window, so that when there is a network delay causing disorder, the data can be stored in the data set of the shared precise window in an orderly manner; and the method also supports the real-time dynamic change of the number of shared windows and the window length as the indicators in the indicator set change. For an extended time window, the data in the data set needs to be gradually supplemented. For a shortened time window, the data corresponding to the shortened part of the time window can be immediately cleared from the data set.
[0114] A device for determining an indicator value of a timing indicator provided by an embodiment of the present invention is introduced below. The device for determining an indicator value of a timing indicator described below and the method for determining an indicator value of a timing indicator described above can refer to each other.
[0115] Please refer to Figure 4 , Figure 4 A schematic diagram of a structure of a device for determining an indicator value of a timing indicator provided by an embodiment of the present invention may include:
[0116] The first feature extraction module 100 is used to extract the indicator features of each indicator in the indicator set to obtain the indicator information of each indicator; the indicator features are data types, filtering conditions and window types; the indicators in the indicator set are security monitoring indicators with time sequence requirements;
[0117] The window construction module 200 is used to cluster the indicators with the same indicator information into a cluster to obtain each cluster, and respectively construct a corresponding shared window for each cluster to obtain a shared window set;
[0118] The second feature extraction module 300 is used to extract the indicator features of the indicator to be processed and obtain the indicator information to be processed when receiving the processing instruction; the indicator to be processed is one or more indicators in the indicator set;
[0119] A target window selection module 400 is used to select a corresponding shared window from the shared window set according to the to-be-processed indicator information as a first target shared window;
[0120] A search module 500 is used to search the data of the to-be-processed indicator within a preset time period from the data set of the first target shared window; the preset time period is a time period specified in the to-be-processed indicator;
[0121] The indicator value determination module 600 is used to determine the indicator value of the indicator to be processed based on the data within the preset time period.
[0122] Based on the above embodiment, the window construction module 200 may include:
[0123] A shared precise window construction unit is used to construct a corresponding shared precise window for each of the clusters; the shared precise window consists of a data type, a filtering condition, a precise window type, a window length, a data set and an indicator set; the precise window type is a precise time window or a precise counting window; the data set is an ordered data set sorted according to the timestamp of the data; the window length is the maximum value of the time length in the cluster; the indicator information of all indicators in the indicator set is the same.
[0124] Based on the above embodiment, the shared precise window construction unit may include:
[0125] The real-time data storage subunit is used to obtain new time series data in real time, and use the window that successfully matches the new time series data with the data type and filtering conditions of the shared precision window as the second target shared window, and put the new time series data into the data set of the second target shared window in sequence according to the time when the data was generated.
[0126] Based on the above embodiment, the device for determining the index value of the timing index may further include:
[0127] A real-time determination module, used for determining in real time whether the time difference between the first data and the last data in the data set of each shared precise window exceeds the window length of each shared precise window;
[0128] The deleting module is used to delete the redundant data if the time difference between the first data and the last data in the data set of each shared precise window does not exceed the window length of each shared precise window.
[0129] Based on the above embodiment, the indicators in the indicator set of the indicator value determination device of the timing indicator are relevant indicators in the field of fraud detection, or relevant indicators in the field of risk prevention and control, or relevant indicators in the field of network security, or relevant indicators in the field of monitoring and alarm.
[0130] Based on the above embodiment, the device for determining the index value of the timing index may further include:
[0131] An indicator adding module, used for extracting the indicator feature of the new indicator as new indicator information when a new indicator is added to the indicator set;
[0132] A first result module is used to take the clustering cluster where the indicator information of each indicator that is the same as the new indicator information is located as the first target cluster, take the shared window corresponding to the first target cluster as the third target shared window, and add the new indicator to the first target cluster so that the new indicator can share the third target shared window;
[0133] A second result module is used for, if the new indicator information is different from the indicator information of each indicator, the new indicator automatically becomes a new cluster, a new shared window is created for the new cluster, and the new shared window is added to the shared window set;
[0134] An indicator deletion module, used for, when an indicator is deleted from the indicator set, determining the cluster where the deleted indicator is located according to the indicator information of the deleted indicator, and using the cluster as the second target cluster, and using the shared window corresponding to the second target cluster as the fourth target shared window;
[0135] A third result module, configured to delete the fourth target shared window from the shared window set if there is only the deletion indicator in the second target cluster;
[0136] a fourth result module, configured to determine the window length of the deletion indicator and the window length of the fourth target shared window if the second target cluster contains more than the deletion indicator;
[0137] a fifth result module, configured to adjust the window length of the fourth target shared window to the second largest value of the time length in the second target cluster if the window length of the deletion indicator is equal to the window length of the fourth target shared window, and to adjust the data of the data set in the fourth target shared window accordingly;
[0138] The sixth result module is configured to keep the window length of the fourth target shared window unchanged if the window length of the deletion indicator is smaller than the window length of the fourth target shared window.
[0139] Based on the above embodiment, the device for determining the index value of the timing index may further include:
[0140] an acquisition module, configured to take the clustering cluster where the indicator information identical to the new indicator information in the indicator information of each indicator is located as the first target cluster, take the shared window corresponding to the first target cluster as the third target shared window, and after adding the new indicator to the first target cluster, acquire the window length of the third target shared window and the time length of the new indicator;
[0141] A sixth result module, configured to adjust the window length of the third target sharing window to the time length of the new indicator when the time length of the new indicator exceeds the window length of the third target sharing window, and to adjust the data in the data set in the third target sharing window accordingly;
[0142] The seventh result module is used for: otherwise, the window length of the third target shared window remains unchanged.
[0143] It should be noted that the order of the modules and units in the above-mentioned timing indicator indicator value determination device can be changed without affecting the logic.
[0144] The device for determining the index value of the timing index provided by the embodiment of the present invention is applied, through the first feature extraction module 100, used to extract the index features of each index in the index set to obtain the index information of each index; the index features are data types, filtering conditions and window types; the indicators in the index set are security monitoring indicators with timing requirements; the window construction module 200 is used to cluster the indicators with the same index information into a cluster to obtain each cluster cluster, and respectively construct a corresponding shared window for each cluster cluster to obtain a shared window set; the second feature extraction module 300 is used to extract the index features of the to-be-processed index when receiving a processing instruction to obtain the to-be-processed index information; the to-be-processed index is one or more indicators in the index set; the target window selection module 400 is used to select the corresponding shared window from the shared window set according to the to-be-processed index information as the first target shared window; the search module 500 is used to search for data of the to-be-processed index within a preset time period from the data set of the first target shared window; the preset time period is the time period specified in the to-be-processed index; the index value determination module 600 is used to determine the index value of the to-be-processed index based on the data within the preset time period. Based on the indicator characteristics of different indicators with timing requirements, this device constructs a shared window according to the principle that the data type, filtering conditions, and window type are exactly the same. All indicators in the same cluster can use the shared window corresponding to the cluster to determine the indicator value. Compared with the traditional one-to-one window to determine the indicator value, the calculation efficiency is improved, and a large amount of memory space is not required, which saves resources; and it can also support the determination of indicator values of many indicators and many data types to meet complex business needs; the precise window reuse of different indicators can save resources and improve calculation efficiency; and the device can also construct a shared precise window, so that when there is a network delay causing disorder, the data can be stored in the data set of the shared precise window in an orderly manner; and the device also supports the real-time dynamic change of the number of shared windows and the window length as the indicators in the indicator set change. For the extended time window, the data in the data set needs to be gradually supplemented, and for the shortened time window, the data corresponding to the shortened part of the time window can be immediately cleared from the data set.
[0145] The following is an introduction to an indicator value determination device for a timing indicator provided by an embodiment of the present invention. The indicator value determination device for a timing indicator described below and the indicator value determination method for a timing indicator described above can refer to each other.
[0146] Please refer to Figure 5 , Figure 5 A schematic diagram of a structure of a device for determining an indicator value of a timing indicator provided by an embodiment of the present invention may include:
[0147] A memory 10, used for storing computer programs;
[0148] The processor 20 is used to execute a computer program to implement the steps of the method for determining the indicator value of the timing indicator.
[0149] The memory 10 , the processor 20 , and the communication interface 31 all communicate with each other via the communication bus 32 .
[0150] In the embodiment of the present invention, the memory 10 is used to store one or more programs, and the program may include program code, and the program code includes computer operation instructions. In the embodiment of the present invention, the memory 10 may store programs for implementing the following functions:
[0151] Extract the indicator characteristics of each indicator in the indicator set to obtain the indicator information of each indicator; the indicator characteristics are data type, filter condition and window type; the indicators in the indicator set are security monitoring indicators with time series requirements;
[0152] Cluster the indicators with the same indicator information into a cluster to obtain each cluster, and construct a corresponding shared window for each cluster to obtain a shared window set;
[0153] When a processing instruction is received, the indicator characteristics of the indicator to be processed are extracted to obtain the indicator information to be processed; the indicator to be processed is one or more indicators in the indicator set;
[0154] Selecting a corresponding shared window from the shared window set as a first target shared window according to the indicator information to be processed;
[0155] Searching for data of the to-be-processed indicator within a preset time period from the data set of the first target shared window; the preset time period is the time period specified in the to-be-processed indicator;
[0156] Determine the indicator value of the indicator to be processed based on the data within a preset time period.
[0157] In a possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.
[0158] In addition, the memory 10 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include an NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and processing hardware-based tasks.
[0159] The processor 20 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, a microprocessor or any conventional processor, etc. The processor 20 may call a program stored in the memory 10 .
[0160] The communication interface 31 may be an interface of a communication module, and is used to connect to other devices or systems.
[0161] Of course, it should be noted that Figure 5 The structure shown does not constitute a limitation on the device for determining the index value of the timing index in the embodiment of the present invention. In actual applications, the device for determining the index value of the timing index may include: Figure 5 More or fewer components than shown, or combinations of certain components.
[0162] The following is an introduction to a medium provided by an embodiment of the present invention. The medium described below and the method for determining an indicator value of a timing indicator described above can be referenced to each other.
[0163] The present invention also provides a medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for determining the indicator value of the timing indicator are implemented.
[0164] The medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0165] 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.
[0166] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0167] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only 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", "comprises" or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes 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.
[0168] The above is a detailed introduction to the method, device, equipment and medium for determining the indicator value of a timing indicator provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for determining an indicator value of a time series indicator, characterized in that: include: Extract the indicator characteristics of each indicator in the indicator set to obtain the indicator information of each indicator; the indicator characteristics are data types, filtering conditions and window types; the indicators in the indicator set are security monitoring indicators with time sequence requirements; Clustering the indicators with the same indicator information into a cluster to obtain individual clusters, and constructing corresponding shared windows for each of the clusters to obtain a shared window set; When a processing instruction is received, the indicator characteristics of the indicator to be processed are extracted to obtain the indicator information to be processed; the indicator to be processed is one or more indicators in the indicator set; Selecting a corresponding shared window from the shared window set according to the to-be-processed indicator information as a first target shared window; Searching for data of the to-be-processed indicator within a preset time period from the data set of the first target shared window; The preset time period is the time period specified in the indicator to be processed; Determine the index value of the to-be-processed index based on the data within the preset time period; The step of constructing a corresponding shared window for each cluster comprises: A corresponding shared precision window is constructed for each cluster; the shared precision window consists of a data type, a filtering condition, a precision window type, a window length, a data set and an indicator set; the precision window type is a precision time window or a precision counting window; the data set is an ordered data set sorted according to the timestamp of the data; the window length is the maximum value of the time length in the cluster; the indicator information of all indicators in the indicator set is the same; Also includes: When a new indicator is added to the indicator set, the indicator feature of the new indicator is extracted as new indicator information; The cluster in which the indicator information of each indicator is the same as the new indicator information is located is used as the first target cluster, the shared window corresponding to the first target cluster is used as the third target shared window, and the new indicator is added to the first target cluster so that the new indicator can share the third target shared window; If the new indicator information is different from the indicator information of each indicator, the new indicator automatically becomes a new cluster, a new shared window is created for the new cluster, and the new shared window is added to the shared window set; When an indicator is deleted from the indicator set, the cluster where the deleted indicator is located is determined according to the indicator information of the deleted indicator and used as the second target cluster, and the shared window corresponding to the second target cluster is used as the fourth target shared window; If there is only the deletion indicator in the second target cluster, deleting the fourth target shared window from the shared window set; If the second target cluster includes more than the deletion indicator, determining the window length of the deletion indicator and the window length of the fourth target shared window; If the window length of the deletion indicator is equal to the window length of the fourth target shared window, the window length of the fourth target shared window is adjusted to the second largest value of the time length in the second target cluster, and the data of the data set in the fourth target shared window is adjusted accordingly; If the window length of the deletion indicator is smaller than the window length of the fourth target shared window, the window length of the fourth target shared window remains unchanged; After taking the clustering cluster where the indicator information identical to the new indicator information in the indicator information of each indicator is located as the first target cluster, taking the shared window corresponding to the first target cluster as the third target shared window, and adding the new indicator to the first target cluster, the method further includes: Obtaining the window length of the third target shared window and the time length of the new indicator; When the time length of the new indicator exceeds the window length of the third target sharing window, the window length of the third target sharing window is adjusted to the time length of the new indicator, and the data in the data set in the third target sharing window is adjusted accordingly; Otherwise, the window length of the third target shared window remains unchanged.
2. The method for determining the index value of a timing index according to claim 1, characterized in that: The data set includes: Acquire new time series data in real time, take the window that successfully matches the data type and filtering conditions of the shared precision window with the new time series data as the second target shared window, and put the new time series data into the data set of the second target shared window in sequence according to the time when the data was generated.
3. The method for determining the index value of a timing index according to claim 2, characterized in that: Also includes: Determine in real time whether the time difference between the first data and the last data in the data set of each shared precise window exceeds the window length of each shared precise window; If it exceeds, the redundant data is deleted so that the time difference between the first data and the last data in the data set of each shared precise window does not exceed the window length of each shared precise window.
4. The method for determining the index value of a timing index according to claim 1, characterized in that: The indicators in the indicator set are relevant indicators in the field of fraud detection, or relevant indicators in the field of risk prevention and control, or relevant indicators in the field of network security, or relevant indicators in the field of monitoring and alarm.
5. A device for determining an indicator value of a time series indicator, characterized in that: include: The first feature extraction module is used to extract the indicator features of each indicator in the indicator set to obtain the indicator information of each indicator; the indicator features are data types, filtering conditions and window types; the indicators in the indicator set are security monitoring indicators with time sequence requirements; A window construction module, used for clustering the indicators with the same indicator information into a cluster to obtain each cluster, and constructing a corresponding shared window for each cluster to obtain a shared window set; A second feature extraction module is used to extract the indicator features of the indicator to be processed and obtain the indicator information to be processed when receiving the processing instruction; the indicator to be processed is one or more indicators in the indicator set; A target window selection module, configured to select a corresponding shared window from the shared window set according to the to-be-processed indicator information as a first target shared window; A search module, used to search the data of the to-be-processed indicator within a preset time period from the data set of the first target shared window; The preset time period is the time period specified in the indicator to be processed; An indicator value determination module, used to determine the indicator value of the indicator to be processed based on the data within the preset time period; The window construction module includes: A shared precision window construction unit is used to construct a corresponding shared precision window for each cluster; the shared precision window consists of a data type, a filtering condition, a precision window type, a window length, a data set and an indicator set; the precision window type is a precision time window or a precision counting window; the data set is an ordered data set sorted according to the timestamp of the data; the window length is the maximum value of the time length in the cluster; the indicator information of all indicators in the indicator set is the same; Also includes: An indicator adding module, used for extracting the indicator feature of the new indicator as new indicator information when a new indicator is added to the indicator set; A first result module is used to take the clustering cluster where the indicator information of each indicator that is the same as the new indicator information is located as the first target cluster, take the shared window corresponding to the first target cluster as the third target shared window, and add the new indicator to the first target cluster so that the new indicator can share the third target shared window; A second result module is used for, if the new indicator information is different from the indicator information of each indicator, the new indicator automatically becomes a new cluster, a new shared window is created for the new cluster, and the new shared window is added to the shared window set; An indicator deletion module, used for, when an indicator is deleted from the indicator set, determining the cluster where the deleted indicator is located according to the indicator information of the deleted indicator, and using the cluster as the second target cluster, and using the shared window corresponding to the second target cluster as the fourth target shared window; A third result module, configured to delete the fourth target shared window from the shared window set if there is only the deletion indicator in the second target cluster; a fourth result module, configured to determine the window length of the deletion indicator and the window length of the fourth target shared window if the second target cluster contains more than the deletion indicator; a fifth result module, configured to adjust the window length of the fourth target shared window to the second largest value of the time length in the second target cluster if the window length of the deletion indicator is equal to the window length of the fourth target shared window, and to adjust the data of the data set in the fourth target shared window accordingly; a sixth result module, configured to keep the window length of the fourth target shared window unchanged if the window length of the deletion indicator is smaller than the window length of the fourth target shared window; Also includes: an acquisition module, configured to take the clustering cluster where the indicator information identical to the new indicator information in the indicator information of each indicator is located as the first target cluster, take the shared window corresponding to the first target cluster as the third target shared window, and after adding the new indicator to the first target cluster, acquire the window length of the third target shared window and the time length of the new indicator; A sixth result module, configured to adjust the window length of the third target sharing window to the time length of the new indicator when the time length of the new indicator exceeds the window length of the third target sharing window, and to adjust the data in the data set in the third target sharing window accordingly; The seventh result module is used for: otherwise, the window length of the third target shared window remains unchanged.
6. A device for determining an indicator value of a time series indicator, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for determining the indicator value of a timing indicator as claimed in any one of claims 1 to 4 when executing the computer program.
7. A medium, characterized in that The medium stores computer executable instructions, and when the computer executable instructions are loaded and executed by the processor, the steps of the method for determining the indicator value of the timing indicator according to any one of claims 1 to 4 are implemented.
