An oil and gas production working condition recognition method and system based on multi-source data fusion

By constructing an integrated learning model through the fusion of multi-source data, the limitations of single data sources in traditional oil and gas production condition identification methods are overcome, enabling accurate and automated identification of complex conditions and improving the reliability and stability of identification.

CN123049431APending Publication Date: 2026-11-06ZHONGKE HUIZHI (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611552103.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-09
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Traditional oil and gas production condition identification methods rely on a single data source, which makes it difficult to comprehensively and accurately reflect complex conditions, leading to misjudgments or omissions. Furthermore, simple rules or models are difficult to handle the complex nonlinear relationships between multi-source heterogeneous data.

Method used

A multi-source data fusion method is adopted to construct an ensemble learning model through image, operation and production data sources. Using base learners such as random forest, support vector machine, naive Bayes and multilayer perceptron, hyperparameter optimization is performed by combining sand cat group optimization algorithm and lens imaging principle to realize automated identification of oil and gas conditions.

Benefits of technology

It improves the accuracy of oil and gas production condition identification, reduces the risk of misidentification due to a single information dimension, and realizes automated and reliable identification of various conditions such as pump leakage and wax deposition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123049431A_ABST
    Figure CN123049431A_ABST
Patent Text Reader

Abstract

This invention relates to the field of oil and gas data processing technology, and discloses a method and system for identifying oil and gas production conditions based on multi-source data fusion. The method includes: collecting data from a target pumping unit based on a fused data source set to obtain a target multi-source feature dataset; automatically optimizing a set of hyperparameters to be learned to obtain an optimal set of learning hyperparameters; updating a target ensemble learning model based on the optimal set of learning hyperparameters to obtain a ensemble learning model to be trained; training the ensemble learning model to be trained to obtain an oil and gas production condition identification model; and using the target multi-source feature dataset and the oil and gas production condition identification model to identify the current oil and gas production condition. This invention can improve the accuracy of oil and gas production condition identification and reduce the risk of misidentification due to a single information dimension.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of oil and gas data processing technology, and in particular to a method and system for identifying oil and gas production conditions based on multi-source data fusion. Background Technology

[0002] Oil and gas production is a crucial link in energy security and stable supply. As the core equipment in oil and gas field production, pumping units operate in a complex and harsh environment under continuous, high-load conditions for extended periods. Their operating status directly affects production safety and efficiency. Therefore, timely and accurate identification of various operating conditions of pumping units, especially abnormal conditions such as pump leakage, wax deposition, and insufficient fluid supply, is of paramount importance for achieving intelligent monitoring of the oil and gas production process, preventing unplanned shutdowns, and ensuring safe and stable production operations.

[0003] Traditional technologies typically rely on a single type of data and simple rules or thresholds for judgment. However, their drawbacks are that the information dimensions of a single data source are limited, making it difficult to comprehensively and accurately reflect the complex working conditions caused by the combined effects of mechanical, electrical, thermal, and production dynamics. This can easily lead to misjudgments or omissions due to incomplete information. Furthermore, simple rules or models are difficult to handle the complex nonlinear relationships between multi-source heterogeneous data. Summary of the Invention

[0004] This invention provides a method for identifying oil and gas production conditions based on multi-source data fusion and a computer-readable storage medium. Its main purpose is to improve the accuracy of oil and gas production condition identification and reduce the risk of misidentification due to a single information dimension.

[0005] To achieve the above objectives, this invention provides a method for identifying oil and gas production conditions based on multi-source data fusion, comprising: Receive oil and gas operating condition identification instructions, determine the target pumping unit based on the oil and gas operating condition identification instructions, and identify the fusion data source set based on the target pumping unit. The fusion data source set includes: image data source, operation data source and production data source. Data is collected from the target pumping unit based on the fused data source set to obtain the target multi-source feature dataset; Construct an objective ensemble learning model, which includes: random forest, support vector machine, Naive Bayes and multilayer perceptron; The set of hyperparameters to be learned in the target ensemble learning model is identified, and the set of hyperparameters to be learned is automatically optimized to obtain the optimal set of learning hyperparameters; The target ensemble learning model is updated based on the optimal learning hyperparameter set to obtain the ensemble learning model to be trained. The ensemble learning model to be trained is trained to obtain the oil and gas condition identification model. The current oil and gas condition is then identified using the target multi-source feature dataset and the oil and gas condition identification model.

[0006] Optionally, the step of collecting data from the target pumping unit based on the fused data source set to obtain the target multi-source feature dataset includes: Temperature data of the target pumping unit is acquired by using image data sources from a fusion data source set, resulting in a current temperature image of the pumping unit. The current heat distribution features are extracted from the current pumping unit temperature image to obtain the current heat distribution features; Obtain the current production data and current operating data of the target pumping unit based on the operating data source and the production data source, respectively; Perform feature engineering on the current production data and the current operation data respectively to obtain the current production characteristics and the current operation characteristics; Data fusion is performed on the current heat distribution characteristics, current production characteristics, and current operation characteristics to obtain the target multi-source feature dataset.

[0007] Optionally, the step of extracting thermal distribution features from the current pumping unit temperature image to obtain the current thermal distribution features includes: By defining key component areas for the target pumping unit, multiple target thermal distribution areas are obtained. Target heat distribution regions are extracted sequentially from multiple target heat distribution regions, and ROI templates are constructed for the target heat distribution regions to obtain target heat distribution templates; By summarizing the target heat distribution templates, multiple target heat distribution templates are obtained; The temperature region of the current pumping unit temperature image is divided using multiple target heat distribution templates to obtain multiple heat distribution images to be extracted; Image feature extraction is performed on each of the multiple heat distribution images to be extracted, resulting in multiple local heat distribution features; Multiple local heat distribution features are merged to obtain the current heat distribution feature.

[0008] Optionally, the step of automatically optimizing the set of hyperparameters to be learned to obtain the optimal set of learning hyperparameters includes: A fitness transfer module is built based on the target ensemble learning model, wherein the fitness transfer module includes: a hyperparameter configuration layer, a model training layer, a model validation layer, and a fitness output layer; A candidate hyperparameter vector set is generated based on the set of hyperparameters to be learned, wherein the candidate hyperparameter vector set includes multiple candidate hyperparameter vectors; The candidate hyperparameter vector set is updated using the fitness transfer module to obtain the updated hyperparameter vector set; The updated hyperparameter vector set is used as the candidate hyperparameter vector set, and the step of updating the candidate hyperparameter vector set using the fitness transfer module is returned until a preset stop iteration instruction is received. The set of updated hyperparameter vectors when the stop iteration instruction is received is denoted as the target hyperparameter vector set, and the optimal learning hyperparameter set is determined based on the target hyperparameter vector set.

[0009] Optionally, updating the candidate hyperparameter vector set using the fitness transfer module to obtain an updated hyperparameter vector set includes: The candidate hyperparameter vector set is input into the fitness transfer module to obtain the candidate vector fitness set, which includes multiple candidate vector fitnesss. Get the current iteration count and the maximum iteration count; Once the historical decreasing parameters are identified, they are dynamically updated based on the current iteration count and the maximum iteration count to obtain the updated decreasing parameters. Hyperparameter vector optimization is performed using updated decreasing parameters and candidate vector fitness sets to obtain an updated hyperparameter vector set.

[0010] Optionally, the step of inputting the candidate hyperparameter vector set into the fitness transfer module to obtain the candidate vector fitness set includes: Candidate hyperparameter vectors are extracted sequentially from the candidate hyperparameter vector set, and the extracted candidate hyperparameter vectors are input into the hyperparameter configuration layer in the fitness transfer module to obtain the hyperparameter vector to be configured. Based on the hyperparameter configuration layer, the hyperparameter vector to be configured is configured to the target ensemble learning model to obtain the configuration ensemble learning model; The configuration ensemble learning model is trained using the model training layer to obtain the trained ensemble learning model, wherein the model training layer contains a subset of training data; The model validation layer is used to validate the performance of the trained ensemble learning model, and a set of accurate model estimates is obtained, which includes multiple accurate model estimates. The accurate set of model estimates is passed to the fitness output layer to obtain the fitness of candidate vectors; The candidate vector fitness set is obtained by summing the candidate vector fitness values ​​corresponding to each candidate hyperparameter vector.

[0011] Optionally, the step of optimizing the hyperparameter vector using the updated decreasing parameters and the candidate vector fitness set to obtain the updated hyperparameter vector set includes: For each candidate vector fitness in the candidate vector fitness set, perform the following operation: Determine the hyperparameter vector to be controlled corresponding to the fitness of the candidate vector; If the updated decreasing parameter is not greater than the preset value of 1, then the current optimal hyperparameter vector is determined based on the candidate vector fitness and the preset historical optimal vector fitness. A local search is performed based on the current optimal hyperparameter vector and the preset current optimal population vector to obtain the local hyperparameter vector; If the updated decrementing parameter is greater than 1, then a global search is performed on the control hyperparameter vector based on the candidate vector fitness to obtain the global hyperparameter vector; The global hyperparameter vector or the local hyperparameter vector is denoted as the update hyperparameter vector; The updated hyperparameter vectors corresponding to the fitness of each candidate vector are summarized to obtain the updated hyperparameter vector set.

[0012] Optionally, the step of performing a global search on the control hyperparameter vector based on the fitness of the candidate vectors to obtain a global hyperparameter vector includes: Based on the preset forward exploration formula and the fitness of candidate vectors, a forward search is performed on the hyperparameter vector to be controlled to obtain the forward hyperparameter vector; Calculate the update scaling factor based on the current iteration number and the maximum iteration number, and determine the upper boundary vector and the lower boundary vector for optimization. Based on updating the scaling factor, optimizing the upper boundary vector, and optimizing the lower boundary vector, the inverse hyperparameter vector is obtained by back-learning the vector of the control hyperparameter vector. Select the global hyperparameter vector from the forward hyperparameter vector and the reverse hyperparameter vector.

[0013] Optionally, the step of performing back learning on the control hyperparameter vector based on the updated scaling factor, optimized upper boundary vector, and optimized lower boundary vector to obtain the back hyperparameter vector includes: The inverse hyperparameter vector is calculated using the following formula:

[0014] in, Represents the inverse hyperparameter vector. This indicates optimizing the upper boundary vector. This indicates the optimization of the lower boundary vector. This indicates an update to the scaling factor. This represents the vector of hyperparameters to be controlled.

[0015] To achieve the above objectives, the present invention also provides an oil and gas production condition identification system based on multi-source data fusion, comprising: The identification instruction receiving module is used to receive oil and gas operating condition identification instructions, determine the target pumping unit based on the oil and gas operating condition identification instructions, and identify the fusion data source set based on the target pumping unit. The fusion data source set includes: image data source, operation data source and production data source. The ensemble model building module is used to collect data from the target oil pumping unit based on the fusion data source set, obtain the target multi-source feature dataset, and build the target ensemble learning model. The target ensemble learning model includes: random forest, support vector machine, Naive Bayes and multilayer perceptron. The learning parameter calculation module is used to identify the set of hyperparameters to be learned in the target ensemble learning model, automatically optimize the set of hyperparameters to be learned to obtain the optimal set of learning hyperparameters, and update the target ensemble learning model based on the optimal set of learning hyperparameters to obtain the ensemble learning model to be trained. The oil and gas operating condition identification module is used to train the ensemble learning model to obtain the oil and gas operating condition identification model. It uses the target multi-source feature dataset and the oil and gas operating condition identification model to identify the current oil and gas operating condition and obtain the current oil and gas operating condition.

[0016] To address the above problems, the present invention also provides an electronic device, the electronic device comprising: Memory, storing at least one instruction; The processor executes the instructions stored in the memory to implement the oil and gas production condition identification method based on multi-source data fusion described above.

[0017] To address the aforementioned problems, the present invention also provides a computer-readable storage medium storing at least one instruction, which is executed by a processor in an electronic device to implement the above-described method for identifying oil and gas production conditions based on multi-source data fusion.

[0018] To address the problems described in the background section, this invention first receives an oil and gas operating condition identification command, determines the target pumping unit based on the command, and then identifies and fuses a data source set based on the target pumping unit. This step constructs a multi-dimensional observation system from equipment surface temperature and internal state to output efficiency by fusing three types of heterogeneous data: image, operation, and production data. Compared to existing technologies that often rely on a single type of data, this provides a more comprehensive and complementary information foundation for identifying complex operating conditions. Furthermore, data is collected from the target pumping unit based on the fused data source set to obtain a target multi-source feature dataset. This step extracts local thermal distribution features from infrared images using a preset key component ROI template and performs feature engineering on time-series data. This targeted and refined feature construction method is more effective in representing fault modes than directly using raw data, improving the quality of input features. Next, a target ensemble learning model is constructed. This step integrates multiple bases with different principles. The learner, utilizing its varying inductive biases, learns complex features from multiple perspectives and then integrates decisions through a fusion layer. Compared to a single model, it exhibits better stability when dealing with nonlinear and high-dimensional data. It automatically optimizes the hyperparameter set to be learned, obtaining the optimal set. This step employs an improved sand cat swarm optimization algorithm, optimizing the search rhythm through dynamic updates of decreasing parameters. It also incorporates a dual forward and reverse search mechanism based on lens imaging principles, enhancing the ability to escape local optima and making the hyperparameter optimization process more efficient and comprehensive. Finally, the ensemble learning model is trained to obtain an oil and gas condition identification model. Using the target multi-source feature dataset and the oil and gas condition identification model, the current oil and gas condition is identified. This step integrates the judgments of multiple models, enabling automated identification of various conditions such as pump leaks and wax deposition. The results are more objective and reliable than traditional methods relying on human experience or single indicators. Therefore, this invention can improve the accuracy of oil and gas production condition identification and reduce the risk of misidentification due to limited information dimensions. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating a method for identifying oil and gas production conditions based on multi-source data fusion, provided in an embodiment of the present invention. Figure 2 This is a functional block diagram of an oil and gas production condition identification system based on multi-source data fusion provided in an embodiment of the present invention. Figure 3 This is a schematic diagram of the structure of an electronic device for implementing the oil and gas production condition identification method based on multi-source data fusion, as provided in an embodiment of the present invention.

[0020] Explanation of reference numerals in the attached figures: 10. Electronic device; 11. Processor; 12. Memory; 13. Bus.

[0021] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0022] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0023] This application provides a method for identifying oil and gas production conditions based on multi-source data fusion. The executing entity of this method includes, but is not limited to, at least one electronic device that can be configured to execute the method provided in this application, such as a server or a terminal. In other words, the method can be executed by software or hardware installed on a terminal device or server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster.

