Method and system for screening and counting alarm logs of Internet of Things equipment of oil production plant based on multi-type database

By using a multi-type database method in the oil production plant, the historical and real-time alarm data of the Internet of Things equipment of the oil production plant is solved, and the problem of low processing efficiency of massive alarm data is realized, efficient data query and statistics are achieved, and real-time monitoring and Requirements for data analysis.

CN119396901APending Publication Date: 2025-02-07DAQING ANRUIDA TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411608100.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The prior art is difficult to effectively process the massive real-time alarm data generated by oil production plants connecting to IoT alarm equipment, resulting in low efficiency of historical alarm record query and statistical efficiency.

Method used

Using a multi-type database method, the separation of hot and cold alarm data is achieved by storing historical alarm data into a column-type database and real-time alarm data into a document-type database. This method includes the platform receiving historical alarm data and setting permissions, storing historical data into the corresponding column family of the column database, storing real-time alarm data into the corresponding real-time alarm data set, and drawing an alarm data table, setting a timeout time, according to The permission set determines whether the information entropy of the alarm frequency reaches the threshold. If it is reached, it will be grouped and aggregated and sent to the front end.

Benefits of technology

Real-time, accurate and efficient viewing and pushing of the alarm logs of the Internet of Things equipment of the oil production plant, improve the query efficiency and statistical efficiency of historical alarm records, and meet the needs of the oil production plant for real-time monitoring and data analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396901A_ABST
    Figure CN119396901A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system for screening and counting alarm logs of Internet of Things equipment of an oil production plant based on a multi-type database, and relates to the field of artificial intelligence. The problems that in the prior art, due to the fact that too many internet-of-things alarm devices and services are accessed to all oil extraction plants, and the stored data size is too large, the historical alarm record query efficiency is too low, and the statistical efficiency is low are solved. The method comprises the steps that a platform receives alarm data; storing the data into a corresponding column family of a column database according to the unique identification of the alarm data type; according to the unique identification of the alarm data type, the corresponding temporary data set is selected and stored, and timeout time is set; according to the key attributes and affiliation of the alarm data entity, the corresponding permission set is selected and stored; judging whether the alarm frequency reaches a threshold value or not; if the threshold value is not reached, the alarm is neglected; if so, judging whether the starting time is overtime or not; if the time is out, the set is emptied; if not, pushing an alarm to the corresponding user; the method is suitable for the technical field of multi-type database screening.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and system for screening and counting alarm logs of Internet of Things equipment in an oil production plant based on multi-type databases. Background Art

[0003] Since each oil production plant is connected to too many IoT alarm devices and services, and the equipment and services of the subordinate oil wells have a many-to-many relationship with the oil wells, a huge amount of real-time alarm data will be generated. When the traditional relational database is written at high concurrency, it will cause the overall system to freeze. In addition, due to the large amount of stored data, the query efficiency of historical alarm records is too low and the statistical efficiency is low. If a columnar database is used as a whole, it will be restricted by its various conditions. For example, group query and sorting must be highly dependent on Row Key, and modification operations cannot be performed based on any column. In addition, if each alarm is pushed to the client, a large amount of data will be sent to the page in a short period of time, which will reduce the user experience.

[0004] To sum up, in order to facilitate the security brigade of each oil production plant to view the alarm data in real time and combine the alarm log to carry out effective deployment and command of the security work of departments at all levels and their subordinate oil wells, this application proposes a method for screening and counting the alarm logs of oil production plant Internet of Things equipment based on multi-type databases. Summary of the invention

[0005] The present invention aims to solve the problem in the prior art that each oil production plant has too many IoT alarm devices and services connected to it, and the equipment and services of the subordinate oil wells have a many-to-many relationship with the oil wells, which will generate a large amount of real-time alarm data. Due to the huge amount of stored data, the efficiency of historical alarm record query is too low and the statistical efficiency is low.

[0006] To solve the above technical problems, the present invention is achieved through the following technical solutions:

[0007] Solution 1: The present invention proposes a method for screening and counting alarm logs of IoT equipment in oil production plants based on multi-type databases, the method comprising:

[0008] S1. The platform receives historical alarm data and sets permissions;

[0009] S2. According to the unique identifier of the historical alarm data type in S1, the historical data is stored in the corresponding column family of the column-based database;

