A data alarm method and device
By pre-building a list of data views and alarm conditions, the target data view and alarm conditions are automatically determined, which solves the problem of low data processing efficiency in the existing technology and realizes efficient and flexible data alarm processing, especially alarms for semi-structured data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
- Filing Date
- 2023-06-14
- Publication Date
- 2026-05-05
AI Technical Summary
Existing alarm systems require professionals to manually process and configure data, leading to frequent changes in data cleaning and processing logic, resulting in low efficiency, especially for semi-structured data processing.
By pre-building a list of data views and alarm conditions, the target data view and alarm conditions are automatically determined based on the data source identifier, and alarm processing is performed based on field paths, reducing manual intervention and the flexibility of data structure changes.
It improves the efficiency of data alarms, especially for semi-structured data, reduces user costs, expands the scope of data utilization, and enhances processing flexibility.
Smart Images

Figure CN116738013B_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of alarm management technology, and in particular to a data alarm method and device. Background Technology
[0002] In the field of alarm processing technology, the input of alarm systems is usually data. How to manage alarms based on different types of data is an important issue in the alarm processing process.
[0003] In related technologies, input data in alarm systems typically requires professional personnel to perform data cleaning and processing. The input data also needs to be split or converted into specific data types. When the alarm system needs to configure or activate alarms, it also requires technical personnel to develop targeted solutions for different input data. Furthermore, when the data content changes, the corresponding data processing logic, cleaning logic, table structure, etc., also need to be changed accordingly. Therefore, there is a need to provide a better alarm processing mechanism. Summary of the Invention
[0004] On one hand, one or more embodiments of this specification provide a data alarm method, comprising: acquiring target data to be processed; determining a target data view corresponding to the target data from a pre-built list of data views based on the data source identifier of the target data, and determining alarm conditions corresponding to the target data view from pre-configured alarm conditions based on the configuration information of the target data view, wherein the target data view includes at least fields of the target data and field paths of the fields; and performing alarm processing on the target data based on the determined alarm conditions and the field paths of the fields in the target data view.
[0005] On the other hand, one or more embodiments of this specification provide a data alarm device, including: a data input module for acquiring target data to be processed; a target data view and alarm condition determination module for determining a target data view corresponding to the target data from a pre-built list of data views based on the data source identifier of the target data, and determining alarm conditions corresponding to the target data view from pre-configured alarm conditions based on the configuration information of the target data view, wherein the target data view includes at least fields of the target data and field paths of the fields; and an alarm calculation module for performing alarm processing on the target data based on the determined alarm conditions and the field paths of the fields in the target data view.
[0006] In another aspect, one or more embodiments of this specification provide an electronic device, including: a processor; and a memory arranged to store computer-executable instructions, wherein when the executable instructions are executed, the processor is enabled to: acquire target data to be processed; determine a target data view corresponding to the target data from a pre-built list of data views based on a data source identifier of the target data, and determine alarm conditions corresponding to the target data view from pre-configured alarm conditions based on configuration information of the target data view, wherein the target data view includes at least a field of the target data and a field path of the field; and perform alarm processing on the target data based on the determined alarm conditions and the field path of the field in the target data view.
[0007] In another aspect, one or more embodiments of this specification provide a storage medium for storing computer-executable instructions, which, when executed by a processor, implement the following process: acquiring target data to be processed; determining a target data view corresponding to the target data from a pre-built list of data views based on the data source identifier of the target data, and determining alarm conditions corresponding to the target data view from pre-configured alarm conditions based on the configuration information of the target data view, wherein the target data view includes at least the fields of the target data and the field paths of the fields; and performing alarm processing on the target data based on the determined alarm conditions and the field paths of the fields in the target data view. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in one or more embodiments of this specification or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in one or more embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 This is a schematic flowchart of a data alarm method according to an embodiment of this specification;
[0010] Figure 2 This is a schematic diagram of the structure of a data view according to an embodiment of this specification;
[0011] Figure 3 This is a schematic diagram illustrating the data alarm implementation principle according to an embodiment of this specification;
[0012] Figure 4 This is a schematic diagram illustrating the principle of a format generation algorithm according to an embodiment of this specification;
[0013] Figure 5 This is a schematic diagram illustrating the tree structure logic principle of semi-structured data according to an embodiment of this specification;
[0014] Figure 6 This is a schematic diagram illustrating the principle of alarm calculation according to an embodiment of this specification;
[0015] Figure 7 This is a schematic block diagram of a data alarm device according to an embodiment of this specification;
[0016] Figure 8 This is a schematic block diagram of an electronic device according to an embodiment of this description. Detailed Implementation
[0017] This specification provides one or more embodiments of a data alarm method and apparatus to solve the current problems.
[0018] To enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this document.
[0019] like Figure 1 As shown in the embodiments of this specification, a data alarm method is provided. The executing entity of this method can be a server, which can be a single independent server or a server cluster composed of multiple servers. The server can be a backend server for financial services or online shopping services, or a backend server for an application. Specifically, the method may include the following steps:
[0020] In step S102, the target data to be processed is obtained.
[0021] The target data in one or more embodiments of this specification can be structured data, semi-structured data, or data that can be converted into semi-structured data through a specified conversion mechanism. Structured data, also known as row data, is data logically expressed and implemented using rows and columns. Structured data strictly adheres to data format and length specifications and is stored and managed through relational databases. Compared to structured data, semi-structured data has the following characteristics: 1) The data structure is self-descriptive, meaning that structure and data are integrated in semi-structured data; its structure can be defined through the data itself. Semi-structured data includes labels and tags used to separate its internal elements and hierarchical structure; 2) The description of the data structure is complex, meaning that the structure of semi-structured data is not easily expressed and implemented directly using a two-dimensional table structure; 3) The description of the data structure is dynamic, meaning that semi-structured data has a dynamic data structure. Therefore, semi-structured data has a certain structure, but it does not conform to the tabular data structure of relational databases or other data tables. Common semi-structured data include JSON (JavaScript Object Notation, a lightweight data exchange format) data and XML (Extensible Markup Language) data.
[0022] This specification uses semi-structured data as an example for detailed explanation in the embodiments. For the execution process of alarm methods for other types of data, please refer to the relevant content below, which will not be repeated here.
[0023] It should be noted that the target data to be processed in the embodiments of this specification can be target data to be connected to the alarm system, or it can be target data that has already been connected to the alarm system.
[0024] In step S104, based on the data source identifier of the target data, the target data view corresponding to the target data is determined from the pre-built list of data views, and based on the configuration information of the target data view, the alarm conditions corresponding to the target data view are determined from the pre-configured alarm conditions. The target data view includes at least the fields of the target data and the field paths of the fields.
[0025] In other words, for multiple target data, a list of corresponding data views is pre-built, and a data source identifier corresponding to each target data view is generated. In subsequent processes, the target data view corresponding to the target data can be determined from the list of data views based on the data source identifier, and the alarm conditions for the target data can be configured based on the configuration information of the target data view.
[0026] A data view is a description of a data entity, containing its structure, fields, field information, and related configuration details. A list of data views can include multiple different views, such as a data view describing user electronic payment order data, or a data view describing user-published content data.
[0027] In one implementation, the view configuration information includes: the data source identifier associated with the data view, the data source format, and field information for multiple fields contained in the data. The field information includes: field identifier, field data type, and field path. The data source identifier associated with the data view is unique and used to distinguish different data sources; the data source format includes: JSON format, XML format, etc.
[0028] The structure of the data view in the embodiments of this specification can be found in [reference]. Figure 2 As shown. By Figure 2 As can be seen, the composition structure of a data view corresponds to its view configuration information. A data view can include multiple fields, and the field information of the entire data view includes the field information of multiple fields.
[0029] In the embodiments of this specification, different data views correspond to different data source identifiers. Based on the data source identifier of the target data, the target data view corresponding to the target data can be determined from the pre-built list of data views. The data source identifier of the target data can be the data source ID of the target data.
[0030] Different alarm conditions correspond to different configuration information in the data view. Based on the configuration information of the target data view, the alarm conditions corresponding to the target data view can be determined from the pre-configured alarm conditions.
[0031] The data view list in the embodiments of this specification can be pre-built. The method for building the data view list can be to manually input multiple data views and then combine the multiple data views into a data view list; or multiple data views can be generated first by an algorithm and then combined into a data view list.
[0032] In step S106, alarm processing is performed on the target data based on the determined alarm conditions and the field paths of the fields in the target data view.
[0033] After determining the alarm conditions corresponding to the target data view in step S104, the field value corresponding to the target data to be processed can be determined in step S106 based on the field path of the field in the target data view. If the field value meets the alarm conditions determined in step S104 after alarm calculation of the target data, an alarm message is sent; if the field value does not meet the alarm conditions determined in step S104 after alarm calculation of the target data, no alarm message is sent.
[0034] The schematic diagram illustrating the implementation principle of data alarms in the embodiments of this specification is as follows: Figure 3 As shown, Figure 3 The document illustrates the entire data alarm implementation process: view configuration, alarm configuration, data input, and alarm calculation. The data view configured in the view configuration process is transmitted to the alarm configuration process. The alarm conditions configured in the alarm configuration process are provided to the alarm calculation process. The alarm calculation process combines the alarm conditions with the data provided in the data input process (i.e., the acquired target data) to perform alarm calculation. Finally, the output of the alarm calculation is fed back to the user, thereby realizing data alarming. Specifically, the data input process is implemented through step S102, the view configuration process and the alarm configuration process are implemented through step S104, and the alarm calculation process is implemented through step S106.
[0035] This specification provides a data alarm method. The method first acquires the target data to be processed; then, based on the data source identifier of the target data, it determines the target data view corresponding to the target data from a pre-built list of data views, and based on the configuration information of the target data view, it determines the alarm conditions corresponding to the target data view from pre-configured alarm conditions; finally, based on the determined alarm conditions and the field paths of the fields in the target data view, it performs alarm processing on the target data. By pre-building a list of data views and converting the data into corresponding data views, the data views can store the fields and their path information in semi-structured data, thereby structuring the semi-structured data. Combined with the pre-configured alarm conditions, the method can directly perform value calculations on the semi-structured data based on the determined alarm conditions and the field paths of the fields in the target data view, thus achieving alarm for the semi-structured data. This method of pre-building a list of data views and pre-configuring alarm conditions effectively improves the efficiency of data alarms. Since it eliminates the need for specialized technical personnel to write corresponding data cleaning and processing logic, and avoids creating multiple tables for data storage, it further enhances the efficiency of data alarms, especially for semi-structured data, and helps reduce user costs. Moreover, by converting data into corresponding data views, semi-structured data can be structured, thereby expanding the scope of data utilization. Furthermore, because the list of data views and alarm conditions are pre-built and pre-configured, when the data structure changes, the pre-built data views can be modified, and new alarm conditions can be configured accordingly, making the data alarm processing more flexible.
[0036] Furthermore, there are multiple ways to construct the data view list in step S104 above. The following is one optional processing method, which can be found in steps A1-A3:
[0037] Step A1: Obtain multiple historical data sets;
[0038] Step A2: Based on the data structure of the acquired historical data, convert each historical data into a corresponding data view. The data view should include at least the fields of the corresponding historical data and the field paths of the corresponding historical data fields.
[0039] Step A3: Based on the data view for each historical data point, construct a list of data views.
[0040] As can be seen from steps A1-A3 above, data views can be constructed based on historical data. Multiple data views constitute a data view list. Although the specific content of historical data is different from the target data currently acquired, historical data can contain the same data structure as the target data. This provides a way to quickly and flexibly select data views based on the acquired target data, which is beneficial to further improve the efficiency and flexibility of data alarms.
[0041] Furthermore, the data alarm method in this embodiment of the specification further includes: updating a pre-built data view list according to the data structure of the target data. There are multiple ways to determine the target data view corresponding to the target data from the pre-built data view list in step S104 above. The following provides an optional processing method, which can be found in steps B1 and B2:
[0042] Step B1: When the target data to be processed is the target data to be connected to the alarm system, determine the target data view corresponding to the target data from the pre-built data view list, including: adding a target data view corresponding to the target data in the pre-built data view category according to the data structure of the acquired target data.
[0043] Step B2: When the target data to be processed is target data that has been connected to the alarm system, determine the target data view corresponding to the target data from the pre-built data view list, including: updating the target data view corresponding to the target data in the pre-built data view category according to the data structure of the acquired target data.
[0044] Furthermore, there are multiple ways to configure alarm conditions in step S104 above. The following is one optional processing method, which can be found in steps C1 and C2:
[0045] Step C1: Based on the field information of each field in each data view in the data view list, determine the value of the alarm parameter in the data corresponding to each data view. The alarm parameter is the object of alarm detection based on alarm conditions.
[0046] Step C2: Based on the data type of each field in each data view, determine the threshold of the alarm parameter in the alarm condition corresponding to each field.
[0047] As shown in steps C1 and C2 above, the data view list includes multiple data views, and each view contains multiple fields. Based on the field information of a specified field in the current data view, the value of the alarm parameter in the corresponding data of the current data view can be determined. Based on the data type of the specified field in the current data view, the threshold of the alarm parameter in the alarm condition corresponding to the specified field in the current data view can be determined. Configuring alarm conditions is essentially the process of determining the value and threshold of the alarm parameters.
[0048] In one implementation, the value of the alarm parameter can be represented by the left-hand side of an expression, and the threshold of the alarm parameter can be represented by a comparison operator and an right-hand side. Users can use field information from the selected target data view as the left-hand side of the alarm condition, and configure the corresponding comparison operator and right-hand side according to the data type of the specified field in the target data view. Taking online payment as an example, the left-hand side can be the transaction amount, the comparison operator can be greater than, less than, or a keyword in the text, and the right-hand side is the specific threshold value. For example, if the alarm condition is that the transaction amount is greater than 10 yuan, the current actual transaction amount is the left-hand side, the greater than sign is the comparison operator, and 10 yuan is the right-hand side.
[0049] Furthermore, there are multiple ways to configure alarm conditions in step S104 above. The following provides another optional processing method. When the data view corresponds to multiple alarm conditions, please refer to the following steps C1-C4:
[0050] Step C1: Based on the field information of each field in each data view in the data view list, determine the value of the alarm parameter in the data corresponding to each data view. The alarm parameter is the object of alarm detection based on alarm conditions.
[0051] Step C2: Based on the data type of each field in each data view, determine the threshold of the alarm parameter in the alarm condition corresponding to each field;
[0052] Step C3: Receive the instruction to add alarm condition relationships;
[0053] Step C4: Configure the logical relationship between multiple alarm conditions according to the obtained instructions.
[0054] The execution process of steps C1 and C2 above can be found in the previous content and will not be repeated here. As can be seen from steps C3 and C4, in another implementation, the data view corresponds to multiple alarm conditions. The process of configuring alarm conditions may also include configuring the logical relationship between multiple alarm conditions, making the alarm conditions richer and improving the flexibility of data alarms.
[0055] Optionally, in the data view, one field can correspond to one alarm condition. For example, one field can represent the alarm condition for a transaction amount greater than 10 yuan, another field can represent the alarm condition for a transaction amount less than 100 yuan, and yet another field can represent the logical relationship between the alarm conditions for amounts greater than 10 yuan and the alarm conditions for amounts less than 100 yuan. This logical relationship can be a logical AND relationship, that is, the transaction amount must be both greater than 10 yuan and less than 100 yuan.
[0056] In a data view, a single field can correspond to multiple alarm conditions. For example, a single field can correspond to multiple different scenarios or regions, with each scenario or region corresponding to an alarm condition. All alarm conditions are related to transaction amounts, only differing in scenario or region. In the data view, these different alarm conditions can be represented by a single field. This approach can meet users' alarm management needs while saving data view resources and improving resource utilization.
[0057] Furthermore, in step S106 above, there are multiple ways to process the target data for alarms based on the determined alarm conditions and the field paths of the fields in the target data view. The following provides one optional processing method, which can be found in steps S10602-S10610:
[0058] In step S10602, the alarm conditions corresponding to the target data view are determined according to the data source identifier of the target data view, and the corresponding fields are determined based on the alarm conditions.
[0059] In one embodiment, the process of step S10602 described above can be performed as follows: steps D1-D3:
[0060] Step D1: Filter out alarm conditions based on the data source identifier of the target data view.
[0061] In implementation, the data source identifier can be the data source ID.
[0062] Step D2: Extract the values of alarm parameters from the filtered alarm conditions.
[0063] In practice, the alarm parameters can be taken from the left-hand side of the expression.
[0064] Step D3: Determine the corresponding field in the target data view based on the values of the extracted alarm parameters.
[0065] After extracting the values of the alarm parameters, the corresponding fields can be found in the target data view based on these values.
[0066] In step S10604, the type of parser used to parse the determined fields is determined according to the data source format of the target data view.
[0067] In implementation, if the data source format of the target data view is JSON, a JSON parser is used; if the data source format of the target data view is XML, an XML parser is used.
[0068] In step S10606, based on the format generation algorithm, the data corresponding to the target data view is converted into corresponding data objects according to different data source formats.
[0069] In implementation, such as Figure 4 As shown, during the process of acquiring the target data to be processed (i.e., the data input process for the target data to be connected to the alarm system), a format object is generated for the corresponding target data (i.e., the data corresponding to the target data view) according to different data source formats. This yields a data object corresponding to the target data. Then, according to the corresponding data source identifier, the acquired data object is used for subsequent alarm calculations. It is important to note that different data carry corresponding data source identifiers during this process. For example, based on the format generation algorithm, a format object is generated for JSON data to obtain a JSON object, and a format object is generated for XML data to obtain an XML object.
[0070] In step S10608, the data object and the field path corresponding to the determined field are input into the parser to obtain the parsed value.
[0071] After determining the corresponding field in the target data view through step S10602, the field path corresponding to the field can be determined. Then, combined with the data object determined in step S10606, the data object and field path are used as input data for the parser. The parser performs parsing calculation to obtain the parsed value, which is the value of the alarm parameter in the data corresponding to the target data view.
[0072] The process of parsing and calculating using a parser is also the process of extracting values from semi-structured data. Specifically, the performance of an alarm system usually depends on the computational power of the data. Structured data is typically stored and managed using relational databases. Taking an employee resume as an example, structured data can be represented as a single row of data as shown in Table 1 below.
[0073] ID Name Years of service address Skill 1 Shi Yin XX year XX month Hangzhou, Baozhou Java, C++
[0074] Table 1
[0075] Semi-structured data, due to its self-descriptive nature, complexity, and dynamic description, cannot be logically expressed and stored in rows and columns. However, its flexibility and complexity allow it to better describe an object. Semi-structured data has a hierarchical structure, which can be abstracted as a tree structure. A schematic diagram of the logical principle of a tree structure for semi-structured data can be found here. Figure 5 As shown. By Figure 5 As can be seen, when retrieving the value of a field based on semi-structured data, the field path corresponding to that field can be saved. The value of the field can then be determined programmatically by retrieving the value based on the field path. For example, the field path corresponding to the "name" field in "school" could be " / school / name". Figure 5 The path corresponding to the "address" field can be " / address".
[0076] In step S10610, alarm processing is performed on the target data based on the parsed value and the threshold of the alarm parameter in the alarm condition corresponding to the determined field.
[0077] Step S10608 determines the parsed value of the corresponding field in the target data view. Combined with the threshold of the alarm parameter in the alarm condition corresponding to the determined field, alarm calculation is performed on the target data to generate alarm information.
[0078] In one embodiment, the process of step S10610 described above can be executed as follows: steps E1-E4:
[0079] Step E1: Obtain the parsed value of the alarm condition corresponding to the determined field.
[0080] Step E2: Based on the parsed value of the alarm condition corresponding to the determined field and the threshold value of the alarm parameter in the alarm condition corresponding to the determined field, determine the first alarm calculation result corresponding to the alarm condition.
[0081] The first alarm calculation result may include multiple individual alarm conditions, such as the logical value of each alarm condition calculated.
[0082] Step E3: Determine the second alarm calculation result based on the preset alarm condition calculation rules and the first alarm calculation result.
[0083] In one implementation, when the target data view corresponds to multiple alarm conditions, the preset alarm condition calculation rules include calculation rules corresponding to the logical relationships between the multiple alarm conditions, such as logical expressions between the multiple alarm conditions.
[0084] The second alarm calculation result may include multiple individual alarm conditions, as well as logical relationships between certain alarm conditions. The logical relationships may be AND, OR, etc.
[0085] Step E4: Generate alarm information based on the second alarm calculation result.
[0086] The above steps E1-E4 can be implemented by a comparator. The comparator makes a logical judgment based on the threshold determined by the comparison operator and the right value, as well as the parsed value determined in step S10608. The comparator performs alarm calculation. When the parsed value meets the threshold condition set by the comparison operator and the right value, an alarm message is generated; otherwise, no alarm message is generated.
[0087] The implementation principle of the alarm calculation process in steps S10602-S10610 can be found in [reference needed]. Figure 6 As shown, by Figure 6 As can be seen, after obtaining the target data, according to step S10602, the data object generated during the acquisition of the target data is used to determine the alarm conditions and corresponding fields of the target data view based on the data source identifier. In step S10604, the parser type is determined according to the data source format of the target data view. In step S10608, the data object and the field path corresponding to the determined field are input into the parser to obtain the parsed value. Finally, using the comparator, in step S10610, the target data is alarm processed based on the parsed value and the threshold of the alarm parameter in the alarm conditions corresponding to the determined field.
[0088] This specification provides a data alarm method. The method first obtains the target data to be processed; then, based on the data source identifier of the target data, it determines the target data view corresponding to the target data from a pre-built list of data views, and based on the configuration information of the target data view, it determines the alarm conditions corresponding to the target data view from pre-configured alarm conditions; finally, based on the determined alarm conditions and the field paths of the fields in the target data view, it performs alarm processing on the target data. By pre-building a list of data views and transforming data into corresponding data views, the data views can store the fields and their path information in semi-structured data, thereby structuring the semi-structured data. Combined with pre-configured alarm conditions, the semi-structured data can be directly calculated based on the determined alarm conditions and the field paths in the target data view, thus enabling alarms for the semi-structured data. This method of pre-building a list of data views and pre-configuring alarm conditions effectively improves the efficiency of data alarms. Since it eliminates the need for technical personnel to write corresponding data cleaning and processing logic, and also eliminates the need to create multiple tables for data storage, it further improves the efficiency of data alarms, especially for semi-structured data, and helps reduce user costs. Moreover, by transforming data into corresponding data views, semi-structured data can be structured, thereby expanding the scope of data utilization. Furthermore, because the data structure is pre-built and alarm conditions are pre-configured, when the data structure changes, the appropriate data view can be selected from the pre-built list, and suitable alarm conditions can be chosen from the pre-configured alarm conditions, making data alarms more flexible.
[0089] In summary, specific embodiments of this subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing can be advantageous.
[0090] The above describes a data alarm method provided by one or more embodiments of this specification. Based on the same idea, one or more embodiments of this specification also provide a data alarm device, such as... Figure 7 As shown.
[0091] The data alarm device includes: a data input module 210, a target data view and alarm condition determination module 220, and an alarm calculation module 230. Among them:
[0092] Data input module 210 acquires the target data to be processed;
[0093] The target data view and alarm condition determination module 220 determines the target data view corresponding to the target data from a pre-built list of data views based on the data source identifier of the target data, and determines the alarm conditions corresponding to the target data view from a pre-configured list of alarm conditions based on the configuration information of the target data view. The target data view includes at least the fields of the target data and the field paths of the fields.
[0094] The alarm calculation module 230 performs alarm processing on the target data based on the determined alarm conditions and the field paths of the fields in the target data view.
[0095] In one embodiment, the target data view and alarm condition determination module 220 includes:
[0096] Data view list building unit, used to pre-build a data view list based on multiple historical data;
[0097] Alarm condition configuration unit, used to pre-configure alarm conditions.
[0098] In one embodiment, the data view list building unit further includes:
[0099] The historical data acquisition sub-unit acquires multiple historical data sets.
[0100] The data view conversion unit converts each piece of historical data into a corresponding data view based on the data structure of the acquired historical data. The data view includes at least the fields of the corresponding historical data and the field paths of the corresponding historical data fields.
[0101] The list constructs sub-units, building a list of data views based on the data view of each historical data.
[0102] In one embodiment, the alarm condition configuration unit includes:
[0103] The alarm parameter value determination sub-unit determines the value of the alarm parameter in the data corresponding to each data view based on the field information of each field in each data view in the data view list. The alarm parameter is the object of alarm detection based on alarm conditions.
[0104] The alarm parameter threshold determination sub-unit determines the threshold of the alarm parameter in the alarm condition corresponding to each field based on the field data type of each field in each data view.
[0105] In another embodiment, the alarm condition configuration unit further includes:
[0106] The instruction receiving subunit receives instructions to add alarm condition relationships;
[0107] The logical relationship configuration unit configures the logical relationships between multiple alarm conditions based on the acquired instructions.
[0108] In one embodiment, the alarm calculation module 230 includes:
[0109] The field determination unit determines the alarm conditions corresponding to the target data view based on the data source identifier of the target data view, and determines the corresponding fields based on the alarm conditions.
[0110] The parser type determination unit determines the type of parser used to parse the determined fields based on the data source format of the target data view.
[0111] The format object generation unit, based on the format generation algorithm, converts the data corresponding to the target data view into corresponding data objects according to different data source formats;
[0112] The parsing calculation unit inputs the data object and the field path corresponding to the determined field into the parser to obtain the parsed value;
[0113] The alarm unit performs alarm processing on the target data based on the parsed value and the threshold of the alarm parameter in the alarm conditions corresponding to the determined field.
[0114] In one embodiment, the alarm unit further includes:
[0115] The parsing value acquisition sub-unit retrieves the parsing value of the alarm condition corresponding to the determined field;
[0116] The first alarm calculation subunit determines the first alarm calculation result corresponding to the alarm condition based on the parsed value of the alarm condition corresponding to the determined field and the threshold value of the alarm parameter in the alarm condition corresponding to the determined field.
[0117] The second alarm calculation subunit determines the second alarm calculation result based on the preset alarm condition calculation rules and the first alarm calculation result;
[0118] The alarm information generation subunit generates alarm information based on the second alarm calculation result.
[0119] This specification provides a data alarm device. First, a data input module acquires target data to be processed. Then, a target data view and alarm condition determination module determines the target data view corresponding to the target data from a pre-built list of data views based on the data source identifier of the target data. Based on the configuration information of the target data view, an alarm condition corresponding to the target data view is determined from a pre-configured list of alarm conditions. Finally, an alarm calculation module performs alarm processing on the target data based on the determined alarm conditions and the field paths of the fields in the target data view. By pre-building a list of data views and transforming data into corresponding data views, the data views can store the fields and their path information in semi-structured data, thereby structuring the semi-structured data. Combined with pre-configured alarm conditions, the semi-structured data can be directly calculated based on the determined alarm conditions and the field paths in the target data view, thus enabling alarms for the semi-structured data. This method of pre-building a list of data views and pre-configuring alarm conditions effectively improves the efficiency of data alarms. Since it eliminates the need for technical personnel to write corresponding data cleaning and processing logic, and also eliminates the need to create multiple tables for data storage, it further improves the efficiency of data alarms, especially for semi-structured data, and helps reduce user costs. Moreover, by transforming data into corresponding data views, semi-structured data can be structured, thereby expanding the scope of data utilization. Furthermore, because the data structure is pre-built and alarm conditions are pre-configured, when the data structure changes, the appropriate data view can be selected from the pre-built list, and suitable alarm conditions can be chosen from the pre-configured alarm conditions, making data alarms more flexible.
[0120] Those skilled in the art will understand that the above-described data alarm device can be used to implement the data alarm method described above. The detailed description therein should be similar to the method description above. To avoid being cumbersome, it will not be repeated here.
[0121] Based on the same idea, one or more embodiments of this specification also provide an electronic device, such as... Figure 8As shown. Electronic devices can vary considerably due to differences in configuration or performance, and may include one or more processors 301 and memory 302. Memory 302 may store one or more application programs or data. Memory 302 may be temporary or persistent storage. The application programs stored in memory 302 may include one or more modules (not shown), each module may include a series of computer-executable instructions for the electronic device. Furthermore, processor 301 may be configured to communicate with memory 302 and execute the series of computer-executable instructions in memory 302 on the electronic device. The electronic device may also include one or more power supplies 303, one or more wired or wireless network interfaces 304, one or more input / output interfaces 305, and one or more keyboards 306.
[0122] Specifically, in this embodiment, the electronic device includes a memory and one or more programs, wherein one or more programs are stored in the memory, and one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for use in the electronic device, and is configured to be executed by one or more processors. The one or more programs include computer-executable instructions for performing the following:
[0123] Obtain the target data to be processed;
[0124] Based on the data source identifier of the target data, determine the target data view corresponding to the target data from the pre-built list of data views, and based on the configuration information of the target data view, determine the alarm conditions corresponding to the target data view from the pre-configured alarm conditions. The target data view includes at least the fields of the target data and the field paths of the fields.
[0125] Based on the determined alarm conditions and the field paths of the fields in the target data view, alarm processing is performed on the target data.
[0126] One or more embodiments of this specification also provide a storage medium for storing computer-executable instructions that, when executed by a processor, implement the following process:
[0127] Obtain the target data to be processed;
[0128] Based on the data source identifier of the target data, determine the target data view corresponding to the target data from the pre-built list of data views, and based on the configuration information of the target data view, determine the alarm conditions corresponding to the target data view from the pre-configured alarm conditions. The target data view includes at least the fields of the target data and the field paths of the fields.
[0129] Based on the determined alarm conditions and the field paths of the fields in the target data view, alarm processing is performed on the target data.
[0130] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0131] For ease of description, the above apparatus is described by dividing it into various functional units. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in one or more software and / or hardware.
[0132] Those skilled in the art will understand that one or more embodiments of this specification can be provided as a method, system, or computer program product. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0133] This specification describes one or more embodiments of methods, apparatus (systems), and computer program products according to embodiments of this specification with reference to flowchart illustrations and / or block diagrams. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce a machine for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0134] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1The function specified in one or more boxes.
[0135] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0136] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0137] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0138] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0139] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0140] One or more embodiments of this specification can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a particular task or implement a particular abstract data type. This specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0141] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0142] The above description is merely one or more embodiments of this specification and is not intended to limit this application. Various modifications and variations can be made to the one or more embodiments of this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of one or more embodiments of this specification should be included within the scope of the claims of one or more embodiments of this specification.
Claims
1. A data alarm method, comprising: Obtain the target data to be processed; Based on the data source identifier of the target data, a target data view corresponding to the target data is determined from a pre-built list of data views, and based on the configuration information of the target data view, an alarm condition corresponding to the target data view is determined from a pre-configured list of alarm conditions. The target data view includes at least the fields of the target data and the field paths of the fields. Based on the determined alarm conditions and the field path of the field in the target data view, alarm processing is performed on the target data; The data view list includes data views built based on historical data, which contain the same data structure as the target data.
2. The method according to claim 1, wherein the target data includes: Structured or semi-structured data.
3. The method according to claim 1, further comprising: Obtain multiple historical data sets; Based on the data structure of the acquired historical data, each piece of historical data is converted into a corresponding data view, and the data view includes at least the fields of the corresponding historical data and the field paths of the corresponding historical data fields; Based on the data view of each of the historical data, construct the list of data views.
4. The method according to claim 1, wherein the view configuration information includes: The data view is associated with a data source identifier, a data source format, and field information for multiple fields contained in the data. The field information includes: field identifier, field data type, and field path.
5. The method according to claim 4, further comprising: Based on the field information of each field in each data view of the data view list, determine the value of the alarm parameter in the data corresponding to each data view. The alarm parameter is the object of alarm detection based on the alarm conditions. Based on the data type of each field in each data view, determine the threshold of the alarm parameter in the alarm condition corresponding to each field.
6. The method according to claim 5, wherein the data view corresponds to multiple alarm conditions, and the method further includes: Receive instructions to add alarm condition relationships; Configure the logical relationships between multiple alarm conditions based on the obtained instructions.
7. The method according to claim 5, wherein the step of performing alarm processing on the target data based on the determined alarm conditions and the field path of the field in the target data view includes: Based on the data source identifier of the target data view, determine the alarm conditions corresponding to the target data view, and determine the corresponding fields based on the alarm conditions; Based on the data source format of the target data view, determine the type of parser used to parse the determined fields; Based on the format generation algorithm, the data corresponding to the target data view is converted into corresponding data objects according to different data source formats; The data object and the field paths corresponding to the determined fields are input into the parser to obtain the parsed values; The target data is processed for alarms based on the parsed value and the threshold of the alarm parameter in the alarm conditions corresponding to the determined field.
8. The method according to claim 7, wherein the alarm processing of the target data based on the parsed value and the threshold of the alarm parameter in the alarm condition corresponding to the determined field includes: Obtain the parsed value of the alarm condition corresponding to the determined field; Based on the parsed value of the alarm condition corresponding to the determined field and the threshold value of the alarm parameter in the alarm condition corresponding to the determined field, determine the first alarm calculation result corresponding to the alarm condition; Based on the preset alarm condition calculation rules and the first alarm calculation result, determine the second alarm calculation result; Alarm information is generated based on the second alarm calculation result.
9. A data alarm device, comprising: The data input module acquires the target data to be processed. The target data view and alarm condition determination module determines the target data view corresponding to the target data from a pre-built list of data views based on the data source identifier of the target data, and determines the alarm conditions corresponding to the target data view from a pre-configured list of alarm conditions based on the configuration information of the target data view. The target data view includes at least the fields of the target data and the field paths of the fields. The alarm calculation module performs alarm processing on the target data based on the determined alarm conditions and the field path of the field in the target data view; The data view list includes data views built based on historical data, which contain the same data structure as the target data.
10. An electronic device, comprising: processor; as well as A memory configured to store computer-executable instructions, which, when executed, enable the processor to: Obtain the target data to be processed; Based on the data source identifier of the target data, a target data view corresponding to the target data is determined from a pre-built list of data views, and based on the configuration information of the target data view, an alarm condition corresponding to the target data view is determined from a pre-configured list of alarm conditions. The target data view includes at least the fields of the target data and the field paths of the fields. Based on the determined alarm conditions and the field path of the field in the target data view, alarm processing is performed on the target data; The data view list includes data views built based on historical data, which contain the same data structure as the target data.
Citation Information
Patent Citations
Data monitoring method and device, computer equipment and storage medium
CN116260702A