[0024] Reference Figure 1 The diagram shown is a flowchart illustrating a method for identifying oil and gas production conditions based on multi-source data fusion, according to an embodiment of the present invention. In this embodiment, the method for identifying oil and gas production conditions based on multi-source data fusion includes: S1. Receive oil and gas operating condition identification instructions, determine the target pumping unit based on the oil and gas operating condition identification instructions, and identify the fusion data source set according to the target pumping unit. The fusion data source set includes: image data source, operation data source and production data source.

[0025] It is clear that the oil and gas condition identification command refers to a manually initiated command to identify the condition of a specific pumping unit. The target pumping unit refers to the pumping unit included in the oil and gas condition identification command. Since pumping units are core equipment in oil and gas field production, operating continuously under high loads and in complex and harsh environments, it is necessary to promptly identify abnormal conditions such as pump leaks, wax buildup, and insufficient fluid supply to ensure production safety and stable operation. The fused data source set refers to the collection of image data sources, operational data sources, and production data sources. The image data source refers to a system capable of acquiring temperature images of the target pumping unit, which can be selected from infrared thermal imagers, online infrared temperature measurement systems, etc. The operational data source refers to a system capable of acquiring real-time operational data of the target pumping unit, which includes, but is not limited to, motor current, power supply voltage, and tubing pressure values, and can be various sensors. The production data source refers to a system capable of acquiring real-time production data of the target pumping unit. The production data includes, but is not limited to, instantaneous liquid production, oil production, water content, and gas-oil ratio. The production data source can be an online water content analyzer, production reports, etc.