[0010] S3. According to the unique identifier of the historical alarm data type in S1, the real-time alarm data is stored in the corresponding real-time alarm data set, and an alarm data table is drawn, and a timeout period is set;

[0011] S4. According to the key attributes and permissions of the real-time alarm data entity in S3, select and store the corresponding permission set;

[0012] S5. Based on the corresponding permission set stored in S4, determine whether the information entropy of the alarm frequency reaches the threshold. If it does not reach the threshold, ignore the alarm. If it reaches the threshold, send the statistical information entropy of the alarm frequency to the front end through group aggregation. Then determine whether the start time has timed out. If it has timed out, clear the set. If it has not timed out, transmit the alarm information to the corresponding user.

[0013] Furthermore, a preferred implementation is provided, in which a corresponding column family for storing historical data in a column-based database in S2 is a keyspace column family named alarm column-based database.

[0014] Furthermore, a preferred implementation is provided, wherein the corresponding real-time alarm data set is selected and stored in S3, and after the alarm data table is drawn, a step of creating a TTL index is also included.

[0015] Furthermore, a preferred implementation is provided, in which the created TTL index includes deleting the alarm data of each alarm table 1 minute ago, 10 minutes ago, 30 minutes ago, 1 hour ago, 8 hours ago and 24 hours ago.

[0016] Furthermore, a preferred implementation is provided, wherein S4 also includes a step of counting the information entropy of the first alarm time, the last alarm time, and the alarm frequency.

[0017] Furthermore, a preferred implementation is provided, wherein the method for counting the information entropy of the first alarm time, the last alarm time and the alarm frequency is grouped aggregation statistics.

[0018] Solution 2: A system for screening and counting alarm logs of IoT equipment in oil production plants based on multi-type databases, the system comprising:

[0019] Data collection module, used for the platform to receive historical alarm data and set permissions;

[0020] A historical data storage module, used to store historical data into a corresponding column family of a column-based database according to a unique identifier of the historical alarm data type in the data collection module;

[0021] The real-time alarm data collection module is used to store the real-time alarm data into the corresponding real-time alarm data collection according to the unique identifier of the historical alarm data type in the data collection module, draw the alarm data table, and set the timeout time;

[0022] The permission collection module is used to select and store the corresponding permission collection according to the key attributes and permissions of the real-time alarm data entity in the real-time alarm data collection module;

[0023] The threshold judgment module is used to judge whether the information entropy of the alarm frequency reaches the threshold based on the corresponding permission set stored in the permission set module. If the threshold is not reached, the alarm is ignored; if the threshold is reached, the statistical information entropy of the alarm frequency is sent to the front end through group aggregation; then it is judged whether the start time has timed out; if it has timed out, the set is cleared; if it has not timed out, the alarm information is transmitted to the corresponding user.

[0024] Solution three: a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of Solution one.

[0025] Solution 4: A computer device includes a memory and a processor, wherein the memory stores a computer program. When the processor runs the computer program stored in the memory, the processor executes any one of the methods described in Solution 1.

[0026] Solution 5: A computer program product is embedded with a computer program, and when the computer program is read, the method described in Solution 1 is implemented.

[0027] The present invention is beneficial in that:

[0028] The method and system described in the present invention for screening and counting alarm logs of IoT devices in oil production plants based on multi-type databases aims to view and push alarm log data of IoT devices in oil production plants in real time, accurately and efficiently for display or work guidance.

[0029] The method of the present invention sets different roles and permissions for each user of the platform. After the role is combined with the platform function, the corresponding functional permissions can be set for the logged-in user. Users with different permissions can view and receive alarm data according to the equipment and oil wells they belong to.

[0030] The present invention selects to create corresponding ard_alarm_xxx in the column-type database according to the alarm type to efficiently store and query the alarm data historically. According to different user needs, recent data is stored in multiple collections of the document-type database to facilitate efficient data statistics. That is, historical alarms are stored in the column-type database, and real-time data is stored in the document-type database, realizing the separation of hot and cold alarm data.

