Underground information data acquisition method and system
By building an isolated tree in the underground information data acquisition system, obtaining the noise factor and overall node change degree of data points, calculating the noise level and giving the surrounding data filtering weight, the problem of noise data in the underground information data affecting the filtering results is solved, and the problem of noise data in the underground information data is improved Accuracy of data filtering.
Patent Information
- Application Number
- CN202510026190.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2045-01-08
AI Technical Summary
Noise data exists in the surrounding data of the downhole information data, resulting in inaccurate filtering results of the mean filtering algorithm.
By building an isolated tree, denoising the downhole information data, obtaining the overall node change degree and noise factor of each data point, calculating the noise level, and assigning the surrounding data filtering weights according to the noise level, correcting the value of the data point.
The accuracy of downhole information data filtering is improved and the impact of noise data on the filtering results is avoided.
Smart Images

Figure CN119415841A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for collecting underground information data. Background Art
[0002] With the continuous growth of global energy demand and the continuous advancement of oil exploration and development technology, oil well logging, as a vital link in the process of oil and gas exploration, development and production, has become one of the core tools for determining underground oil and gas reserves. In the process of oil exploration, since the underground environment is usually full of dangerous factors such as gas explosions, landslides, gas poisoning, etc., real-time monitoring of gas concentration, temperature, humidity and other data can timely detect potential dangers and ensure the safety of workers.
[0003] The patent application document with the current publication number CN106980491A discloses an improved mean filter algorithm for A / D sampling, including: using MCU to collect data, performing A / D conversion on the collected data, and storing it in array AD[N], where the value of N is greater than or equal to 100. When the sampling values stored in the array are full, the N numbers are bubble sorted in ascending order, and then the first and last N / 5 data in the sorted array are removed, and the remaining 3×N / 5 are summed and the average value is taken to obtain the final sampling value.
[0004] When collecting downhole information data, factors such as sensor failures may cause noise data and abnormal data to exist in the collected downhole information data. Therefore, the present invention needs to perform denoising on the collected downhole information data. Since the mean filtering algorithm is an algorithm for filtering noise data, its principle is to obtain the surrounding data of each downhole information data, obtain the mean of all surrounding data of each downhole information data to filter each downhole information data and eliminate noise data. However, if there is noise data in the surrounding data of each downhole information data, the filtering result will be inaccurate. Summary of the invention
[0005] In order to solve the technical problem that the presence of noise data in the surrounding data of the downhole information data will make the filtering result of the downhole information data by the mean filtering algorithm inaccurate, the present invention provides a downhole information data collection method and system.
[0006] In a first aspect, the present invention provides a method for collecting underground information data, which adopts the following technical solution: A method for collecting underground information data comprises the following steps: Collect downhole information data; construct several isolated trees for all downhole information data; obtain the node change degree of each downhole information data in each isolated tree; take the average of the node change degree of each downhole information data in all isolated trees as the overall node change degree of each downhole information data; obtain the noise factor of each downhole information data: , Represents the noise factor of the ith downhole information data; represents the mean of the deepest layers of the ith downhole information data in all isolated trees; k represents the mean of the deepest layers of all isolated trees; N represents the number of isolated trees; represents the deepest level of the ith underground information data in the ath isolated tree; exp() represents an exponential function with a natural constant as the base; Obtaining the noise level of each downhole information data, wherein the noise level is positively correlated with the noise factor of each downhole information data and the overall node change degree; According to the noise level, a filtering weight of each surrounding data of each downhole information data to each downhole information data is obtained; and based on the filtering weight, a filtering value of each downhole information data is obtained.
[0007] The innovation of the present invention lies in obtaining the overall node change degree of each downhole information data and the noise factor of each downhole information data according to the performance of normal data, abnormal data and noise data in the downhole information data in the isolated tree segmentation process, and then obtaining the noise degree of each downhole information data according to the overall node change degree and the noise factor. Subsequently, according to the noise degree of each downhole information data, the filtering weight of each downhole information data is obtained from each surrounding data of each downhole information data to correct the value of each downhole information data, so as to avoid the influence of noise data on the filtering result during filtering and improve the accuracy of downhole information data filtering.
[0008] Preferably, the step of obtaining the node change degree of each downhole information data in each isolated tree includes: ; In the formula, Indicates the degree of node change of the ith underground information data in the ath isolated tree; Indicates the deepest level of the a-th isolated tree; It indicates the number of data points of the node at the bth layer of the ath isolated tree where the i-th underground information data is located; It represents the mean number of data points of all nodes in the a-th isolated tree for the i-th underground information data; Represents the standard normalization function.
[0009] This facilitates the subsequent acquisition of the noise factor of each downhole information data according to the degree of node change of each downhole information data in each isolated tree.
[0010] Preferably, the step of obtaining the noise level of each downhole information data includes: The product of the overall node change degree of each downhole information data and the noise factor of each downhole information data is taken as the noise degree of each downhole information data.
[0011] This facilitates the subsequent correction of the value of each downhole information data according to the noise level of each downhole information data.
[0012] Preferably, the step of obtaining the filtering weight of each surrounding data of each downhole information data on each downhole information data comprises: Obtain surrounding data of each downhole information data; ; In the formula, represents the filtering weight of the g-th surrounding data of the i-th downhole information data on the i-th downhole information data; Represents the noise factor of the g-th surrounding data of the i-th downhole information data; Represents the sum of the noise factors of all surrounding data of the i-th downhole information data.
[0013] It is convenient to filter each downhole information data according to the filtering weight of each surrounding data of each downhole information data, and filter each downhole information data after weighted averaging the value of each surrounding data of each downhole information data, thereby improving the filtering result.
[0014] Preferably, the step of obtaining surrounding data of each downhole information data includes: The number of data is preset to c, and the c downhole information data before the sampling time corresponding to each downhole information data and the c downhole information data after the sampling time are recorded as the surrounding data of each downhole information data.
[0015] Preferably, obtaining the filtering value of each downhole information data based on the filtering weight includes: ; In the formula, Represents the filtered value of the i-th downhole information data; Represents the number of surrounding data of the i-th downhole information data; represents the filtering weight of the g-th surrounding data of the i-th downhole information data on the i-th downhole information data; Represents the value of the g-th surrounding data of the i-th downhole information data.
[0016] The obtained filtered value is more accurate and avoids the influence of noise data.
[0017] Preferably, the step of constructing a plurality of isolated trees for all downhole information data includes: The number of isolated trees N is preset, and the isolation forest algorithm is used to construct N isolated trees for all underground information data.
[0018] In a second aspect, the present invention provides a downhole information data acquisition system, which adopts the following technical solution: A downhole information data acquisition system comprises: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the downhole information data acquisition method mentioned above is implemented.
[0019] By adopting the above technical solution, the above-mentioned method for collecting underground information data is generated into a computer program and stored in a memory so as to be loaded and executed by a processor, thereby making a terminal device based on the memory and the processor for easy use.
[0020] The present invention has the following technical effects: The purpose of the present invention is to obtain the overall node change degree of each downhole information data and the noise factor of each downhole information data according to the performance of normal data, abnormal data and noise data in the downhole information data in the isolated tree segmentation process, and then obtain the noise degree of each downhole information data according to the overall node change degree and the noise factor, and then obtain the filtering weight of each downhole information data based on each surrounding data of each downhole information data according to the noise degree of each downhole information data to correct the value of each downhole information data, so as to avoid the influence of noise data on the filtering result during filtering, and improve the accuracy of downhole information data filtering. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts.
[0022] Figure 1 This is a method flow chart of a method for collecting downhole information data in an embodiment of the present invention; Figure 2 Representative isolated tree diagram. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0024] It should be understood that when the terms "first", "second", etc. are used in the claims, descriptions, and drawings of the present invention, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the description and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their collections.
[0025] The embodiment of the present invention discloses a method for collecting underground information data, referring to Figure 1 , comprising steps S1 to S4: S1: Collect downhole information data.
[0026] It should be noted that downhole information data refers to data collected in the underground operating environment of the oil well. Since the underground environment is usually full of dangerous factors, such as gas explosions, landslides, gas poisoning, etc., through real-time monitoring of gas concentration, temperature, humidity and other data, potential dangers can be discovered in time to ensure the safety of workers.
[0027] In an embodiment of the present invention, the preset sampling time is 2 seconds / time. The temperature, humidity and gas concentration of the underground are collected by arranging temperature sensors, humidity sensors and gas sensors underground. The temperature, humidity and gas concentration collected at the same sampling time are used as a underground information data to obtain a number of underground information data.
[0028] S2: Use the isolation forest algorithm to construct several isolated trees for all downhole information data; obtain the node change degree of each downhole information data in each isolated tree; and obtain the overall node change degree of each downhole information data based on the node change degree of each downhole information data in each isolated tree.
[0029] It should be noted that when collecting downhole information data, due to factors such as sensor failure itself, noise data and abnormal data may exist in the collected downhole information data. Therefore, the present invention needs to perform denoising on the collected downhole information data. Since the mean filtering algorithm is an algorithm for filtering noise data, its principle is to obtain the surrounding data of each downhole information data, and obtain the mean of all surrounding data of each downhole information data to filter each downhole information data and eliminate the noise data. However, if there is noise data in the surrounding data of each data point, the filtering result will be inaccurate. Therefore, the present invention needs to analyze the characteristics of the data points and obtain the noise degree of each downhole information data, so as to facilitate the subsequent correction of the value of each downhole information data to avoid the influence of noise data on the filtering result during filtering.
[0030] It should be further explained that the abnormal data in the downhole information data is caused by abnormal conditions such as equipment failure and emergencies, so there is a significant difference between the abnormal data and the normal data in the downhole information data, and the noise data generated in the downhole information data is random error data caused by acquisition errors, external environmental interference and other reasons, so the difference between the noise data and the normal data usually fluctuates, and the difference with the normal data is slightly smaller; The core idea of the known isolation forest algorithm is to gradually "isolate" a small number of abnormal data points by randomly selecting a segmentation threshold. Therefore, since the difference between the abnormal data and the normal data in the downhole information data is large, the abnormal data in the downhole information data will be quickly segmented out, so the change of the node position of the abnormal data in the isolated tree is very small, but the difference between the noise data and the normal data in the downhole information data is volatile, so the node position of the noise data in the isolated tree will change greatly. Therefore, the present invention first constructs multiple isolated trees for all downhole information data, and obtains the node change degree of each downhole information data in each isolated tree according to the node position change of each downhole information data in all isolated trees, so as to facilitate the subsequent acquisition of the noise degree of each downhole information data according to the node change degree.
[0031] In an embodiment of the present invention, the number of isolated trees N is preset, and the isolation forest algorithm is used to construct N isolated trees for all downhole information data. In an embodiment of the present invention, the number of isolated trees N is preset to 7. In other embodiments, the implementer may preset the value of the number of isolated trees N according to the specific implementation situation.
[0032] Get the node change degree of each underground information data in each isolated tree: ; In the formula, Indicates the degree of node change of the ith underground information data in the ath isolated tree; Indicates the deepest level of the a-th isolated tree; It indicates the number of data points of the node at the bth layer of the ath isolated tree where the i-th underground information data is located; It represents the mean number of data points of all nodes in the a-th isolated tree for the i-th underground information data; Represents the standard normalization function.
[0033] in, It represents the change in the number of data points of the node where the ith downhole information data is located in the ath isolated tree. The larger its value is, the greater the change in the number of downhole information data at the node where it is located, that is, the greater the degree of change in the node of the ith downhole information data in the ath isolated tree.
[0034] The mean of the node change degree of each downhole information data in each isolated tree is taken as the overall node change degree of each downhole information data.
[0035] S3: Obtain the noise factor of each downhole information data, and obtain the noise level of each downhole information data according to the noise factor of each downhole information data and the overall node change level.
[0036] It should be noted that it is known that the noise data in the downhole information data has large volatility in different isolated trees, and will be separated when approaching the middle position of the isolated tree. Therefore, when any downhole information data is noise data, the difference in the deepest layers of the downhole information data in different isolated trees is large, and the absolute value of the difference between the mean of the deepest layers of the downhole information data in all isolated trees and the mean of the deepest layers of all isolated trees is small.
[0037] In the embodiment of the present invention, the noise factor of each downhole information data is obtained: ; In the formula, Represents the noise factor of the ith downhole information data; represents the mean of the deepest layers of the ith downhole information data in all isolated trees; k represents the mean of the deepest layers of all isolated trees; N represents the number of isolated trees; represents the deepest level of the ith underground information data in the ath isolated tree; exp() represents an exponential function with a natural constant as the base; Represents the absolute value of the difference between the mean of the deepest layers of the ith downhole information data in all isolated trees and the mean of the deepest layers of all isolated trees. The smaller the absolute value of the difference, the more likely it is that the ith downhole information data is separated from the middle of the isolated tree, and the greater its noise factor. The larger the value of , the greater the difference in the deepest layers of the ith downhole information data in different isolated trees, which means that the ith downhole information data has greater volatility in different isolated trees, that is, the greater the noise factor of the downhole information data.
[0038] The product of the overall node change degree of each downhole information data and the noise factor of each downhole information data is taken as the noise degree of each downhole information data.
[0039] It should be noted that the deepest level of each underground information data in the isolated tree and the deepest level of the isolated tree are obtained as follows: Figure 2 As shown, the root node of the isolated tree is located at the 0th level of the isolated tree, so Figure 2 For example, the data point "20" in Figure 2 The deepest level in the isolation tree of is 2, and the deepest level in this isolation tree is 3.
[0040] S4: according to the noise level of each downhole information data, obtain the filtering weight of each surrounding data of each downhole information data to each downhole information data, and based on the filtering weight, obtain the filtering value of each downhole information data.
[0041] It should be noted that when using mean filtering to filter downhole information data, if the noise level of any surrounding data of any downhole information data is greater, the weight of the surrounding data should be made smaller during filtering to reduce the impact of the surrounding data on the downhole information data, so that the filtered value of the downhole information data is more accurate.
[0042] In an embodiment of the present invention, c downhole information data before the sampling moment corresponding to each downhole information data and c downhole information data after the sampling moment are recorded as the surrounding data of each downhole information data. In an embodiment of the present invention, the preset number of data c=5. In other embodiments, the implementer can preset the value of c according to the specific implementation situation.
[0043] Get the filtering weight of each surrounding data of each downhole information data to each downhole information data: ; In the formula, represents the filtering weight of the g-th surrounding data of the i-th downhole information data on the i-th downhole information data; Represents the noise factor of the g-th surrounding data of the i-th downhole information data; Represents the sum of the noise factors of all surrounding data of the ith downhole information data; for any surrounding data of the ith downhole information data, the greater the noise level of the surrounding data, the smaller the filtering weight of the surrounding data on the ith downhole information data.
[0044] Get the filter value of each downhole information data: ; In the formula, Represents the filtered value of the i-th downhole information data; Represents the number of surrounding data of the i-th downhole information data; represents the filtering weight of the g-th surrounding data of the i-th downhole information data on the i-th downhole information data; Represents the value of the g-th surrounding data of the i-th downhole information data.
[0045] The filtered values of all downhole information data are stored in the data storage module to facilitate analysis by the staff, thereby completing the collection of downhole data.
[0046] An embodiment of the present invention further discloses a downhole information data acquisition system, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a downhole information data acquisition method according to the present invention is implemented.
[0047] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.
[0048] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory, a dynamic random access memory, a static random access memory, an enhanced dynamic random access memory, a high bandwidth memory, a hybrid storage cube, etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of the device or accessible or connectable to the device.
[0049] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.
[0050] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for collecting underground information data, characterized in that: Includes steps: Collect downhole information data; construct several isolated trees for all downhole information data; obtain the node change degree of each downhole information data in each isolated tree; take the average of the node change degree of each downhole information data in all isolated trees as the overall node change degree of each downhole information data; obtain the noise factor of each downhole information data: , Represents the noise factor of the ith downhole information data; represents the mean of the deepest layers of the ith downhole information data in all isolated trees; k represents the mean of the deepest layers of all isolated trees; N represents the number of isolated trees; represents the deepest level of the ith underground information data in the ath isolated tree; exp() represents an exponential function with a natural constant as the base; Obtaining the noise level of each downhole information data, wherein the noise level is positively correlated with the noise factor of each downhole information data and the overall node change degree; According to the noise level, obtaining a filtering weight of each surrounding data of each downhole information data for each downhole information data; Based on the filtering weight, a filtering value of each downhole information data is obtained.
2. A method for collecting underground information data according to claim 1, characterized in that: The step of obtaining the node change degree of each downhole information data in each isolated tree includes: ; In the formula, Indicates the degree of node change of the ith underground information data in the ath isolated tree; Indicates the deepest level of the a-th isolated tree; It indicates the number of data points of the node at the bth layer of the ath isolated tree where the i-th underground information data is located; It represents the mean number of data points of all nodes in the a-th isolated tree for the i-th underground information data; Represents the standard normalization function.
3. A method for collecting underground information data according to claim 1, characterized in that: The step of obtaining the noise level of each downhole information data includes: The product of the overall node change degree of each downhole information data and the noise factor of each downhole information data is taken as the noise degree of each downhole information data.
4. A method for collecting underground information data according to claim 1, characterized in that: The step of obtaining the filtering weight of each surrounding data of each downhole information data for each downhole information data comprises: Obtain surrounding data of each downhole information data; ; In the formula, represents the filtering weight of the g-th surrounding data of the i-th downhole information data on the i-th downhole information data; Represents the noise factor of the g-th surrounding data of the i-th downhole information data; Represents the sum of the noise factors of all surrounding data of the i-th downhole information data.
5. A method for collecting underground information data according to claim 4, characterized in that: The step of obtaining surrounding data of each downhole information data includes: The number of data is preset to c, and the c downhole information data before the sampling time corresponding to each downhole information data and the c downhole information data after the sampling time are recorded as the surrounding data of each downhole information data.
6. A method for collecting underground information data according to claim 1, characterized in that: The step of obtaining a filter value of each downhole information data based on the filter weight includes: ; In the formula, Represents the filtered value of the i-th downhole information data; Represents the number of surrounding data of the i-th downhole information data; represents the filtering weight of the g-th surrounding data of the i-th downhole information data on the i-th downhole information data; Represents the value of the g-th surrounding data of the i-th downhole information data.
7. A method for collecting underground information data according to claim 1, characterized in that: The method of constructing several isolated trees for all downhole information data includes: The number of isolated trees N is preset, and the isolation forest algorithm is used to construct N isolated trees for all underground information data.
8. A downhole information data acquisition system, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a method for collecting downhole information data according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Improved average filtering algorithm for A / D (Analog to Digital) sampling
CN106980491A
Power enterprise energy information management system based on Internet +
CN116911806A
Intelligent monitoring method and system for air quality of station building
CN117538491A
Noise processing method in coal mine noise high-precision measurement process
CN117540328A
Electric chain saw chain equipment and working safety detection method
CN118673448A