[0026] S2. Collect data from the target pumping unit based on the fused data source set to obtain the target multi-source feature dataset.

[0027] Understandably, the target multi-source feature dataset is a collection of data from multiple dimensions obtained after data collection.

[0028] Specifically, the step of collecting data from the target pumping unit based on the fused data source set to obtain the target multi-source feature dataset includes: Temperature data of the target pumping unit is acquired by using image data sources from a fusion data source set, resulting in a current temperature image of the pumping unit. The current heat distribution features are extracted from the current pumping unit temperature image to obtain the current heat distribution features; Obtain the current production data and current operating data of the target pumping unit based on the operating data source and the production data source, respectively; Perform feature engineering on the current production data and the current operation data respectively to obtain the current production characteristics and the current operation characteristics; Data fusion is performed on the current heat distribution characteristics, current production characteristics, and current operation characteristics to obtain the target multi-source feature dataset.

[0029] It should be explained that the "current pumping unit temperature image" refers to the temperature image of the target pumping unit acquired from an image data source. This current pumping unit temperature image is an infrared thermal image containing key components of the pumping unit, such as the motor, gearbox, crank bearing, and polished rod. The "current thermal distribution feature" refers to the features representing the temperature distribution of the target pumping unit obtained after thermal distribution feature extraction. The "current production data" refers to a time-series data set reflecting the oil and gas production status, read in real time from a production data source. This current production data includes production parameters such as the instantaneous liquid production sequence, instantaneous oil production sequence, water cut sequence, and gas-oil ratio sequence of the target pumping unit over a recent period. The current operating data refers to a set of time-series data read in real time from the operating data source, reflecting the working status of the pumping unit itself. This current operating data includes operating status parameters of the target pumping unit over a recent period, such as current sequence, voltage sequence, active power sequence, and stroke sequence. For example, the motor current sequence obtained from the current sensor in the most recent hour is [45.2A, 45.0A, 44.8A], and the instantaneous oil production sequence obtained from the multiphase flow meter in the most recent hour is [2.1m³ / h, 2.0m³ / h, 1.9m³ / h]. The current production characteristics refer to the statistical characteristics of the current production data after feature engineering, and the current operating characteristics refer to the statistical characteristics of the current operating characteristics after feature engineering. The aforementioned feature engineering refers to extracting time-series features from each set of parameters in the current production data, such as extracting the average, standard deviation, minimum, and maximum values ​​of the current set. The time-series features corresponding to all parameter sets in the current production data constitute the current production characteristics. The method of feature engineering the current operating data is the same as that for the current production data, and will not be elaborated further here. The aforementioned data fusion of current heat distribution characteristics, current production characteristics, and current operation characteristics refers to putting the current heat distribution characteristics, current production characteristics, and current operation characteristics into the same data set, which is the target multi-source feature dataset.

[0030] Specifically, the step of extracting thermal distribution features from the current pumping unit temperature image to obtain the current thermal distribution features includes: By defining key component areas for the target pumping unit, multiple target thermal distribution areas are obtained. Target heat distribution regions are extracted sequentially from multiple target heat distribution regions, and ROI templates are constructed for the target heat distribution regions to obtain target heat distribution templates; By summarizing the target heat distribution templates, multiple target heat distribution templates are obtained; The temperature region of the current pumping unit temperature image is divided using multiple target heat distribution templates to obtain multiple heat distribution images to be extracted; Image feature extraction is performed on each of the multiple heat distribution images to be extracted, resulting in multiple local heat distribution features; Multiple local heat distribution features are merged to obtain the current heat distribution feature.

[0031] It should be explained that the target heat distribution area refers to an image region corresponding to a key component on the target pumping unit that is prone to failure or can characterize the operating status of the target pumping unit, which is artificially defined. These target heat distribution areas are high-incidence areas of temperature anomalies, and the heat distribution pattern is closely related to the operating conditions of the target pumping unit. Therefore, it is necessary to focus on monitoring the temperature of these target heat distribution areas, such as the motor housing area and the gearbox bearing housing area. The target heat distribution template refers to a polygonal box defined for the target heat distribution area, used to accurately locate the corresponding key component in the current pumping unit temperature image. This polygonal box is the ROI (Region of Interest). The construction of the ROI template for the target heat distribution area means that relevant personnel manually mark the fixed pixel coordinate range of each key component in the standard image and save it as a standard template. The standard image refers to the heat distribution image of the target pumping unit, and the size, resolution, and shooting method of the standard image are the same as those of the current pumping unit temperature image. The heat distribution image to be extracted refers to the part of the image corresponding to a certain target heat distribution template after being divided by temperature area. The heat distribution image to be extracted corresponds one-to-one with the target heat distribution template. The local thermal distribution features refer to numerical vectors obtained after image feature extraction, representing the statistical regularity and texture pattern of temperature distribution within the image to be extracted. Image feature extraction can be performed using algorithms or models such as gray-level co-occurrence matrix, local binary pattern, and scale-invariant feature transform. The aforementioned data merging of multiple local thermal distribution features refers to combining multiple local thermal distribution features into a feature set according to a fixed target thermal distribution template.