[0031] The present invention is also applicable to the technical field of multi-type database screening. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1This is a flow chart of a method for screening and counting alarm logs of IoT equipment in an oil production plant based on a multi-type database as described in Implementation Method 1. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solutions and advantages of the implementation methods of the present application clearer, the technical solutions in the implementation methods of the present application will be clearly and completely described below in conjunction with the drawings in the implementation methods of the present application. Obviously, the described implementation methods are only part of the implementation methods of the present application, not all of the implementation methods.

[0034] Implementation method 1: This implementation method provides a method for screening and counting alarm logs of IoT devices in an oil production plant based on a multi-type database, the method comprising:

[0035] S1. The platform receives historical alarm data and sets permissions;

[0036] S2. According to the unique identifier of the historical alarm data type in S1, the historical data is stored in the corresponding column family of the column-based database;

[0037] S3. According to the unique identifier of the historical alarm data type in S1, the real-time alarm data is stored in the corresponding real-time alarm data set, and an alarm data table is drawn, and a timeout period is set;

[0038] S4. According to the key attributes and permissions of the real-time alarm data entity in S3, select and store the corresponding permission set;

[0039] S5. Based on the corresponding permission set stored in S4, determine whether the information entropy of the alarm frequency reaches the threshold. If it does not reach the threshold, ignore the alarm. If it reaches the threshold, send the statistical information entropy of the alarm frequency to the front end through group aggregation. Then determine whether the start time has timed out. If it has timed out, clear the set. If it has not timed out, transmit the alarm information to the corresponding user.

[0040] Implementation method 2. This implementation method is a further limitation of the method for screening and counting alarm logs of IoT equipment in oil production plants based on multi-type databases as described in implementation method 1. In S2, the corresponding column family for storing historical data in the column-based database is a keyspace column family named alarm column-based database.

[0041] Implementation method three: This implementation method is a further limitation of the method for screening and counting alarm logs of IoT equipment in oil production plants based on multi-type databases as described in implementation method one. In S3, the corresponding real-time alarm data set is selected and stored, and after the alarm data table is drawn, the step of creating a TTL index is also included.

[0042] Implementation method 4. This implementation method is a further limitation of the method for screening and counting alarm logs of IoT equipment in oil production plants based on multi-type databases as described in implementation method 3. The created TTL index includes deleting the alarm data of each alarm table 1 minute ago, 10 minutes ago, 30 minutes ago, 1 hour ago, 8 hours ago and 24 hours ago.

[0043] Implementation method five: This implementation method further limits the method for screening and counting alarm logs of IoT equipment in oil production plants based on multi-type databases as described in implementation method one. S4 also includes a step of counting the information entropy of the first alarm time, the last alarm time and the alarm frequency.

[0044] Implementation method six: This implementation method is a further limitation of the method for screening and counting alarm logs of IoT equipment in oil production plants based on multi-type databases as described in implementation method five. The method for counting the information entropy of the first alarm time, the last alarm time and the alarm frequency is grouped aggregation statistics.

[0045] Implementation VII: This implementation proposes a system for screening and counting alarm logs of IoT devices in oil production plants based on multi-type databases, the system comprising:

[0046] Data collection module, used for the platform to receive historical alarm data and set permissions;

[0047] A historical data storage module, used to store historical data into a corresponding column family of a column-based database according to a unique identifier of the historical alarm data type in the data collection module;

[0048] The real-time alarm data collection module is used to store the real-time alarm data into the corresponding real-time alarm data collection according to the unique identifier of the historical alarm data type in the data collection module, draw the alarm data table, and set the timeout time;

[0049] The permission collection module is used to select and store the corresponding permission collection according to the key attributes and permissions of the real-time alarm data entity in the real-time alarm data collection module;

[0050] The threshold judgment module is used to judge whether the information entropy of the alarm frequency reaches the threshold based on the corresponding permission set stored in the permission set module. If the threshold is not reached, the alarm is ignored; if the threshold is reached, the statistical information entropy of the alarm frequency is sent to the front end through group aggregation; then it is judged whether the start time has timed out; if it has timed out, the set is cleared; if it has not timed out, the alarm information is transmitted to the corresponding user.

[0051] Embodiment 8: This embodiment proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method described in any one of embodiments 1 to 7 are implemented.

[0052] Embodiment 9. This embodiment proposes a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes the method described in any one of embodiments 1 to 7.

[0053] Embodiment 10: This embodiment proposes a computer program product embedded with a computer program, characterized in that when the computer program is read, the method described in embodiment 1 is implemented.

