Abnormality detection method and device applied to oil gas and pipe network site
By setting up data acquisition and transmission modules in oil and gas and pipeline sites, the abnormality of operational data can be initially judged, and data can be sent or temporarily stored in a timely manner. This solves the problem of insufficient data processing capacity of the operation and maintenance center and improves the timeliness of anomaly detection and network transmission efficiency.
Patent Information
- Application Number
- CN202411109339.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2026-02-13
AI Technical Summary
As the amount of operational data generated by oil and gas and pipeline sites increases, the data processing capacity of the operation and maintenance center reaches its limit, leading to a decrease in the timeliness of anomaly detection.
By setting up data acquisition and transmission modules in oil and gas and pipeline sites, it is possible to initially determine whether the operating data is abnormal. If the data meets the criteria, it is immediately sent to the operation and maintenance center; otherwise, it is temporarily stored in the data queue and sent when there is no data available, thus reducing the frequency of data transmission.
It reduces the real-time processing pressure on the operation and maintenance center, improves the timeliness of anomaly detection, and avoids processing delays caused by data redundancy.
Smart Images

Figure CN121520532A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of oil and gas and pipeline sites, and particularly relate to an abnormality detection method and device applied to oil and gas and pipeline sites. BACKGROUND
[0002] An oil and gas and pipeline site refers to a series of facilities for collecting, processing and distributing energy such as oil and natural gas. With the development of automation control technology, the automatic control system of the oil and gas and pipeline site is becoming more and more large, and the operation and maintenance workload is increasing synchronously.
[0003] In the related art, the oil and gas and pipeline site can be remotely operated and maintained by an operation and maintenance center. In the remote operation and maintenance, the oil and gas and pipeline site uploads its operation data to the operation and maintenance center, and the operation and maintenance center detects the operation data for abnormalities. When an abnormality is detected, the operation and maintenance center generates an abnormality message, which is used to remind the operation and maintenance personnel that the current site is running abnormally.
[0004] However, with the increase of operation data generated by the oil and gas and pipeline site, the data processing capacity of the operation and maintenance center will soon reach the limit, resulting in a decrease in data processing speed and affecting the immediacy of abnormality detection. SUMMARY
[0005] Embodiments of the present application provide an abnormality detection method and device applied to an oil and gas and pipeline site, which can reduce the immediate processing pressure of the operation and maintenance center and improve the immediacy of abnormality detection. The technical solution is as follows:
[0006] On the one hand, an abnormality detection method applied to an oil and gas and pipeline site is provided, and the method comprises:
[0007] obtaining operation data in the oil and gas and pipeline site;
[0008] in a case where the operation data meets a preset abnormality condition, immediately sending the operation data to an operation and maintenance center;
[0009] in a case where the operation data does not meet the preset abnormality condition, storing the operation data in a data queue; and in a case where the data queue meets a preset idle condition, sending the operation data in the data queue to the operation and maintenance center;
[0010] wherein the operation and maintenance center is configured to detect the operation data for abnormalities after receiving the operation data, and the abnormality detection is configured to detect the running condition of the oil and gas and pipeline site.
[0011] On the other hand, an abnormality detection device applied to an oil and gas and pipeline site is provided, and the device comprises:
[0012] a data acquisition module configured to acquire operation data in an oil and gas and pipeline site;
[0013] a first sending module configured to send the operation data to an operation and maintenance center in real time when the operation data meets a preset abnormal condition;
[0014] a second sending module configured to store the operation data in a data queue when the operation data does not meet the preset abnormal condition, and send the operation data in the data queue to the operation and maintenance center when the data queue meets a preset idle condition;
[0015] The operation and maintenance center is configured to perform abnormality detection on the operation data after receiving the operation data, and the abnormality detection is configured to detect an operation condition of the oil and gas and pipeline site.
[0016] In another aspect, a computer device is provided, which includes a processor and a memory, and the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement any of the above-mentioned abnormality detection methods applied to an oil and gas and pipeline site.
[0017] In another aspect, a computer readable storage medium is provided, and the storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by a processor to implement any of the above-mentioned abnormality detection methods applied to an oil and gas and pipeline site.
[0018] In another aspect, a computer program product or a computer program is provided, and the computer program product or the computer program includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform any of the above-mentioned abnormality detection methods applied to an oil and gas and pipeline site.
[0019] The technical scheme provided by the embodiments of the present application has at least the following beneficial effects:
[0020] For the operation data obtained from the oil and gas and pipeline site, first, the operation data is preliminarily judged according to the pre-set abnormal condition, when the operation data meets the abnormal condition, it is judged that the operation data belongs to abnormal data, at this time the operation data is sent to the operation and maintenance center in time, so that the operation and maintenance center can timely detect the abnormal data; when the operation data does not meet the abnormal condition, it is preliminarily judged that the operation data does not belong to abnormal data, at this time the operation data is temporarily stored in the data queue, and when idle, the operation data in the data queue is sent to the operation and maintenance center for abnormal detection, so as to avoid frequently sending data to the operation and maintenance center, thereby reducing the network transmission burden and the immediate processing pressure of the operation and maintenance center, so that the operation and maintenance center can concentrate resources to process key data in time, reduce the processing delay caused by data redundancy, and improve the immediacy of abnormal detection. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0022] Figure 1 is a schematic diagram of a computer system provided by an example embodiment of the present application;
[0023] Figure 2 is a flowchart of an abnormal detection method applied to an oil and gas and pipeline site provided by an example embodiment of the present application;
[0024] Figure 3 is a schematic diagram of an abnormal detection method applied to an oil and gas and pipeline site provided by an example embodiment of the present application;
[0025] Figure 4 is a flowchart of an abnormal detection method applied to an oil and gas and pipeline site provided by another example embodiment of the present application;
[0026] Figure 5 is an interactive flowchart of an abnormal detection system applied to an oil and gas and pipeline site provided by an example embodiment of the present application;
[0027] Figure 6 is a schematic diagram of an abnormal detection model provided by an example embodiment of the present application;
[0028] Figure 7 is a schematic diagram of a generative adversarial model provided by an example embodiment of the present application;
[0029] Figure 8FIG. 1 is a schematic diagram of an abnormality detection device applied to an oil and gas pipeline site according to an example embodiment of the present application;
[0030] Figure 9 FIG. 2 is a structural block diagram of a computer device according to an example embodiment of the present application. DETAILED DESCRIPTION
[0031] For the purposes of the present application, the technical solutions and advantages thereof will be more clearly understood from the following detailed description of the embodiments of the present application, taken in conjunction with the accompanying drawings. It is obvious that the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0032] In the present application, the terms "first", "second", and the like are used to distinguish between items or similar items having substantially the same function and action, and it should be understood that there is no logical or chronological dependency between "first" and "second", and the number and execution order are not limited.
[0033] An oil and gas pipeline site refers to a series of facilities for collecting, processing and distributing energy such as oil and natural gas. With the development of automatic control technology, the automatic control system of the oil and gas pipeline site is becoming more and more large, and the operation and maintenance workload is increasing synchronously. In the related technology, the oil and gas pipeline site can be remotely operated and maintained by an operation and maintenance center. The remote operation and maintenance requires the oil and gas pipeline site to upload its operation data to the operation and maintenance center, and then the operation and maintenance center detects the operation data for abnormalities. When an abnormality is detected, the operation and maintenance center generates an abnormality message, which is used to remind the operation personnel that the current site is running abnormally. However, with the increase of operation data generated by the oil and gas pipeline site, the data processing capacity of the operation and maintenance center will soon reach the limit, resulting in a decrease in data processing speed, thereby affecting the immediacy of abnormality detection.
[0034] Therefore, the embodiments of the present application provide an abnormality detection method for an oil and gas pipeline site, The following describes a computer system for implementing the anomaly detection method for oil and gas and pipeline sites. Figure 1
[0035] The following describes a flow for the anomaly detection method for oil and gas and pipeline sites. FIG. 2 is a structural block diagram of a computer device according to an example embodiment of the present application.
[0036] The first device 110 is a device for acquiring, transmitting and processing operation data in an oil and gas pipeline site. The first device 110 can be an electronic device such as a gateway, an integrated sensor, a terminal, etc. The embodiments of the present application do not limit the first device 110.
[0037] The first device 110 is implemented as a gateway or a terminal. The computer system can further include a sensor 130 connected to the first device 120 through a wireless network or a wired network.
[0038] The sensor 130 is a data acquisition device in the oil and gas pipeline site, which is responsible for real-time monitoring and acquisition of operation data in the site, and sending the operation data to the first device 110. After receiving the operation data, the first device 110 first determines whether the operation data meets the preset abnormal condition. If yes, the first device 110 immediately sends the operation data to the operation and maintenance center 120. If not, the first device 110 temporarily stores the operation data in a data queue and sends the operation data in the data queue to the operation and maintenance center 120 when idle.
[0039] In some embodiments, the first device 110 can be implemented as an integrated sensor. The integrated sensor has a communication module integrated therein. After acquiring the operation data, the integrated sensor determines whether the operation data meets the preset abnormal condition. If yes, the integrated sensor immediately sends the operation data to the operation and maintenance center 120 through the communication module. If not, the integrated sensor temporarily stores the operation data in a data queue and sends the operation data in the data queue to the operation and maintenance center 120 through the communication module when idle.
[0040] After receiving the operation data, the operation and maintenance center 120 performs abnormality detection on the operation data, so as to determine whether the oil and gas pipeline site is abnormal according to the operation data.
[0041] Optionally, the first device 110 and the operation and maintenance center 120 can interact through a server. The server can be a physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing basic cloud computing services, or a node in a blockchain system, etc. The embodiments of the present application do not limit the server.
[0042] Figure 2
[0043] In combination with the above description, Figure 1 is a flowchart of an abnormality detection method applied to an oil and gas pipeline site provided by the embodiments of the present application. The method is executed by a computer device, which can be the first device 110 as shown in 1. Numerical first operational data. The method includes the following steps 210 to 230.
[0044] Step 210, obtaining operation data in the oil and gas pipeline site.
[0045] The oil and gas pipeline site generally refers to the ground engineering facility of the oil and gas field, including the oil and gas pipeline and the site. The oil and gas pipeline is a pipeline system for transporting oil and gas, and the site is a place for processing, storing and transporting oil and gas, wherein the oil and gas generally refers to oil, natural gas and other energy sources.
[0046] The operation data is used to indicate the data generated when the facilities in the oil and gas pipeline site operate. Optionally, the operation data in the oil and gas pipeline site includes at least one of the following data:
[0047] (1) Pipeline operation data: including real-time operation parameters such as flow, pressure and temperature of the pipeline.
[0048] (2) Equipment operation data: refers to the operation state parameters of various equipment in the site, such as current, voltage, speed, vibration and other data of pump, compressor, valve and other equipment.
[0049] (3) Facility monitoring data: such as environmental temperature, humidity, gas (such as carbon dioxide) concentration and real-time operation image of the pipeline or equipment in the site.
[0050] It should be noted that the above examples of operation data are only illustrative, and the embodiments of the present application are not limited thereto.
[0051] Optionally, the operation data includes at least one of numerical data and image data. Illustratively, the numerical data refers to temperature, humidity, gas concentration, etc., and the image data refers to pipeline image, valve image, etc.
[0052] In some embodiments, the above operation data is data collected by a sensor. Illustratively, a sensor is installed in the oil and gas pipeline site, the operation data is collected by the sensor in real time, and the first device can obtain the operation data collected by the sensor.
[0053] Optionally, a plurality of sensors are installed in the oil and gas pipeline site, and the plurality of sensors include a plurality of types of sensors, and the types of operation data collected by different types of sensors are different.
[0054] Illustratively, the types of sensors installed in the oil and gas pipeline site include at least one of a temperature sensor, a humidity sensor, a smoke sensor, a camera, and the like. Among them, the temperature sensor is used to monitor the temperature conditions in the site, including the temperature of the fluid in the pipeline, the ambient temperature, and the like; the humidity sensor is used to measure the relative humidity in the environment; the smoke sensor is mainly used to measure the concentration of smoke particles in the environment; the camera as a video monitoring device is used to monitor the activities in the site, including personnel operation, equipment running state, environmental changes, and the like; the pressure sensor is used to monitor the pressure change in the pipeline in real time. The types of sensors and the running data collected by the embodiments of the present application are not limited, and will not be described here.
[0055] In some embodiments, the running data is obtained from the sensor every preset time interval.
[0056] Illustratively, the first device is configured to automatically obtain the running data from the sensor at a fixed time interval (i.e., a preset time interval), such as collecting data once every 15 minutes.
[0057] In other embodiments, the running data is obtained from the sensor upon receiving a data collection request.
[0058] Illustratively, the first device does not actively obtain data from the sensor, but waits to receive a data collection request from a user, other system, or central control room. When the request is received, the first device obtains the running data from the sensor.
[0059] Optionally, candidate running data corresponding to a plurality of sensors respectively is obtained, the plurality of sensors are used to collect the same running data; and the running data is determined based on the plurality of candidate running data.
[0060] Illustratively, in order to improve the reliability and accuracy of the collected running data, a plurality of sensors can be deployed in the site to collect the same running data, which can be located at different positions, have different accuracies or characteristics, and the like. The plurality of candidate running data is fused to obtain the final running data. For example, if the sensors have different accuracies, a weighted average method can be used, in which the weights are allocated according to the accuracy of the sensors (e.g., the higher the accuracy, the greater the weight). The plurality of candidate running data collected by sensors with different accuracies is weighted and fused to obtain the final running data.
[0061] Step 220, in the case that the running data meets the preset abnormal condition, the running data is immediately sent to the operation and maintenance center.
[0062] The preset abnormal condition is a preliminary abnormality determination condition set in advance, which is used to determine whether the running data is abnormal data. Illustratively, when it is preliminarily determined that the running data belongs to abnormal data, the running data is immediately sent to the operation and maintenance center for processing.
[0063] Optionally, different types of operation data correspond to different preset abnormal conditions. The following describes the case where the first operation data of a numerical type and the second operation data of an image type meet the preset abnormal conditions.
[0064] 2. Image-type second operational data.
[0065] In some embodiments, the operation data includes first operation data of a numerical type. Optionally, when the first operation data is outside a preset threshold range, the first operation data is immediately sent to the operation and maintenance center.
[0066] Illustratively, the preset threshold range refers to a normal numerical range of the first operation data. When the value of the first operation data of a numerical type collected is outside its corresponding preset threshold range, it can be preliminarily determined that the first operation data belongs to abnormal data, and then the first operation data is sent to the operation and maintenance center for further abnormal detection.
[0067] Optionally, different first operation data has different preset threshold ranges, wherein the preset threshold range is a numerical range preset by relevant personnel, or the preset threshold range is a numerical range obtained by statistical analysis of historical data.
[0068] Optionally, when the first operation data is outside the preset threshold range, the first operation data and the early warning information are immediately sent to the operation and maintenance center, wherein the early warning information performs abnormal warning in the operation and maintenance center, for example: a prominent warning window is popped up on the monitoring interface of the operation and maintenance center, displaying the early warning information, related operation data, etc.; a notification containing the early warning information is sent to the mobile phone or email of the operation and maintenance personnel; an operation order containing the early warning information and related operation data is automatically generated in the operation and maintenance center and assigned to the corresponding operation and maintenance personnel for processing, etc., which will not be described here.
[0069] Optionally, the above early warning information corresponds to a warning level, and the warning level indicates the severity of the abnormal situation of the operation data. Illustratively, the warning level is associated with the first operation data, and the more serious the abnormal situation indicated by the first operation data, the higher the warning level.
[0070] 1. Numerical first operational data.
[0071] In other embodiments, the operation data includes second operation data of an image type. Optionally, when the variation rate between the second operation data and the preset image is greater than a preset variation rate, the second operation data is immediately sent to the operation and maintenance center; wherein the variation rate is used to indicate the difference between the second operation data and the preset image.
[0072] Illustratively, when the difference between the collected image type second running data and the preset image is large, it can be preliminarily determined that the second running data belongs to abnormal data, and the second running data is sent to the operation and maintenance center for further abnormality detection.
[0073] The preset image refers to a normal image state corresponding to the second running data. Alternatively, the preset image is an image captured by the camera when no abnormality occurs, or the preset image refers to initial image data corresponding to the second running data. Taking a pipeline image as an example, the preset image is a pipeline image captured by the camera at the initial moment of station operation.
[0074] The variation rate refers to the proportion of the area of the difference region corresponding to the second running data to the total area of the preset image. The difference region refers to the region that has changed compared to the preset image.
[0075] Alternatively, the method for calculating the variation rate further comprises: performing difference detection on the preset image and the second running data to obtain a difference region; and calculating the area ratio between the difference region and the preset image as the variation rate between the preset image and the second running data.
[0076] Illustratively, before difference detection, the preset image and the second running data are preprocessed, such as grayscale, size adjustment, etc., to ensure that they are compared under the same conditions (such as the same size). After preprocessing, the difference between the second running data and the preset image is detected by a preset image processing method, wherein the preset image processing method includes at least one of pixel-level comparison, feature matching, image difference, etc. Taking image difference as an example, the difference between the pixel values of the two images is calculated to generate a difference image. The highlight region in the difference image usually represents the difference between the two images, i.e. the difference region. Then, the area ratio between the difference region and the preset image is calculated as the variation rate.
[0077] Alternatively, different second running data has different preset variation rates, wherein the preset variation rate is a ratio set by relevant personnel in advance, or the preset threshold range is a ratio obtained by statistical analysis of historical data.
[0078] Alternatively, the preset variation rate is determined according to the preset image size and the proportion of the object to be monitored when the change occurs. For example, when the image size is large, a lower preset variation rate is set, and when the image size is small, a higher preset variation rate is set. For example, when the monitored object (such as a pipeline) occupies a large area in the image, its change has a more significant impact on the overall image, and a relatively lower preset variation rate can be set. If the monitored object only occupies a very small area in the image, a higher preset variation rate is set.
[0079] Optionally, in a case where the variation rate between the second operation data and the preset image is greater than a preset variation rate, the second operation data and the early warning information are sent to the operation and maintenance center in real time.
[0080] Optionally, after the second operation data is subjected to noise processing, a variation rate between the second operation data subjected to noise processing and the preset image is calculated; in a case where the variation rate between the second operation data and the preset image is greater than a preset variation rate, the second operation data is sent to the operation and maintenance center in real time.
[0081] Illustratively, for the camera to acquire the image collected by the other image collection device, due to the complexity of the station yard environment, the image may be affected by factors such as light variation and camera shaking, thereby generating certain noise, and therefore the second operation data and the preset image can be subjected to noise reduction processing, thereby eliminating the image noise caused by light variation and camera shaking.
[0082] In some embodiments, before the above variation rate calculation is performed, the second operation data can also be matched with a preset abnormal scene. Then, the case where the second operation data meets the preset abnormal condition also includes the following case:
[0083] (1) In a case where the second operation data matches the preset abnormal scene, the second operation data is sent to the operation and maintenance center in real time.
[0084] Illustratively, if the matching is successful, it indicates that the second operation data belongs to abnormal data, and therefore the second operation data is sent to the operation and maintenance center for further abnormal detection.
[0085] Optionally, different second operation data corresponds to different preset abnormal scenes, and a single operation data can correspond to one or more preset abnormal scenes, wherein in a case where a single operation data corresponds to multiple preset abnormal scenes, the single operation data matches any one of the multiple preset abnormal scenes, and then the second operation data is sent to the operation and maintenance center in real time.
[0086] Illustratively, the second operation data can be implemented as a pipeline image, and the preset abnormal scene includes the presence of sparks, arcs or cracks. When it is identified that sparks, arcs or cracks appear in the second operation data, it is determined that the second operation data matches the preset abnormal scene.
[0087] The method for scene recognition of the second operation data can be implemented as a method based on a neural network model. Optionally, the scene recognition model is used to recognize the scene of the second operation data, to obtain a scene recognition result, and in a case where the scene recognition result matches the preset abnormal scene, the second operation data is sent to the operation and maintenance center in real time. The scene recognition model is a neural network model obtained by pre-training.
[0088] Illustratively, taking the pipeline image as an example, the training process of the scene recognition model is described, the pipeline images including normal state and pipeline images containing abnormal scenes such as sparks, arcs, cracks, etc. are collected; the collected image data is labeled to determine the scene to which the image belongs; a neural network model is selected, such as a convolutional neural network, a residual network, etc.; the image is input into the neural network model, the neural network model extracts the image feature representation corresponding to the image, and outputs the scene recognition result of the image based on the image feature representation; the neural network model is trained based on the difference between the scene recognition result and the image labeling result, and the scene recognition model is obtained.
[0089] After the scene recognition model is trained, the second running data to be recognized is input into the scene recognition model, and the scene recognition model can recognize the scene of the second running data, and if the scene belongs to the preset abnormal scene, it is determined that the second running data belongs to abnormal data.
[0090] Optionally, in the case that the second running data matches the preset abnormal scene, the second running data and the early warning information are sent to the operation and maintenance center in real time.
[0091] (2) In the case that the second running data does not match the preset abnormal scene, and the change rate between the second running data and the preset image is greater than the preset change rate, the second running data is sent to the operation and maintenance center in real time.
[0092] Illustratively, if the matching is unsuccessful, the change rate between the second running data and the preset image is calculated, and if the change rate is large, it means that the difference between the second running data and the preset image is large, and it can be determined that the second running data belongs to abnormal data, and the second running data is sent to the operation and maintenance center for further abnormal detection.
[0093] Step 230, in the case that the running data does not meet the preset abnormal condition, the running data is stored in the data queue; in the case that the data queue meets the preset idle condition, the running data in the data queue is sent to the operation and maintenance center.
[0094] Illustratively, when it is preliminarily determined that the running data does not belong to abnormal data, the running data can be temporarily stored in the data queue, and when the first device is idle, the running data in the data queue is sent to the operation and maintenance center for abnormal detection.
[0095] Next, the case that the numerical first running data and the image second running data do not meet the preset abnormal condition is introduced respectively.
[0096] 2. Image-type second operational data.
[0097] Optionally, the first operation data is stored into the data queue when the first operation data is within a preset threshold range.
[0098] Illustratively, when the value of the collected first operation data of the numerical type is within the corresponding preset threshold range, it is preliminarily determined that the first operation data belongs to normal data, and the first operation data is temporarily stored into the data queue.
[0099] Figure 3
[0100] Optionally, the second operation data is stored into the data queue when the variation rate between the second operation data and the preset image is less than or equal to a preset variation rate.
[0101] Illustratively, when the difference between the collected second operation data of the image type and the preset image is small, it is preliminarily determined that the second operation data belongs to normal data, and the second operation data is temporarily stored into the data queue.
[0102] In some embodiments, if the second operation data is matched with the preset abnormal scene before the above-mentioned variation rate calculation is performed, the second operation data is stored into the data queue when the second operation data does not match the preset abnormal scene, and the variation rate between the second operation data and the preset image is less than or equal to a preset variation rate.
[0103] Illustratively, if the matching is unsuccessful, the variation rate between the second operation data and the preset image is calculated again, and if the variation rate is small, it indicates that the difference between the second operation data and the preset image is small, and it is determined that the second operation data belongs to normal data, and the second operation data is temporarily stored into the data queue.
[0104] Optionally, it is determined that the second operation data does not match the preset abnormal scene when the scene recognition result does not match the preset abnormal scene. Illustratively, the second operation data to be recognized is input into a scene recognition model to obtain a scene to which the second operation data belongs, and if the scene does not belong to the preset abnormal scene, it is determined that the second operation data does not match the preset abnormal scene. When there are multiple preset abnormal scenes, if the scene to which the second operation data belongs does not belong to any of the multiple preset abnormal scenes, it is determined that the second operation data does not match the preset abnormal scene.
[0105] In some embodiments, the operation data corresponds to a priority, and the priority is used to determine the order of executing the sending task of the operation data.
[0106] Optionally, the priority of the operation data in the data queue is obtained when the data queue meets a preset idle condition, and the operation data in the data queue is sent to the operation and maintenance center in the order from high to low according to the priority.
[0107] Illustratively, the running data in the data queue is transmitted according to the preset priority when the first device is idle. Specifically, the priority of each running data in the data queue is obtained according to the preset priority list when the gateway is idle; and the running data in the data queue is transmitted to the operation and maintenance center in order from high to low priority. Alternatively, the priority list has only one, which includes the priority of the first running data of the numerical type and the second running data of the image type.
[0108] Alternatively, in the case where the number of running data in the data queue is greater than the preset number, the priority of the running data in the data queue is obtained; and the running data in the data queue is transmitted to the operation and maintenance center in order from high to low priority.
[0109] Illustratively, the preset number can be the amount of data that the first device can transmit at a time. When the first device cannot transmit the running data in the data queue at a time, the running data is transmitted in order according to the priority; if the number of running data in the data queue is less than or equal to the preset number, it can be transmitted at a time without the need for transmission in order according to the priority. When the running data in the data queue is transmitted to the operation and maintenance center in order from high to low priority, the amount of running data transmitted at a time is less than or equal to the preset data.
[0110] The above-mentioned preset idle condition indicates that the first device is in an idle state.
[0111] Alternatively, a blank task corresponding to the data queue is created, and the priority of the blank task is lower than the priority of the transmission task of the running data in the data queue; in the case where the blank task is executed, the priority of the running data in the data queue is obtained.
[0112] Illustratively, in order to determine when the first device is idle, a blank task can be created in the first device, and the priority of the blank task is set to the lowest; when it is detected that the blank task is executed, it is judged that the first device is idle, that is, when it is detected that the blank task is executed, the data queue meets the preset idle condition, and the running data in the data queue is transmitted to the operation and maintenance center.
[0113] The operation and maintenance center is used to detect the running condition of the oil and gas and pipeline site based on the running data after receiving the running data.
[0114] Alternatively, the operation and maintenance center is used to input the running data into an anomaly detection model and output an anomaly probability as an anomaly detection result after receiving the running data. In the case where the anomaly probability is greater than a preset probability, the running data indicates that the oil and gas and pipeline site is running abnormally; in the case where the anomaly probability is less than or equal to the preset probability, the running data indicates that the oil and gas and pipeline site is running normally.
[0115] Illustratively, the anomaly detection model is a dual-channel neural network model. The running data is input into the anomaly detection model, and a first feature representation and a second feature representation corresponding to the running data are extracted. The first feature representation is predicted by the anomaly detection model to obtain a first anomaly probability. The second feature representation is predicted by the anomaly detection model to obtain a second anomaly probability. The first anomaly probability and the second anomaly probability are weighted and fused to obtain a target probability as the anomaly probability.
[0116] The first feature representation and the second feature representation are different, and reflect different aspects of the running data, such as periodicity and trend of time series, or spatial distribution and correlation of data. The dual-channel neural network model includes a dual-channel convolutional neural network, and the embodiments of the present application do not limit this.
[0117] Optionally, the anomaly detection model is a neural network model trained by sample data. The sample data includes virtual abnormal data, historical abnormal data, and historical normal data. The historical abnormal data is data generated when the oil and gas and pipeline site are running abnormally in a historical period. The historical normal data is data generated when the oil and gas and pipeline site are running normally in a historical period. The virtual abnormal data is virtual running data generated by a generative adversarial model to indicate that the oil and gas and pipeline site are running abnormally.
[0118] Illustratively, the virtual abnormal data of the site obtained according to the generative adversarial model is because there is less abnormal data in the actual historical data, or the type of abnormal data is less, such as temperature anomaly. Thus, the accuracy of the anomaly detection model trained in this way is higher when identifying temperature anomaly, but cannot guarantee the accuracy when identifying other anomalies. Therefore, the generative adversarial model is used to generate virtual abnormal data to improve the generalization ability of the model.
[0119] It should be noted that the training process of the anomaly detection model and the generative adversarial model will be described in detail in the embodiments below, which will not be repeated here.
[0120] In some embodiments, the operation and maintenance center includes a digital twin model of the oil and gas and pipeline site. The operation and maintenance center is also used to perform an abnormal prompt at a corresponding position in the digital twin model when it is detected that the running data is abnormal data.
[0121] Illustratively, the digital twin model is a highly integrated virtual system that is a precise digital reproduction of the oil and gas pipeline site. In this model, all key features, behavior patterns, and interactions with the environment of the oil and gas pipeline site are accurately simulated and presented. The operation and maintenance center realizes real-time monitoring of the running state of the site by receiving real-time running data from the site, inputting the data into the digital twin model. When abnormal data is detected, the operation and maintenance center will give an abnormal prompt at the corresponding position in the digital twin model. This prompt is intuitive and accurate, which helps the operation and maintenance personnel quickly locate the problem and take appropriate measures.
[0122] In summary, the application embodiment provides an application and an abnormality detection method for an oil and gas pipeline site. For running data obtained from the oil and gas pipeline site, the running data is first preliminarily judged for abnormality according to a pre-set abnormality condition. When the running data meets the abnormality condition, it is judged that the running data is abnormal data. At this time, the running data is immediately sent to the operation and maintenance center to ensure that the operation and maintenance center can timely detect the abnormality of the abnormal data. When the running data does not meet the abnormality condition, it is preliminarily judged that the running data is not abnormal data. At this time, the running data is temporarily stored in a data queue. When idle, the running data in the data queue is sent to the operation and maintenance center for abnormality detection. This avoids frequent sending of data to the operation and maintenance center, thereby reducing the network transmission burden and the immediate processing pressure of the operation and maintenance center. The operation and maintenance center can concentrate resources to immediately process key data, reduce processing delay caused by data redundancy, and improve the immediacy of abnormality detection.
[0123] Illustratively, a gateway implemented by a computer device is taken as an example for description. Please refer to Figure 4 which shows a schematic diagram of an abnormality detection method applied to an oil and gas pipeline site. The method includes the following steps:
[0124] Step 301: judging the data type of the running data.
[0125] After receiving the running data in the oil and gas pipeline site collected from the sensor, the gateway first judges the data type of the running data.
[0126] Step 302: in the case that the running data is numerical data, judging whether the running data is in the corresponding threshold range.
[0127] If the gateway judges that the running data is numerical data, it further judges whether the value of the numerical data is in the corresponding threshold range. The numerical data such as temperature, humidity, and carbon dioxide concentration, and the threshold range corresponding to the numerical data are stored in the gateway.
[0128] Step 303, if the running data is not in the corresponding threshold range, immediately send the running data and an abnormal warning to the operation and maintenance center.
[0129] If the gateway determines that the value of the numerical data is not in the corresponding threshold range, it immediately determines that an abnormality has occurred and immediately sends the running data and an abnormal warning to the operation and maintenance center.
[0130] Step 304, if the running data is in the corresponding threshold range, the running data does not need to be immediately sent and is placed in the data queue.
[0131] If the gateway determines that the value of the numerical data is in the corresponding threshold range, it determines that the running data does not need to be immediately sent and places the numerical data in the data queue.
[0132] Step 305, in the case where the running data is image data, determine whether the running data has a preset scene.
[0133] If the gateway determines that the running data is image data, it further determines whether a preset scene has occurred in the running data. Taking a pipeline image as an example, the preset scene refers to the occurrence of sparks, arcs, or cracks. Determining whether a preset scene has occurred in the running data is equivalent to determining whether sparks, arcs, cracks, or the like have occurred in the running data.
[0134] Step 303, if the running data has a preset scene, immediately send the running data and an abnormal warning to the operation and maintenance center.
[0135] If a preset scene has occurred in the running data, for example, sparks, arcs, cracks, or the like have occurred in the pipeline image, it is immediately determined that an abnormality has occurred and the running data and an abnormal warning are immediately sent to the operation and maintenance center.
[0136] Step 306, if the running data does not have a preset scene, calculate the variation rate.
[0137] If a preset scene has not occurred in the running data, for example, sparks, arcs, cracks, or the like have not occurred in the pipeline image, the variation rate of the running data is further calculated. The variation rate refers to the proportion of the area of the running data that has changed compared to the total area of the standard image. The standard image is generally an image collected at the initial running of the station, such as a pipeline image collected at the initial running of the station.
[0138] Step 304, in the case where the variation rate is less than or equal to a preset ratio, the running data does not need to be immediately sent and is placed in the data queue.
[0139] If the variation rate is less than or equal to a preset ratio, such as 10%, it is determined that the running data does not need to be immediately sent and is placed in the data queue.
[0140] Step 307, if the variation rate is less than or equal to the preset rate, the operation data is immediately sent to the operation and maintenance center.
[0141] If the variation rate is greater than the preset rate, such as 10%, it is determined that the operation data needs to be immediately sent. Since most of the images to be monitored do not change (i.e., the monitoring object, such as a pipeline, does not change), under normal circumstances, the image does not change much, so when the variation rate is greater than the preset rate, it indicates that the monitoring object has a large change at this time, and the gateway cannot determine it due to processing capacity, and can only be immediately sent to the operation and maintenance center for determination by the operation and maintenance center.
[0142] Step 308, when the gateway is idle, the operation data in the data queue is sent to the operation and maintenance center.
[0143] When the gateway is idle, the operation data in the data queue is sent to the operation and maintenance center.
[0144] Among them, the messages in the data queue are sent according to the preset priority when the gateway is idle. Specifically, the priority of each operation data in the data queue is obtained according to the preset data priority list when the gateway is idle; the operation data in the data queue is sent to the operation and maintenance center in order from high to low according to the priority. The priority list only has one, including the priority of numerical data and image data. Of course, the priority is generally used when the data in the data queue is more and the gateway cannot transmit all at once. If the data in the data queue is less, it can be transmitted directly at one time, and there is no need to sort according to the priority.
[0145] In order to determine when the gateway is idle, a blank task can be created in the gateway, and the execution priority of the blank task is set to the lowest; when it is detected that the blank task is executed, it is determined that the gateway is idle, that is, when it is detected that the blank task is executed, the data in the data queue is immediately sent.
[0146] In some embodiments, the operation data obtained by the computer device from the oil and gas pipeline site is real-time operation data, and when determining whether the real-time operation data meets the preset abnormal condition, the computer device obtains the abnormal detection result of the operation data by the operation and maintenance center in the historical time period, so as to determine the preset abnormal condition of the real-time operation data according to the abnormal detection result of the historical operation data. Illustratively, please refer to Figure 2 The above The following describes an anomaly detection system for oil and gas and pipeline sites. The embodiments shown in the above can also be implemented as steps 401 to 405.
[0147] Step 401, obtaining real-time operation data in an oil and gas pipeline site.
[0148] Illustratively, the first device obtains real-time operation data from the sensor.
[0149] At step 402, the abnormality detection result of the historical operation data by the operation and maintenance center is obtained.
[0150] The historical operation data indicates operation data generated by the oil and gas and the pipeline site in a historical time period.
[0151] Illustratively, when the first device obtains the operation data, for example, the site environment temperature, the gateway obtains the abnormality detection result of the site environment temperature by the operation and maintenance center in the historical time period.
[0152] At step 403, the preset abnormality condition corresponding to the real-time operation data is determined based on the abnormality detection result.
[0153] Optionally, the candidate abnormality condition corresponding to the real-time operation data is adjusted based on the abnormality detection result to obtain the preset abnormality condition corresponding to the real-time operation data. The candidate abnormality condition is a preset reference condition indicating that the operation data is normal data.
[0154] Taking the first operation data realized as a numerical value as an example, illustratively, if the first operation data is the environment temperature, assuming that the candidate threshold range corresponding to the environment temperature is 25 degrees to 30 degrees, if the operation and maintenance center determines that the historical environment temperature of 30 degrees, 25 degrees and 35 degrees is normal data, the candidate threshold range corresponding to the environment temperature can be adjusted to 25 degrees to 32 degrees or 25 degrees to 35 degrees, etc. The adjusted candidate threshold range is used as the preset threshold range, and then the real-time obtained first operation data is judged for abnormality through the preset threshold range.
[0155] Taking the second operation data realized as an image as an example, illustratively, if the second operation data is a pipeline image, assuming that the candidate variation rate corresponding to the pipeline image is 15%, if the operation and maintenance center determines that the historical variation rate of 15%, 17% and 18% is normal data, the candidate variation rate corresponding to the pipeline image can be adjusted to 17%, and the adjusted candidate variation rate is used as the preset variation rate, and then the real-time obtained second operation data is judged for abnormality through the preset variation rate.
[0156] At step 404, in the case that the real-time operation data meets the preset abnormality condition, the real-time operation data is immediately sent to the operation and maintenance center.
[0157] Illustratively, when the real-time operation data is preliminarily determined to be abnormal data according to the preset abnormality condition, the real-time operation data is immediately sent to the operation and maintenance center for processing.
[0158] Step 405, in the case that the real-time running data does not meet the preset abnormal condition, the real-time running data is stored to the data queue; in the case that the data queue meets the preset idle condition, the running data in the data queue is sent to the operation and maintenance center.
[0159] Illustratively, when it is preliminarily determined according to the preset abnormal condition that the real-time running data does not belong to abnormal data, the real-time running data can be temporarily stored in the data queue, and the running data in the data queue is sent to the operation and maintenance center when the first device is idle, for abnormality detection.
[0160] The operation and maintenance center is configured to perform abnormality detection on the running data after receiving the running data, and the abnormality detection is configured to detect the running condition of the oil and gas and pipeline site based on the running data.
[0161] In summary, the abnormality detection method applied to the oil and gas and pipeline site provided by the embodiments of the present application can determine that the real-time running data belongs to abnormal data when the real-time running data meets the preset abnormal condition, and the real-time running data is sent to the operation and maintenance center in time to ensure that the operation and maintenance center can perform abnormality detection on the abnormal data in time; when the real-time running data does not meet the abnormal condition, it is preliminarily determined that the real-time running data does not belong to abnormal data, and the real-time running data is temporarily stored in the data queue, and the running data in the data queue is sent to the operation and maintenance center for abnormality detection when it is idle, so as to avoid frequently sending data to the operation and maintenance center, thereby reducing the network transmission burden and the immediate processing pressure of the operation and maintenance center, enabling the operation and maintenance center to concentrate resources to process critical data in time, reducing the processing delay caused by data redundancy, and improving the timeliness of abnormality detection. In addition, the preset abnormal condition for determining whether the real-time running data belongs to abnormal data is determined according to the abnormality detection result of the historical running data, so as to dynamically adjust the preset abnormal condition according to the site running environment, reduce the false alarm and missed alarm, and improve the accuracy of abnormality determination of the running data.
[0162] Figure 5
[0163] Figure 6 is an interactive flowchart of an abnormality detection system applied to an oil and gas and pipeline site provided by an embodiment of the present application. The abnormality detection system comprises a sensor, a gateway and an operation and maintenance center, and the abnormality detection method performed by the system comprises the following steps 501 to 507.
[0164] Step 501, the sensor collects running data in the oil and gas and pipeline site in real time.
[0165] The sensor is various, such as a temperature sensor, a humidity sensor, a smoke sensor, a camera, etc., and is arranged at a corresponding position of the site.
[0166] Step 502, the sensor sends the operation data to the gateway.
[0167] Optionally, after the sensor collects the operation data, the operation data is sent to the gateway at a timing.
[0168] Step 503, the gateway receives the operation data and judges whether the operation data meets the preset abnormal condition.
[0169] Illustratively, after the gateway receives the operation data, it preliminarily judges whether the station yard is abnormal according to the preset abnormal condition corresponding to the operation data.
[0170] In some embodiments, the gateway receives first operation data of a numerical value type; acquires a preset threshold range corresponding to the first operation data; and judges whether the first operation data is within the preset threshold range.
[0171] In some embodiments, the gateway receives second operation data of an image type; acquires a preset variation rate corresponding to the second operation data; and judges whether a variation rate between the second operation data and a preset image is greater than the preset variation rate, wherein the variation rate is used to indicate a difference between the second operation data and the preset image.
[0172] Optionally, before acquiring the preset variation rate corresponding to the second operation data, the gateway judges whether the second operation data matches a preset abnormal scene.
[0173] Step 504, the gateway sends the operation data to the operation and maintenance center in the case that the operation data meets the preset abnormal condition.
[0174] In some embodiments, the gateway sends the first operation data to the operation and maintenance center in the case that the first operation data is outside the preset threshold range.
[0175] In some embodiments, the gateway sends the second operation data to the operation and maintenance center in the case that the variation rate between the second operation data and the preset image is greater than the preset variation rate.
[0176] Optionally, if the gateway judges whether the second operation data matches the preset abnormal scene before acquiring the preset variation rate corresponding to the second operation data, then: the gateway sends the second operation data to the operation and maintenance center in the case that the second operation data matches the preset abnormal scene; or the gateway sends the second operation data to the operation and maintenance center in the case that the second operation data does not match the preset abnormal scene and the variation rate between the second operation data and the preset image is greater than the preset variation rate.
[0177] Step 505, the gateway stores the operation data to a data queue in the case that the operation data does not meet the preset abnormal condition.
[0178] In some embodiments, the gateway stores the first operation data to the data queue if the first operation data is within a preset threshold range.
[0179] In some embodiments, the gateway sends the second operation data to the operation and maintenance center in real time if a variation rate between the second operation data and the preset image is greater than a preset variation rate.
[0180] Optionally, if the gateway determines whether the second operation data matches the preset abnormal scenario before obtaining the preset variation rate corresponding to the second operation data, the gateway stores the second operation data to the data queue if the second operation data does not match the preset abnormal scenario and a variation rate between the second operation data and the preset image is less than or equal to the preset variation rate.
[0181] In step 506, the gateway sends the operation data in the data queue to the operation and maintenance center if the data queue meets a preset idle condition.
[0182] Optionally, the gateway obtains a priority of the operation data in the data queue if the data queue meets the preset idle condition, and sends the operation data in the data queue to the operation and maintenance center according to a priority from high to low.
[0183] Optionally, the gateway creates a blank task corresponding to the data queue, and a priority of the blank task is lower than a priority of a sending task of the operation data in the data queue, and obtains the priority of the operation data in the data queue if the blank task is executed.
[0184] In step 507, the operation and maintenance center receives the operation data and performs abnormality detection on the operation data.
[0185] Optionally, the operation and maintenance center inputs the operation data into an abnormality detection model and outputs an abnormality probability as an abnormality detection result after receiving the operation data, and the operation data indicates that the oil and gas and pipeline site operation is abnormal if the abnormality probability is greater than a preset probability, and the operation data indicates that the oil and gas and pipeline site operation is normal if the abnormality probability is less than or equal to the preset probability.
[0186] For illustration, refer to Figure 7As shown in FIG. 6, which shows a schematic diagram of an anomaly detection model, the anomaly detection model 600 is a neural network model with two channels. The operation and maintenance center inputs the running data into the anomaly detection model. The first channel extracts the first feature representation corresponding to the running data, and the first feature representation is predicted to obtain the first anomaly probability. The second channel extracts the second feature representation corresponding to the running data, and the second feature representation is predicted to obtain the second anomaly probability. The first anomaly probability and the second anomaly probability are weighted and fused based on the first weight corresponding to the first anomaly probability and the second weight corresponding to the second anomaly probability to obtain the target probability as the anomaly probability. When the target probability is greater than 50%, it is determined that the running data is abnormal data; when the target probability is less than or equal to 50%, it is determined that the running data is normal data.
[0187] Optionally, the anomaly detection model is a neural network model trained by sample data; wherein the sample data includes virtual abnormal data, historical abnormal data and historical normal data, the historical abnormal data is data generated when the oil and gas and pipeline site is running abnormally in a historical period, and the historical normal data is data generated when the oil and gas and pipeline site is running normally in a historical period.
[0188] Optionally, the anomaly detection model training process is as follows: virtual abnormal data of the site is obtained according to the generative adversarial model; historical abnormal data and historical normal data are obtained from the historical data uploaded by the gateway, the historical abnormal data is data when the site is abnormal, and the historical normal data is data when the site is normal; part of the virtual abnormal data, the abnormal data and the normal data are used as training samples, and the rest of the virtual abnormal data, the abnormal data and the normal data are used as test samples; a neural network model including two channels is used as an initial anomaly detection model, the training samples are input into the initial anomaly detection model for training, and the test samples are used for testing until the accuracy reaches a preset value, and the anomaly detection model is obtained, wherein the convolution kernels of the two channels of the neural network model are different, each channel can obtain an anomaly probability of the input data being abnormal, and the final probability is obtained by multiplying the anomaly probabilities output by the two channels by the weights of the corresponding channels. If the anomaly probability is greater than 50%, it is determined that the input data is abnormal, and if the anomaly probability is not greater than 50%, it is determined that the input data is normal. Due to the different convolution kernels, the neural network model with two channels can obtain the features of the input data from two dimensions, ensuring the comprehensiveness of the features of the input data and avoiding the loss of some important data features when only one dimension is used for judgment. The final weighted sum can improve the accuracy of the judgment. It should be noted that the weights of the initial two channels are 0.5, so when training, not only the network parameters of the two channels are adjusted, but also the weights of each channel are adjusted.
[0189] The virtual abnormal data is virtual operation data indicating oil and gas and pipeline site operation abnormality generated by the generative adversarial model.
[0190] The generative adversarial model is composed of two mutually opposing parts, a generator G and a discriminator D, and can be expressed by the following formula:
[0191]
[0192] P data is a real data distribution, P z is a false data distribution, V(D, G) represents the difference between real samples and generated samples, z represents noise data, E(.) represents an expectation function, G(.) represents a generator function, and D(.) represents a discriminator function.
[0193] The generative adversarial model often has unstable training and poor robustness in actual training, and the training of the model depends on the hyperparameter adjustment of the generator and the discriminator. If there is no index to quantify the progress of the training, the model will collapse, so the application adopts a gradient penalty method to improve the weight clipping, directly constrains the gradient norm of the discriminator output according to the input of the discriminator, realizes Lipschitz constraint, solves the problem of gradient disappearance or explosion, has faster convergence speed and higher stability, and the loss function of the discriminator can be expressed as:
[0194]
[0195] The loss function of the generator can be expressed as:
[0196] V(G)=1-D(G(z))
[0197] wherein p is a constant, and 10 is usually taken. P g and P r are two distributions, represents random interpolation sampling on the line connecting x r and x g , x r obeys the P r distribution, z represents noise data, E(.) represents an expectation function, G(.) represents a generator function, and D(.) represents a discriminator function.
[0198] In the training process of the generative adversarial model, L and V(G) are iteratively reduced to optimize the parameters of the discriminator and the generator, respectively.
[0199] Optionally, the process of generating the virtual operation data indicating oil and gas and pipeline site operation abnormality by the generative adversarial model includes: constructing a generative adversarial model, the generative adversarial model including a generator and a discriminator, and illustratively, please refer toFigure 8 The generator 710 includes 4 hidden layers, and the number of neurons of each hidden layer from front to back is 256, 128, 64 and 1 in sequence; the first hidden layer and the second hidden layer are full connection layers, and ReLU activation functions are used; the third hidden layer is a one-dimensional deconvolution, and a ReLU activation function is used; and the fourth hidden layer is a one-dimensional deconvolution, and a Tanh activation function is used. The discriminator 720 of the generative adversarial model includes 4 hidden layers, and the number of neurons of each hidden layer from front to back is 64, 128, 256 and 1 in sequence; the first hidden layer and the second hidden layer are one-dimensional convolution layers, and ReLU activation functions are used; the third hidden layer is a full connection layer, and the activation function is ReLU; and the fourth hidden layer is a full connection layer, and no activation function is used.
[0200] Random data is input into the generator 710 to generate virtual abnormal data, the abnormal data and the generated virtual abnormal data are selected and input into the discriminator for discrimination, so that the generative adversarial model is trained according to the discrimination result, and the parameters of each hidden layer of the generator and the discriminator are updated in the training process until the loss functions (that is, L and V(G) described above) of the discriminator and the generator tend to converge, and the final generative adversarial model is obtained.
[0201] After the final generative adversarial model is obtained, the abnormal data is input into the generator of the generative adversarial model to obtain virtual abnormal data.
[0202] In some embodiments, the digital twin model of the oil and gas and pipeline site is included in the operation and maintenance center, and the operation and maintenance center performs an abnormal prompt at a corresponding position in the digital twin model when detecting that the running data is abnormal data.
[0203] In summary, the abnormality detection method applied to the oil and gas and pipeline site provided in the embodiments of the present application, after the gateway obtains the running data, first performs a preliminary judgment on the running data, that is, for data that is convenient to judge, the gateway directly judges at the gateway, which is convenient for timely detection of abnormalities. For data that cannot be directly judged for abnormalities, the gateway judges whether the data is urgent, if so, it is immediately sent, and if not, it is put into a data queue and sent when idle. It ensures that urgent data can be sent in time, and non-urgent data can be sent when idle, reducing the requirement for real-time transmission capacity, ensuring timely detection of abnormalities, facilitating timely response of the operation and maintenance system, greatly improving the intelligent operation and maintenance rate of the oil and gas and pipeline site, and promoting the digital transformation of the operation and maintenance of the oil and gas and pipeline site. And the operation and maintenance center uses the digital twin model to clearly and intuitively show the position where the abnormality occurs when the abnormality occurs, facilitating rapid positioning of the abnormality and rapid determination of the influence of the abnormality according to the digital twin model.
[0204] For illustration purposes, please refer to Figure 9As shown in FIG. 1, which shows a schematic diagram of an abnormality detection device applied to an oil and gas and pipeline site, the device comprises the following modules:
[0205] A data acquisition module 810 is configured to acquire operation data in the oil and gas and pipeline site.
[0206] A first sending module 820 is configured to send the operation data to an operation and maintenance center in real time if the operation data meets a preset abnormality condition.
[0207] A second sending module 830 is configured to store the operation data in a data queue if the operation data does not meet the preset abnormality condition, and send the operation data in the data queue to the operation and maintenance center if the data queue meets a preset idle condition.
[0208] The operation and maintenance center is configured to perform abnormality detection on the operation data after receiving the operation data, and the abnormality detection is configured to detect the operation of the oil and gas and pipeline site.
[0209] In some embodiments, the operation data comprises first operation data of a numerical type; the first sending module 820 is configured to send the first operation data to the operation and maintenance center in real time if the first operation data is outside a preset threshold range; and the second sending module 830 is configured to store the first operation data in the data queue if the first operation data is within the preset threshold range.
[0210] In some embodiments, the operation data comprises second operation data of an image type; the first sending module 820 is configured to send the second operation data to the operation and maintenance center in real time if a variation rate between the second operation data and a preset image is greater than a preset variation rate; the variation rate is configured to indicate a difference between the second operation data and the preset image; and the second sending module 830 is configured to store the second operation data in the data queue if the variation rate between the second operation data and the preset image is less than or equal to the preset variation rate.
[0211] In some embodiments, the first sending module 820 is configured to send the second operation data to the operation and maintenance center in real time if the second operation data matches a preset abnormal scenario; the first sending module 820 is configured to send the second operation data to the operation and maintenance center in real time if the second operation data does not match the preset abnormal scenario and a variation rate between the second operation data and the preset image is greater than a preset variation rate; and the second sending module 830 is configured to store the second operation data in the data queue if the second operation data does not match the preset abnormal scenario and the variation rate between the second operation data and the preset image is less than or equal to the preset variation rate.
[0212] In some embodiments, the second sending module 830 is configured to obtain a priority of operation data in the data queue if the data queue meets the preset idle condition, and send the operation data in the data queue to the operation and maintenance center according to a sequence from high to low of the priority.
[0213] In some embodiments, the second sending module 830 is configured to create a blank task corresponding to the data queue, the priority of the blank task being lower than that of a sending task of operation data in the data queue, and obtain the priority of the operation data in the data queue if the blank task is executed.
[0214] In some embodiments, the operation and maintenance center is configured to input the operation data into an abnormality detection model and output an abnormality probability as an abnormality detection result after receiving the operation data.
[0215] In some embodiments, the operation data indicates that the oil and gas and pipeline site is running abnormally if the abnormality probability is greater than a preset probability, and the operation data indicates that the oil and gas and pipeline site is running normally if the abnormality probability is less than or equal to the preset probability.
[0216] In some embodiments, the abnormality detection model is a neural network model trained by sample data, the sample data including virtual abnormal data, historical abnormal data and historical normal data, the historical abnormal data being data generated when the oil and gas and pipeline site is running abnormally in a historical time period, the historical normal data being data generated when the oil and gas and pipeline site is running normally in the historical time period, and the virtual abnormal data being virtual operation data indicating that the oil and gas and pipeline site is running abnormally generated by a generative adversarial model.
[0217] In some embodiments, the operation data is real-time operation data generated by the oil and gas and pipeline site; the data acquisition module 810 is configured to acquire an abnormality detection result of the operation and maintenance center on historical operation data, the historical operation data indicating operation data generated by the oil and gas and pipeline site in a historical time period; and based on the abnormality detection result, a preset abnormal condition corresponding to the real-time operation data is determined.
[0218] In summary, the abnormality detection device for the oil and gas and pipeline site provided by the embodiments of the present application is used for the operation data acquired from the oil and gas and pipeline site. First, the operation data is preliminarily judged according to the pre-set abnormal condition. When the operation data meets the abnormal condition, it is judged that the operation data belongs to abnormal data. At this time, the operation data is immediately sent to the operation and maintenance center, so as to ensure that the operation and maintenance center can timely detect the abnormal data. When the operation data does not meet the abnormal condition, it is preliminarily judged that the operation data does not belong to abnormal data. At this time, the operation data is temporarily stored in the data queue. When it is idle, the operation data in the data queue is sent to the operation and maintenance center for abnormality detection. This avoids frequently sending data to the operation and maintenance center, thereby reducing the network transmission burden and the immediate processing pressure of the operation and maintenance center. The operation and maintenance center can concentrate resources to immediately process the key data, reduce the processing delay caused by data redundancy, and improve the immediacy of the abnormality detection.
[0219] It should be noted that the specific limitations in one or more embodiments of the abnormality detection device for the oil and gas and pipeline site provided above can refer to the limitations of the abnormality detection method for the oil and gas and pipeline site in the above, which will not be described here. The modules of the above device can be realized by software, hardware and their combination, and each module can be embedded in the form of hardware or independent of the processor of the computer device, or can be stored in the form of software in the memory of the computer device, so as to call and execute the operation of each module by the processor.
[0220] The embodiments of the present application also provide a computer device, which comprises a processor and a memory, and the memory stores a computer program; the processor is configured to execute the computer program in the memory to implement the abnormality detection method for the oil and gas and pipeline site provided by each method embodiment.
[0221] For example, Figure 9 is a structural block diagram of a computer device 900 provided by an exemplary embodiment of the present application. Optionally, the computer device 900 is a server 900.
[0222] Generally, the server 900 comprises a processor 901 and a memory 902.
[0223] The processor 901 can include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 901 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), a programmable logic array (PLA), and the like. The processor 901 can also include a main processor and a co-processor, the main processor being a processor for processing data in an awake state, also referred to as a central processing unit (CPU), and the co-processor being a low-power processor for processing data in a standby state. In some embodiments, the processor 901 can be integrated with a graphics processor (GPU) that is responsible for rendering and drawing of content to be displayed by a display screen. In some embodiments, the processor 901 can further include an artificial intelligence (AI) processor for processing computing operations related to machine learning.
[0224] The memory 902 can include one or more computer-readable storage media that can be non-transitory. The memory 902 can also include a high-speed random access memory, and a nonvolatile memory such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 902 is used to store at least one instruction for being executed by the processor 901 to implement the method for anomaly detection applied to oil and gas and pipeline sites provided by various method embodiments in the present application.
[0225] In some embodiments, the server 900 can also optionally include an input interface 903 and an output interface 904. The processor 901, the memory 902, and the input interface 903 and the output interface 904 can be connected through a bus or a signal line. Various peripheral devices can be connected to the input interface 903 and the output interface 904 through the bus, the signal line, or the circuit board. The input interface 903 and the output interface 904 can be used to connect at least one peripheral device related to input / output (I / O) to the processor 901 and the memory 902. In some embodiments, the processor 901, the memory 902, and the input interface 903 and the output interface 904 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 901, the memory 902, and the input interface 903 and the output interface 904 can be implemented on a separate chip or circuit board, and the embodiments of the present application are not limited thereto.
[0226] Those skilled in the art can understand that, The structure shown in the figure is not a limitation on the computer device 900, and can include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0227] In an example embodiment, the present application provides a chip, which includes programmable logic circuit and / or program instructions, and when the chip is running on a computer device, is used to implement the anomaly detection method applied to oil and gas and pipeline sites provided by the above-mentioned various method embodiments.
[0228] In an example embodiment, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is loaded and executed by a processor to implement the anomaly detection method applied to oil and gas and pipeline sites provided by the above-mentioned various method embodiments.
[0229] In an example embodiment, the present application provides a computer program product or computer program, which includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the processor of the computer device is loaded and executed to implement the anomaly detection method applied to oil and gas and pipeline sites provided by the above-mentioned method embodiments.
[0230] The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0231] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or can be instructed by programs to complete the related hardware, and the programs can be stored in a computer readable storage medium. The computer readable storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0232] Those skilled in the art should be aware that in one or more examples described above, the functions described in the embodiments of the present application can be implemented in hardware, software, firmware or any combination thereof. When implemented in software, the functions can be stored in a computer readable medium or transmitted as one or more instructions or codes on a computer readable medium. The computer readable medium includes computer storage medium and communication medium, wherein the communication medium includes any medium that facilitates the transfer of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0233] The above description is only optional embodiments of the present application, and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An anomaly detection method applied to oil and gas and pipeline sites, characterized in that, The method includes: Acquire operational data in oil and gas and pipeline sites, the operational data being used to indicate data generated during the operation of facilities in the oil and gas and pipeline sites; If the running data meets the preset abnormal conditions, the running data will be sent to the operation and maintenance center immediately. If the running data does not meet the preset abnormal conditions, the running data is stored in a data queue; if the data queue meets the preset idle conditions, the running data in the data queue is sent to the operation and maintenance center. The operation and maintenance center is used to perform anomaly detection on the operation data after receiving it. The anomaly detection is used to detect the operation status of the oil and gas and pipeline sites based on the operation data.
2. The method according to claim 1, characterized in that, The operational data includes numerical first operational data; The step of immediately sending the operational data to the operation and maintenance center when the operational data meets preset abnormal conditions includes: If the first operating data is outside the preset threshold range, the first operating data will be sent to the operation and maintenance center immediately. The step of storing the running data in a data queue when the running data does not meet the preset abnormal conditions includes: If the first running data is within a preset threshold range, the first running data is stored in the data queue.
3. The method according to claim 1, characterized in that, The operational data includes image-based second operational data; The step of immediately sending the operational data to the operation and maintenance center when the operational data meets preset abnormal conditions includes: If the rate of change between the second running data and the preset image is greater than the preset rate of change, the second running data is immediately sent to the operation and maintenance center; wherein, the rate of change is used to indicate the difference between the second running data and the preset image; The step of storing the running data in a data queue when the running data does not meet the preset abnormal conditions includes: If the rate of change between the second running data and the preset image is less than or equal to the preset rate of change, the second running data is stored in the data queue.
4. The method according to claim 3, characterized in that, The method further includes: If the second operating data matches a preset abnormal scenario, the second operating data will be sent to the operation and maintenance center immediately. The step of immediately sending the second operational data to the operation and maintenance center when the rate of change between the second operational data and the preset image is greater than the preset rate of change includes: If the second running data does not match the preset abnormal scenario, and the rate of change between the second running data and the preset image is greater than the preset rate of change, the second running data will be sent to the operation and maintenance center immediately. The step of storing the second running data in the data queue when the rate of change between the second running data and the preset image is less than or equal to the preset rate of change includes: If the second running data does not match the preset abnormal scenario, and the rate of change between the second running data and the preset image is less than or equal to the preset rate of change, the second running data is stored in the data queue.
5. The method according to any one of claims 1 to 4, characterized in that, The step of sending the running data in the data queue to the operation and maintenance center when the data queue meets the preset idle conditions includes: If the data queue meets the preset idle condition, the priority of the running data in the data queue is obtained; The running data in the data queue is sent to the operation and maintenance center in descending order of priority.
6. The method according to claim 5, characterized in that, The method further includes: Create a blank task corresponding to the data queue, the priority of the blank task being lower than the priority of the task sending running data in the data queue; The step of obtaining the priority of running data in the data queue when the data queue meets the preset idle condition includes: When the blank task is executed, the priority of the running data in the data queue is obtained.
7. The method according to any one of claims 1 to 4, characterized in that, The operation and maintenance center is used to input the operation data into the anomaly detection model and output the anomaly probability as the anomaly detection result after receiving the operation data; Wherein, if the probability of an anomaly is greater than a preset probability, the operating data indicates that the oil and gas and pipeline site is operating abnormally; if the probability of an anomaly is less than or equal to the preset probability, the operating data indicates that the oil and gas and pipeline site is operating normally.
8. The method according to claim 7, characterized in that, The anomaly detection model is a neural network model trained using sample data; The sample data includes virtual anomaly data, historical anomaly data, and historical normal data. The historical anomaly data is data generated when the oil and gas and pipeline sites operate abnormally within a historical time period. The historical normal data is data generated when the oil and gas and pipeline sites operate normally within a historical time period. The virtual anomaly data is virtual operational data generated by a generative adversarial model to indicate abnormal operation of the oil and gas and pipeline sites.
9. The method according to any one of claims 1 to 4, characterized in that, The operational data refers to the real-time operational data generated by the oil and gas and pipeline site. The method further includes: Obtain the anomaly detection results of the historical operating data from the operation and maintenance center, wherein the historical operating data indicates the operating data generated by the oil and gas and pipeline sites within a historical time period; Based on the anomaly detection results, the candidate anomaly conditions corresponding to the real-time running data are adjusted to obtain the preset anomaly conditions corresponding to the real-time running data. The candidate anomaly conditions are pre-set benchmark conditions that indicate that the running data belongs to normal data.
10. An anomaly detection device applied to oil and gas pipeline sites, characterized in that, The device includes: The data acquisition module is used to acquire operational data in the oil and gas and pipeline sites, and the operational data is used to indicate the data generated during the operation of the facilities in the oil and gas and pipeline sites; The first sending module is used to send the running data to the operation and maintenance center in real time when the running data meets the preset abnormal conditions; The second sending module is used to store the running data in a data queue when the running data does not meet the preset abnormal conditions; and to send the running data in the data queue to the operation and maintenance center when the data queue meets the preset idle conditions. The operation and maintenance center is used to perform anomaly detection on the operation data after receiving it, and the anomaly detection is used to detect the operation status of the oil and gas and pipeline sites.