[0032] S3. Construct an objective ensemble learning model, which includes: random forest, support vector machine, Naive Bayes and multilayer perceptron.

[0033] It is clear that the target ensemble learning model refers to a multi-layer model that includes multiple base learners. This target ensemble learning model comprises a base learning layer and a fusion layer. The base learning layer consists of four base learners connected in parallel: Random Forest, Support Vector Machine, Naive Bayes, and Multilayer Perceptron. The fusion layer is used to fuse the outputs of each base learner in the base learning layer, thereby outputting the final recognition result. Since Random Forest, Support Vector Machine, Naive Bayes, and Multilayer Perceptron each have different assumptions about data distribution and learning inductive biases, combining them as the base learning layer of the ensemble model effectively increases the diversity of the target ensemble learning model. This allows the target ensemble learning model to fuse predictive information from different perspectives, thus achieving more stable and generalized recognition performance than any single model when facing complex multi-source oil and gas operating data.

[0034] S4. Identify the set of hyperparameters to be learned in the target ensemble learning model, and automatically optimize the set of hyperparameters to obtain the optimal set of learning hyperparameters.

[0035] It is clear that the set of hyperparameters to be learned refers to a collection of multiple hyperparameters to be learned. These hyperparameters are configuration parameters that need to be learned by each base learner in the target ensemble learning model, such as the number of trees in a random forest or the maximum depth of a tree. The optimal set of learning hyperparameters refers to the set of optimal values ​​for each hyperparameter to be learned obtained after automatically optimizing the set of learning hyperparameters.

[0036] In detail, the automatic optimization of the set of hyperparameters to be learned to obtain the optimal set of learning hyperparameters includes: A fitness transfer module is built based on the target ensemble learning model, wherein the fitness transfer module includes: a hyperparameter configuration layer, a model training layer, a model validation layer, and a fitness output layer; A candidate hyperparameter vector set is generated based on the set of hyperparameters to be learned, wherein the candidate hyperparameter vector set includes multiple candidate hyperparameter vectors; The candidate hyperparameter vector set is updated using the fitness transfer module to obtain the updated hyperparameter vector set; The updated hyperparameter vector set is used as the candidate hyperparameter vector set, and the step of updating the candidate hyperparameter vector set using the fitness transfer module is returned until a preset stop iteration instruction is received. The set of updated hyperparameter vectors when the stop iteration instruction is received is denoted as the target hyperparameter vector set, and the optimal learning hyperparameter set is determined based on the target hyperparameter vector set.

[0037] It should be explained that the fitness transfer module refers to a multi-layered model consisting of a hyperparameter configuration layer, a model training layer, a model validation layer, and a fitness output layer. This fitness transfer module can calculate the fitness of the input hyperparameter vector. For example, after a candidate hyperparameter vector is input into the fitness transfer module, the module will output the fitness of the candidate vector. The hyperparameter configuration layer refers to a model layer that can configure the parameters of the target ensemble learning model according to the input hyperparameter vector. The model training layer refers to a model layer that can train the target ensemble learning model that has completed parameter configuration and is output by the hyperparameter configuration layer. The model validation layer refers to a model layer that performs performance validation on the target ensemble learning model that has completed configuration and training and is output by the model training layer. The fitness output layer refers to a model layer that can fuse and output multiple validation values ​​(such as the subsequent model estimation accuracy value set) output by the model validation layer.

[0038] Furthermore, the aforementioned generation of candidate hyperparameter vector sets based on the set of hyperparameters to be learned refers to generating multiple sets of values ​​for the set of hyperparameters to be learned using random generation algorithms such as Logistic chaotic mapping and Tent chaotic mapping. Each set of values ​​constitutes a candidate hyperparameter vector. The candidate hyperparameter vector set refers to a collection of multiple candidate hyperparameter vectors, where a candidate hyperparameter vector is a vector generated by a chaotic mapping strategy, representing the potential values ​​of each hyperparameter to be learned in the set of hyperparameters to be learned. The updated hyperparameter vector set refers to the updated candidate hyperparameter vector set. The stop iteration command refers to an automatically initiated command to stop iteration. One iteration is the step described above of returning to input the candidate hyperparameter vector set into the fitness transfer module. For example, when the number of iterations equals the preset maximum number of iterations, the stop iteration command is initiated. The above-mentioned determination of the optimal learning hyperparameter set based on the target hyperparameter vector set means that each target hyperparameter vector in the target hyperparameter vector set corresponds to a candidate vector fitness. The target hyperparameter vector corresponding to the candidate vector fitness with the largest value is recorded as the optimal hyperparameter vector. The values ​​of each vector in the optimal hyperparameter vector form the optimal learning hyperparameter set.

[0039] In detail, the step of updating the candidate hyperparameter vector set using the fitness transfer module to obtain the updated hyperparameter vector set includes: The candidate hyperparameter vector set is input into the fitness transfer module to obtain the candidate vector fitness set, which includes multiple candidate vector fitnesss. Get the current iteration count and the maximum iteration count; Once the historical decreasing parameters are identified, they are dynamically updated based on the current iteration count and the maximum iteration count to obtain the updated decreasing parameters. Hyperparameter vector optimization is performed using updated decreasing parameters and candidate vector fitness sets to obtain an updated hyperparameter vector set.

[0040] It should be explained that the candidate vector fitness set refers to a collection of fitness values ​​for multiple candidate vectors, where the candidate vector fitness refers to the fitness of a candidate hyperparameter vector output by the fitness propagation module. The current iteration count refers to the number of iterations already performed, and the maximum iteration count refers to the pre-set total number of iterations. The historical decreasing parameter refers to the decreasing parameter used to control the search rhythm of the sand cat swarm optimization algorithm during the previous iteration. This decreasing parameter is represented in the sand cat swarm optimization algorithm as: ,in, Indicates a decreasing parameter. This represents the initial decrease amount, used to generate the decrease parameters. Indicates the current iteration number. This indicates the maximum number of iterations. The updated decrementing parameter refers to the new decrementing parameter obtained after updating the historical decrementing parameters.