[0054] Implementation eleven: This implementation provides an example, which is used to explain the above implementations one to ten. The specific example is as follows:

[0055] See also Figure 1 To illustrate this embodiment, the present invention provides a method for screening and counting alarm logs of IoT devices in oil production plants based on multi-type databases, the method comprising the following steps:

[0056] S1: Enter device information into the platform and attach permissions;

[0057] S2: Create a keyspace named alarm in the column database;

[0058] S3: Under the alarm column space, create a Column Family named ard_alarm_xxx to store different alarm history data;

[0059] S4: Create a db named alarm in the document database;

[0060] S5: In the alarm database, create the following collection to store temporary data (xxx is the alarm type):

[0061] ard_alarm_xxx_1_min, ard_alarm_xxx_10_min, ard_alarm_xxx_30_min,

[0062] ard_alarm_xxx_1_hour, ard_alarm_xxx_8_hour, ard_alarm_xxx_24_hour;

[0063] S6: Create a TTL index in the alarm table in the alarm database, and delete the alarm data of each alarm table 1 minute ago, 10 minutes ago, 30 minutes ago, 1 hour ago, 8 hours ago, and 24 hours ago respectively;

[0064] S7: In the alarm database, create the following view (xxx is the alarm type):

[0065] ard_alarm_view_xxx_1_min, ard_alarm_view_xxx_10_min, ard_alarm_view_xxx_30_min,

[0066] ard_alarm_view_xxx_1_hour, ard_alarm_view_xxx_8_hour, ard_alarm_view_xxx_24_hour;

[0067] According to the key attributes of different alarm entities, the total number of alarms and the number of unchecked alarms in the statistical set are grouped and aggregated;

[0068] S8: In the alarm database, create a set ard_alarm_xxx_statistic_zzz_right (xxx is the alarm type, zzz is the department to which it belongs) to store the key attributes of the alarm entity to record the alarm time;

[0069] S9: In the alarm database, create a view ard_alarm_view_xxx_statistic_zzz_right (xxx is the alarm type, zzz is the department to which it belongs), which is used to count the information entropy of the first alarm time, the last alarm time and the alarm frequency according to the key attributes of the alarm entity;

[0070] S10: After the information entropy of the alarm frequency reaches a threshold, the statistical alarms are sent to the front end through group aggregation.

[0071] The present invention selects to create corresponding ard_alarm_xxx in the column database according to the alarm type to efficiently store and query the alarm data historically. According to different user needs, recent data is stored in multiple collections of the document database to facilitate efficient data statistics. That is, historical alarms are stored in the column database, and real-time data is stored in the document database to achieve the separation of hot and cold alarm data. The real-time data of each alarm is stored in ard_alarm_xxx_1_min, ard_alarm_xxx_10_min,

[0072] ard_alarm_xxx_30_min, ard_alarm_xxx_1_hour, ard_alarm_xxx_8_hour, ard_alarm_xxx_24_hour collections, and create TTL indexes in each collection to delete alarm data 1 minute ago, 10 minutes ago, 30 minutes ago, 1 hour ago, 8 hours ago, and 24 hours ago, respectively, to further improve query efficiency. Each collection will count the total and unviewed number of corresponding alarms in the corresponding view. According to the entity key attributes, first alarm time, second alarm time, and number of alarms of each alarm, they are recorded in the collection ard_alarm_xxx_statistic_zzz_right. The corresponding view is viewed in real time in a polling manner. When the information entropy of the alarm frequency displayed in the view reaches the threshold (the information entropy is greater than or equal to the set value, and the difference between the last alarm time and the first alarm time is less than or equal to the set duration), the statistical alarms are sent to the front end through group aggregation.

[0073] Figure 1Any process or method description in the flowchart described in or otherwise described herein can be understood as representing a module, fragment or portion of a code including one or more executable instructions for implementing the steps of a custom logic function or process, and the scope of the preferred embodiment of the present invention includes other implementations, in which the functions may be performed in a substantially simultaneous manner or in a reverse order according to the functions involved, which should be understood by a person skilled in the art of the present invention. The logic and / or steps represented in the flowchart or otherwise described herein illustrate the possible implementation architecture, functions and operations of the apparatus and methods according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for implementing the specified logic function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It is also noted that each block in the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions. For example, what may be considered as an ordered list of executable instructions for implementing a logical function may be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from and execute instructions in an instruction execution system, apparatus, or device).