[0041] Furthermore, in traditional sand cat swarm optimization algorithms, the initial decrease is a fixed value. However, a fixed initial decrease and linear decrease strategy are difficult to adapt to the complex search of different optimization problems, which may lead to insufficient global exploration in the early stage or premature stagnation in local development in the later stage. Therefore, this scheme introduces a dynamically updatable initial decrease. The formula for dynamically updating the initial decrease is as follows: This method allows the initial decrease to change non-linearly and smoothly as the iteration progresses, exhibiting a cosine curve pattern. A larger initial decrease is maintained in the early stages of iteration for broad global exploration, while the initial decrease is gradually reduced in the later stages for more refined local exploration. The aforementioned dynamic update of the historical decrease parameter based on the current iteration number and the maximum iteration number refers to substituting the current iteration number and the maximum iteration number into the formula for dynamically updating the initial decrease to obtain the dynamic decrease. Substituting this dynamic decrease into the formula for calculating the decrease parameter yields the updated decrease parameter.

[0042] Specifically, the step of inputting the candidate hyperparameter vector set into the fitness transfer module to obtain the candidate vector fitness set includes: Candidate hyperparameter vectors are extracted sequentially from the candidate hyperparameter vector set, and the extracted candidate hyperparameter vectors are input into the hyperparameter configuration layer in the fitness transfer module to obtain the hyperparameter vector to be configured. Based on the hyperparameter configuration layer, the hyperparameter vector to be configured is configured to the target ensemble learning model to obtain the configuration ensemble learning model; The configuration ensemble learning model is trained using the model training layer to obtain the trained ensemble learning model, wherein the model training layer contains a subset of training data; The model validation layer is used to validate the performance of the trained ensemble learning model, and a set of accurate model estimates is obtained, which includes multiple accurate model estimates. The accurate set of model estimates is passed to the fitness output layer to obtain the fitness of candidate vectors; The candidate vector fitness set is obtained by summing the candidate vector fitness values ​​corresponding to each candidate hyperparameter vector.

[0043] It should be explained that the "hyperparameter vector to be configured" refers to the candidate hyperparameter vector input into the hyperparameter configuration layer. The "configuration ensemble learning model" refers to the target ensemble learning model after configuring the hyperparameters to be configured. Specifically, configuring the hyperparameter vector to be configured into the target ensemble learning model based on the hyperparameter configuration layer means: in the hyperparameter configuration layer, the values ​​of each hyperparameter to be learned in the target ensemble learning model are set to the corresponding values ​​in the hyperparameter vector to be configured. The target ensemble learning model after this setting is the configuration ensemble learning model. The "training ensemble learning model" refers to the configuration ensemble learning model after training. Specifically, training the configuration ensemble learning model using the model training layer means: training the configuration ensemble learning model using a subset of training data in the model training layer, such as training with the goal of minimizing the loss function. The configuration ensemble learning model after training is the trained ensemble learning model.

[0044] Furthermore, the model training layer includes a subset of training data, which contains multiple training data sets. Each training data set includes a standard multi-source feature dataset and corresponding operating condition labels. The standard multi-source feature dataset refers to a target pumping unit's target multi-source feature dataset obtained manually during its historical operation. The operating condition labels refer to numerical labels manually assigned to the standard multi-source feature dataset, with each label corresponding to an operating condition of a target pumping unit. The model estimation accuracy set refers to a collection of multiple model estimation accuracy values. Each model estimation accuracy value represents the probability that the trained ensemble learning model correctly estimates the operating condition of a certain validation data set. The validation data refers to data used to validate the trained ensemble learning model, and this validation data is obtained in the same way as the training data in the training data subset. After generating the model estimation accuracy set, it is passed to the fitness output layer. The fitness output layer averages the model estimation accuracy set to obtain the candidate vector fitness. The higher the candidate vector fitness, the better the corresponding candidate hyperparameter vector.

[0045] In detail, the step of optimizing the hyperparameter vector using the updated decreasing parameters and the candidate vector fitness set to obtain the updated hyperparameter vector set includes: For each candidate vector fitness in the candidate vector fitness set, perform the following operation: Determine the hyperparameter vector to be controlled corresponding to the fitness of the candidate vector; If the updated decreasing parameter is not greater than the preset value of 1, then the current optimal hyperparameter vector is determined based on the candidate vector fitness and the preset historical optimal vector fitness. A local search is performed based on the current optimal hyperparameter vector and the preset current optimal population vector to obtain the local hyperparameter vector; If the updated decrementing parameter is greater than 1, then a global search is performed on the control hyperparameter vector based on the candidate vector fitness to obtain the global hyperparameter vector; The global hyperparameter vector or the local hyperparameter vector is denoted as the update hyperparameter vector; The updated hyperparameter vectors corresponding to the fitness of each candidate vector are summarized to obtain the updated hyperparameter vector set.

[0046] It should be explained that the hyperparameter vector to be controlled refers to the candidate hyperparameter vector corresponding to the fitness of the candidate vector. When the updated decreasing parameter is not greater than 1, it indicates that the sand cat swarm algorithm is currently in a local search phase. At this time, a small-scale search needs to be performed near the discovered relatively optimal solutions (i.e., the current optimal hyperparameter vector and the current optimal population vector). The historical optimal vector fitness refers to the candidate vector fitness with the largest value in the previous iterations for the individual corresponding to the hyperparameter vector to be controlled. The current optimal hyperparameter vector refers to the hyperparameter vector corresponding to the larger fitness between the candidate vector fitness and the historical optimal vector fitness. The current optimal population vector refers to the candidate hyperparameter vector corresponding to the candidate vector fitness with the largest value among all individuals in the sand cat swarm in the current iteration.

[0047] Furthermore, the local hyperparameter vector refers to the hyperparameter vector obtained after local search. The formula for this local search is: ,in, Represents a local hyperparameter vector. Represents the current optimal population vector. This represents a pre-defined search radius, such as a random number taking values ​​within the interval [0, 1] or a fixed small constant of 0.2. This represents the current optimal hyperparameter vector. This represents the search angle, which is randomly generated to increase the diversity of search directions. This scheme uses a cosine function. By introducing random perturbations into the optimization directions represented by the current optimal hyperparameter vector and the current optimal population vector, a spiral search around the current relatively good solution is achieved. Compared to the simple approach of moving towards the optimal solution, this method maintains directional diversity in the local search, helping to prevent premature homogenization of the sand cat swarm. When the updated decreasing parameter is greater than 1, it indicates that the sand cat swarm algorithm is currently in the global exploration phase, at which point a global search is required. The global hyperparameter vector refers to the hyperparameter vector obtained after the global search.

[0048] In detail, the step of performing a global search on the control hyperparameter vector based on the fitness of the candidate vectors to obtain the global hyperparameter vector includes: Based on the preset forward exploration formula and the fitness of candidate vectors, a forward search is performed on the hyperparameter vector to be controlled to obtain the forward hyperparameter vector; Calculate the update scaling factor based on the current iteration number and the maximum iteration number, and determine the upper boundary vector and the lower boundary vector for optimization. Based on updating the scaling factor, optimizing the upper boundary vector, and optimizing the lower boundary vector, the inverse hyperparameter vector is obtained by back-learning the vector of the control hyperparameter vector. Select the global hyperparameter vector from the forward hyperparameter vector and the reverse hyperparameter vector.

[0049] It needs to be explained that the forward exploration formula is expressed as: ,in, Represents the positive hyperparameter vector. This represents the vector of hyperparameters to be controlled. and All represent randomly generated constants within the range [0, 2]. The forward hyperparameter vector refers to the hyperparameter vector obtained after forward search. The update scaling factor refers to the value used to control the exploration intensity during backward learning, and this update scaling factor is expressed as: ,in, This indicates the update scaling factor. The optimized upper boundary vector refers to a numerical vector representing the upper limit of the values ​​of each hyperparameter in the set of hyperparameters to be learned. Each element of this optimized upper boundary vector represents the upper limit of the value of the hyperparameter at the corresponding position. The optimized lower boundary vector refers to a numerical vector representing the lower limit of the values ​​of each hyperparameter in the set of hyperparameters to be learned. Each element of this optimized lower boundary vector represents the lower limit of the value of the hyperparameter at the corresponding position. The reverse hyperparameter vector refers to the hyperparameter vector obtained after reverse learning. Selecting the global hyperparameter vector from the forward and reverse hyperparameter vectors means: inputting the forward and reverse hyperparameter vectors to the fitness transfer module respectively, and recording the two output values ​​as the forward fitness and reverse fitness respectively. The fitness with the larger value between the forward and reverse fitness is recorded as the global fitness, and the forward or reverse hyperparameter vector corresponding to this global fitness is the global hyperparameter vector.

[0050] Furthermore, this scheme works in concert through a dual search mechanism of forward and reverse directions. During the global exploration phase, it can not only explore the direction of the current optimal solution, but also generate a reverse solution (i.e., a reverse hyperparameter vector) through the lens imaging principle, thereby searching for the symmetrical direction of the current optimal solution. This dual search mechanism enhances the ability of the existing sand cat swarm algorithm to escape the local optimum trap, expands the search coverage, and thus increases the probability of finding the global optimum in a complex high-dimensional hyperparameter space.

[0051] In detail, the back learning of the control hyperparameter vector based on the updated scaling factor, optimized upper boundary vector, and optimized lower boundary vector to obtain the back hyperparameter vector includes: The inverse hyperparameter vector is calculated using the following formula:

[0052] in, Represents the inverse hyperparameter vector. This indicates optimizing the upper boundary vector. This indicates the optimization of the lower boundary vector. This indicates an update to the scaling factor. This represents the vector of hyperparameters to be controlled.

[0053] It should be explained that the above formula is a mathematical expression of a reverse learning strategy based on the lens imaging principle. This formula can generate a reverse solution to the hyperparameter vector to be controlled: a reverse hyperparameter vector, which can explore potential regions opposite to the current position, thereby increasing the diversity of the sand cat population.

[0054] S5. Update the target ensemble learning model based on the optimal learning hyperparameter set to obtain the ensemble learning model to be trained.

[0055] Understandably, the ensemble learning model to be trained refers to the target ensemble learning model after being updated with the optimal learning hyperparameter set. Updating the target ensemble learning model based on the optimal learning hyperparameter set means: assigning each optimal learning hyperparameter in the optimal learning hyperparameter set to each base learner in the target ensemble learning model.

[0056] S6. Train the ensemble learning model to obtain the oil and gas condition identification model. Use the target multi-source feature dataset and the oil and gas condition identification model to identify the current oil and gas condition and obtain the current oil and gas condition.

[0057] It is clear that the oil and gas operating condition identification model refers to the ensemble learning model to be trained, which can be trained using the aforementioned training data. The process of identifying the current oil and gas operating condition using the target multi-source feature dataset and the oil and gas operating condition identification model involves: inputting the target multi-source feature dataset into the oil and gas operating condition identification model; each base learner in the base learning layer of the model outputs a current operating condition vector, resulting in multiple current operating condition vectors. Each current operating condition vector contains multiple probability values, each representing the probability that the current operating condition of the target pumping unit belongs to a certain known operating condition. These multiple current operating condition vectors are then passed to the fusion layer, which performs vector averaging to obtain a fused operating condition vector. This vector averaging involves taking the average of the vector elements with the same position in the multiple current operating condition vectors. These multiple averages constitute the fused operating condition vector. The known operating condition corresponding to the vector element with the largest value in the fused operating condition vector is recorded as the current oil and gas operating condition.

[0058] To address the problems described in the background section, this invention first receives an oil and gas operating condition identification command, determines the target pumping unit based on the command, and then identifies and fuses a data source set based on the target pumping unit. This step constructs a multi-dimensional observation system from equipment surface temperature and internal state to output efficiency by fusing three types of heterogeneous data: image, operation, and production data. Compared to existing technologies that often rely on a single type of data, this provides a more comprehensive and complementary information foundation for identifying complex operating conditions. Furthermore, data is collected from the target pumping unit based on the fused data source set to obtain a target multi-source feature dataset. This step extracts local thermal distribution features from infrared images using a preset key component ROI template and performs feature engineering on time-series data. This targeted and refined feature construction method is more effective in representing fault modes than directly using raw data, improving the quality of input features. Next, a target ensemble learning model is constructed. This step integrates multiple bases with different principles. The learner, utilizing its varying inductive biases, learns complex features from multiple perspectives and then integrates decisions through a fusion layer. Compared to a single model, it exhibits better stability when dealing with nonlinear and high-dimensional data. It automatically optimizes the hyperparameter set to be learned, obtaining the optimal set. This step employs an improved sand cat swarm optimization algorithm, optimizing the search rhythm through dynamic updates of decreasing parameters. It also incorporates a dual forward and reverse search mechanism based on lens imaging principles, enhancing the ability to escape local optima and making the hyperparameter optimization process more efficient and comprehensive. Finally, the ensemble learning model is trained to obtain an oil and gas condition identification model. Using the target multi-source feature dataset and the oil and gas condition identification model, the current oil and gas condition is identified. This step integrates the judgments of multiple models, enabling automated identification of various conditions such as pump leaks and wax deposition. The results are more objective and reliable than traditional methods relying on human experience or single indicators. Therefore, this invention can improve the accuracy of oil and gas production condition identification and reduce the risk of misidentification due to limited information dimensions.

[0059] like Figure 2 The diagram shown is a functional block diagram of an oil and gas production condition identification system based on multi-source data fusion provided in an embodiment of the present invention.