[0074] Those skilled in the art will appreciate that the above are only preferred embodiments of the present invention, and the various embodiments of the present disclosure and / or the features described in the claims may be combined or combined in various ways, even if such combinations or combinations are not explicitly described in the present disclosure. It is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art may still modify the technical solutions described in the aforementioned embodiments, or perform equivalent substitutions on some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.

[0075] Although preferred embodiments of the present invention have been described, additional changes and modifications may be made to these embodiments by those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for screening and counting alarm logs of IoT equipment in oil production plants based on multi-type databases, characterized in that: The method comprises: S1. The platform receives historical alarm data and sets permissions; S2. According to the unique identifier of the historical alarm data type in S1, the historical data is stored in the corresponding column family of the column-based database; S3, according to the unique identifier of the historical alarm data type in S1, the real-time alarm data is stored in the corresponding real-time alarm data set, and an alarm data table is drawn, and a timeout period is set; S4. According to the key attributes and permissions of the real-time alarm data entity in S3, select and store the corresponding permission set; S5. Based on the corresponding permission set stored in S4, determine whether the information entropy of the alarm frequency reaches the threshold. If it does not reach the threshold, ignore the alarm. If it reaches the threshold, send the statistical information entropy of the alarm frequency to the front end through group aggregation. Then determine whether the start time has timed out. If it has timed out, clear the set. If it has not timed out, transmit the alarm information to the corresponding user.

2. The method for screening and counting alarm logs of IoT equipment in oil production plants based on multi-type databases according to claim 1 is characterized in that: The corresponding column family for storing historical data in the column-based database in S2 is the keyspace column family named alarm column-based database.

3. The method for screening and counting alarm logs of IoT equipment in oil production plants based on multi-type databases according to claim 1 is characterized in that: In S3, after selecting and storing the corresponding real-time alarm data set and drawing the alarm data table, a step of creating a TTL index is also included.

4. The method for screening and counting alarm logs of IoT equipment in oil production plants based on multi-type databases according to claim 3 is characterized in that: The created TTL index includes deleting the alarm data of each alarm table 1 minute ago, 10 minutes ago, 30 minutes ago, 1 hour ago, 8 hours ago and 24 hours ago.

5. The method for screening and counting alarm logs of IoT equipment in oil production plants based on multi-type databases according to claim 1 is characterized in that: S4 also includes a step of calculating the information entropy of the first alarm time, the last alarm time and the alarm frequency.

6. The method for screening and counting alarm logs of IoT equipment in oil production plants based on multi-type databases according to claim 5 is characterized in that: The method for counting the information entropy of the first alarm time, the last alarm time and the alarm frequency is grouped aggregation statistics.

7. A system for screening and counting alarm logs of IoT equipment in oil production plants based on multi-type databases, characterized in that: The system comprises: Data collection module, used for the platform to receive historical alarm data and set permissions; A historical data storage module, used to store historical data into a corresponding column family of a column-based database according to a unique identifier of the historical alarm data type in the data collection module; The real-time alarm data collection module is used to store the real-time alarm data into the corresponding real-time alarm data collection according to the unique identifier of the historical alarm data type in the data collection module, draw the alarm data table, and set the timeout time; The permission collection module is used to select and store the corresponding permission collection according to the key attributes and permissions of the real-time alarm data entity in the real-time alarm data collection module; The threshold judgment module is used to judge whether the information entropy of the alarm frequency reaches the threshold based on the corresponding permission set stored in the permission set module. If the threshold is not reached, the alarm is ignored; if the threshold is reached, the statistical information entropy of the alarm frequency is sent to the front end through group aggregation; then it is judged whether the start time has timed out; if it has timed out, the set is cleared; if it has not timed out, the alarm information is transmitted to the corresponding user.

8. A computer storage medium for storing a computer program, characterized in that: When the computer program is read by a computer, the computer executes the method implementation described in claim 1.

9. A computer device comprising a memory and a processor, characterized in that A computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes the method according to claim 1.

10. A computer program product, in which a computer program is embedded, characterized in that When the computer program is read, the method described in claim 1 is implemented.