[0060] The oil and gas production condition identification system 100 based on multi-source data fusion described in this invention can be installed in an electronic device. Depending on the functions implemented, the oil and gas production condition identification system 100 may include an identification instruction receiving module 101, an integrated model building module 102, a learning parameter calculation module 103, and an oil and gas condition identification module 104. The module described in this invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and which are stored in the memory of the electronic device. The identification instruction receiving module 101 is used to receive oil and gas operating condition identification instructions, determine the target pumping unit based on the oil and gas operating condition identification instructions, and identify the fusion data source set according to the target pumping unit. The fusion data source set includes: image data source, operation data source and production data source. The integrated model building module 102 is used to collect data from the target oil pumping unit based on the fusion data source set, obtain the target multi-source feature dataset, and construct the target ensemble learning model. The target ensemble learning model includes: random forest, support vector machine, Naive Bayes and multilayer perceptron. The learning parameter calculation module 103 is used to identify the set of hyperparameters to be learned in the target ensemble learning model, automatically optimize the set of hyperparameters to be learned to obtain the optimal set of learning hyperparameters, and update the target ensemble learning model based on the optimal set of learning hyperparameters to obtain the ensemble learning model to be trained. The oil and gas condition identification module 104 is used to train the ensemble learning model to obtain the oil and gas condition identification model, and to identify the current oil and gas condition using the target multi-source feature dataset and the oil and gas condition identification model.

[0061] In detail, the modules in the oil and gas production condition identification system 100 based on multi-source data fusion described in this embodiment of the invention employ the same methods as described above. Figure 1 The method used here is the same as the oil and gas production condition identification method based on multi-source data fusion described above, and can produce the same technical effect, so it will not be repeated here.

[0062] like Figure 3 The diagram shown is a schematic representation of an electronic device for implementing a method for identifying oil and gas production conditions based on multi-source data fusion, according to an embodiment of the present invention.

[0063] The electronic device 1 may include a processor 10, a memory 11 and a bus 12, and may also include a computer program stored in the memory 11 and capable of running on the processor 10, such as a program for identifying oil and gas production conditions based on multi-source data fusion.

[0064] The memory 11 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as the portable hard drive of the electronic device 1. In other embodiments, the memory 11 can be an external storage device of the electronic device 1, such as a plug-in portable hard drive, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device 1. Furthermore, the memory 11 includes both internal storage units and external storage devices of the electronic device 1. The memory 11 can be used not only to store application software and various types of data installed on the electronic device 1, such as the code of a method for identifying oil and gas production conditions based on multi-source data fusion, but also to temporarily store data that has been output or will be output.

[0065] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., a method for identifying oil and gas production conditions based on multi-source data fusion) and calls data stored in the memory 11 to perform various functions of the electronic device 1 and process data.

[0066] The bus 12 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 12 can be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to realize the connection and communication between the memory 11 and at least one processor 10, etc.

[0067] Figure 3 Only electronic devices with components are shown; those skilled in the art will understand that... Figure 3The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0068] For example, although not shown, the electronic device 1 may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0069] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish communication connections between the electronic device 1 and other electronic devices.

[0070] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), and optionally, a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device 1 and to display a visual user interface.

[0071] The program for identifying oil and gas production conditions based on multi-source data fusion, stored in the memory 11 of the electronic device 1, is a combination of multiple instructions. When run in the processor 10, it can achieve the following: Receive oil and gas operating condition identification instructions, determine the target pumping unit based on the oil and gas operating condition identification instructions, and identify the fusion data source set based on the target pumping unit. The fusion data source set includes: image data source, operation data source and production data source. Data is collected from the target pumping unit based on the fused data source set to obtain the target multi-source feature dataset; Construct an objective ensemble learning model, which includes: random forest, support vector machine, Naive Bayes and multilayer perceptron; The set of hyperparameters to be learned in the target ensemble learning model is identified, and the set of hyperparameters to be learned is automatically optimized to obtain the optimal set of learning hyperparameters; The target ensemble learning model is updated based on the optimal learning hyperparameter set to obtain the ensemble learning model to be trained. The ensemble learning model to be trained is trained to obtain the oil and gas condition identification model. The current oil and gas condition is then identified using the target multi-source feature dataset and the oil and gas condition identification model.

[0072] Specifically, the processor 10's implementation method for the above instructions can be found in [reference needed]. Figures 1 to 3 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.

[0073] Furthermore, if the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0074] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following: Receive oil and gas operating condition identification instructions, determine the target pumping unit based on the oil and gas operating condition identification instructions, and identify the fusion data source set based on the target pumping unit. The fusion data source set includes: image data source, operation data source and production data source. Data is collected from the target pumping unit based on the fused data source set to obtain the target multi-source feature dataset; Construct an objective ensemble learning model, which includes: random forest, support vector machine, Naive Bayes and multilayer perceptron; The set of hyperparameters to be learned in the target ensemble learning model is identified, and the set of hyperparameters to be learned is automatically optimized to obtain the optimal set of learning hyperparameters; The target ensemble learning model is updated based on the optimal learning hyperparameter set to obtain the ensemble learning model to be trained. The ensemble learning model to be trained is trained to obtain the oil and gas condition identification model. The current oil and gas condition is then identified using the target multi-source feature dataset and the oil and gas condition identification model.

[0075] In the embodiments provided by this invention, it should be understood that the disclosed devices, systems, and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative, and actual implementations may have other classification methods.

[0076] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0077] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0078] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for identifying oil and gas production conditions based on multi-source data fusion, characterized in that, The method includes: Receive oil and gas operating condition identification instructions, determine the target pumping unit based on the oil and gas operating condition identification instructions, and identify the fusion data source set based on the target pumping unit. The fusion data source set includes: image data source, operation data source and production data source. Data is collected from the target pumping unit based on the fused data source set to obtain the target multi-source feature dataset; Construct an objective ensemble learning model, which includes: random forest, support vector machine, Naive Bayes and multilayer perceptron; The set of hyperparameters to be learned in the target ensemble learning model is identified, and the set of hyperparameters to be learned is automatically optimized to obtain the optimal set of learning hyperparameters; The target ensemble learning model is updated based on the optimal learning hyperparameter set to obtain the ensemble learning model to be trained. The ensemble learning model to be trained is trained to obtain the oil and gas condition identification model. The current oil and gas condition is then identified using the target multi-source feature dataset and the oil and gas condition identification model.

2. The method for identifying oil and gas production conditions based on multi-source data fusion as described in claim 1, characterized in that, The step of collecting data from the target pumping unit based on the fused data source set to obtain the target multi-source feature dataset includes: Temperature data of the target pumping unit is acquired by using image data sources from a fusion data source set, resulting in a current temperature image of the pumping unit. The current heat distribution features are extracted from the current pumping unit temperature image to obtain the current heat distribution features; Obtain the current production data and current operating data of the target pumping unit based on the operating data source and the production data source, respectively; Perform feature engineering on the current production data and the current operation data respectively to obtain the current production characteristics and the current operation characteristics; Data fusion is performed on the current heat distribution characteristics, current production characteristics, and current operation characteristics to obtain the target multi-source feature dataset.

3. The method for identifying oil and gas production conditions based on multi-source data fusion as described in claim 2, characterized in that, The step of extracting thermal distribution features from the current pumping unit temperature image to obtain the current thermal distribution features includes: By defining key component areas for the target pumping unit, multiple target thermal distribution areas are obtained. Target heat distribution regions are extracted sequentially from multiple target heat distribution regions, and ROI templates are constructed for the target heat distribution regions to obtain target heat distribution templates; By summarizing the target heat distribution templates, multiple target heat distribution templates are obtained; The temperature region of the current pumping unit temperature image is divided using multiple target heat distribution templates to obtain multiple heat distribution images to be extracted; Image feature extraction is performed on each of the multiple heat distribution images to be extracted, resulting in multiple local heat distribution features; Multiple local heat distribution features are merged to obtain the current heat distribution feature.

4. The method for identifying oil and gas production conditions based on multi-source data fusion as described in claim 1, characterized in that, The automatic optimization of the hyperparameter set to be learned to obtain the optimal hyperparameter set includes: A fitness transfer module is built based on the target ensemble learning model, wherein the fitness transfer module includes: a hyperparameter configuration layer, a model training layer, a model validation layer, and a fitness output layer; A candidate hyperparameter vector set is generated based on the set of hyperparameters to be learned, wherein the candidate hyperparameter vector set includes multiple candidate hyperparameter vectors; The candidate hyperparameter vector set is updated using the fitness transfer module to obtain the updated hyperparameter vector set; The updated hyperparameter vector set is used as the candidate hyperparameter vector set, and the step of updating the candidate hyperparameter vector set using the fitness transfer module is returned until a preset stop iteration instruction is received. The set of updated hyperparameter vectors when the stop iteration instruction is received is denoted as the target hyperparameter vector set, and the optimal learning hyperparameter set is determined based on the target hyperparameter vector set.

5. The method for identifying oil and gas production conditions based on multi-source data fusion as described in claim 4, characterized in that, The step of updating the candidate hyperparameter vector set using the fitness transfer module to obtain the updated hyperparameter vector set includes: The candidate hyperparameter vector set is input into the fitness transfer module to obtain the candidate vector fitness set, which includes multiple candidate vector fitnesss. Get the current iteration count and the maximum iteration count; Once the historical decreasing parameters are identified, they are dynamically updated based on the current iteration count and the maximum iteration count to obtain the updated decreasing parameters. Hyperparameter vector optimization is performed using updated decreasing parameters and candidate vector fitness sets to obtain an updated hyperparameter vector set.

6. The method for identifying oil and gas production conditions based on multi-source data fusion as described in claim 5, characterized in that, The step of inputting the candidate hyperparameter vector set into the fitness transfer module to obtain the candidate vector fitness set includes: Candidate hyperparameter vectors are extracted sequentially from the candidate hyperparameter vector set, and the extracted candidate hyperparameter vectors are input into the hyperparameter configuration layer in the fitness transfer module to obtain the hyperparameter vector to be configured. Based on the hyperparameter configuration layer, the hyperparameter vector to be configured is configured to the target ensemble learning model to obtain the configuration ensemble learning model; The configuration ensemble learning model is trained using the model training layer to obtain the trained ensemble learning model, wherein the model training layer contains a subset of training data; The model validation layer is used to validate the performance of the trained ensemble learning model, and a set of accurate model estimates is obtained, which includes multiple accurate model estimates. The accurate set of model estimates is passed to the fitness output layer to obtain the fitness of candidate vectors; The candidate vector fitness set is obtained by summing the candidate vector fitness values ​​corresponding to each candidate hyperparameter vector.

7. The method for identifying oil and gas production conditions based on multi-source data fusion as described in claim 6, characterized in that, The process of optimizing hyperparameter vectors using updated decreasing parameters and candidate vector fitness sets to obtain an updated hyperparameter vector set includes: For each candidate vector fitness in the candidate vector fitness set, perform the following operation: Determine the hyperparameter vector to be controlled corresponding to the fitness of the candidate vector; If the updated decreasing parameter is not greater than the preset value of 1, then the current optimal hyperparameter vector is determined based on the candidate vector fitness and the preset historical optimal vector fitness. A local search is performed based on the current optimal hyperparameter vector and the preset current optimal population vector to obtain the local hyperparameter vector; If the updated decrementing parameter is greater than 1, then a global search is performed on the control hyperparameter vector based on the candidate vector fitness to obtain the global hyperparameter vector; The global hyperparameter vector or the local hyperparameter vector is denoted as the update hyperparameter vector; The updated hyperparameter vectors corresponding to the fitness of each candidate vector are summarized to obtain the updated hyperparameter vector set.

8. The method for identifying oil and gas production conditions based on multi-source data fusion as described in claim 7, characterized in that, The step of performing a global search on the control hyperparameter vector based on the fitness of the candidate vectors to obtain the global hyperparameter vector includes: Based on the preset forward exploration formula and the fitness of candidate vectors, a forward search is performed on the hyperparameter vector to be controlled to obtain the forward hyperparameter vector; Calculate the update scaling factor based on the current iteration number and the maximum iteration number, and determine the upper boundary vector and the lower boundary vector for optimization. Based on updating the scaling factor, optimizing the upper boundary vector, and optimizing the lower boundary vector, the inverse hyperparameter vector is obtained by back-learning the vector of the control hyperparameter vector. Select the global hyperparameter vector from the forward hyperparameter vector and the reverse hyperparameter vector.

9. The method for identifying oil and gas production conditions based on multi-source data fusion as described in claim 8, characterized in that, The back-learning of the control hyperparameter vector based on the updated scaling factor, optimized upper boundary vector, and optimized lower boundary vector yields the back-learned hyperparameter vector, including: The inverse hyperparameter vector is calculated using the following formula: in, Represents the inverse hyperparameter vector. This indicates optimizing the upper boundary vector. This indicates the optimization of the lower boundary vector. This indicates an update to the scaling factor. This represents the vector of hyperparameters to be controlled.

10. An oil and gas production condition identification system based on multi-source data fusion, characterized in that, The system includes: The identification instruction receiving module is used to receive oil and gas operating condition identification instructions, determine the target pumping unit based on the oil and gas operating condition identification instructions, and identify the fusion data source set based on the target pumping unit. The fusion data source set includes: image data source, operation data source and production data source. The ensemble model building module is used to collect data from the target oil pumping unit based on the fusion data source set, obtain the target multi-source feature dataset, and build the target ensemble learning model. The target ensemble learning model includes: random forest, support vector machine, Naive Bayes and multilayer perceptron. The learning parameter calculation module is used to identify the set of hyperparameters to be learned in the target ensemble learning model, automatically optimize the set of hyperparameters to be learned to obtain the optimal set of learning hyperparameters, and update the target ensemble learning model based on the optimal set of learning hyperparameters to obtain the ensemble learning model to be trained. The oil and gas operating condition identification module is used to train the ensemble learning model to obtain the oil and gas operating condition identification model. It uses the target multi-source feature dataset and the oil and gas operating condition identification model to identify the current oil and gas operating condition and obtain the current oil and gas operating condition.