A method, system, equipment and medium for autonomous diagnosis of oil production process

By using autonomous diagnostic methods to monitor and identify abnormal events in the oil production process, constructing fault tree models and generating fault reports, the problems of equipment failure and insufficient operator experience are solved. This enables autonomous identification and timely handling of abnormal events, thereby improving production efficiency and safety.

CN120541450BActive Publication Date: 2025-10-28中海油能源发展股份有限公司采油服务分公司 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511047021.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-29
Publication Date
2025-10-28
Estimated Expiration
2045-07-29

AI Technical Summary

Technical Problem

In oil refining and chemical production, there are production interruptions and safety threats caused by equipment failures. Inexperienced on-site operators lead to inaccurate judgment of abnormal parameters, and traditional maintenance plans result in unnecessary high costs.

Method used

Production data is collected through autonomous diagnostic methods, time-series segmentation and decentralized processing are performed, covariance matrix eigenvalues ​​are calculated, fault tree models are constructed, user experience information is obtained, and fault reports and response texts are generated using natural language processing.

Benefits of technology

It enables autonomous identification and timely handling of abnormal events, reducing production losses and improving production efficiency and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120541450B_ABST
    Figure CN120541450B_ABST
Patent Text Reader

Abstract

This invention relates to the field of petroleum production, providing a method, system, equipment, and medium for autonomous diagnosis of petroleum production processes. The method includes: segmenting production data into a time-series format to obtain a production data sequence; extracting target diagnostic data and training data; decentralizing the data and calculating the covariance matrix and eigenvalues ​​to obtain spatial feature dimensions; projecting these dimensions to obtain projected features; projecting these features to obtain diagnostic features; using the diagnostic and projected features to determine abnormal events; decomposing the abnormal events using a fault tree model to obtain an event fault tree; connecting the event fault trees using logic gates to obtain a fault report; parsing experiential text to obtain structured experiential data; merging the structured experiential data into an initial document to obtain a document; generating semantic vectors from the document; calculating the query statement vectors; and generating response text. This invention can effectively monitor faults and provide solutions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of petroleum production technology, and in particular to a method, system, equipment and medium for autonomous diagnosis of petroleum production processes. Background Technology

[0002] Oil refining processes frequently face equipment failures and production interruptions, threatening both production efficiency and safety. Therefore, a full-process autonomous diagnostic system is needed to meet the demands for improved production safety and efficiency. However, traditional fixed maintenance schedules based on timelines can lead to unnecessary maintenance and high costs. Precise equipment status monitoring and fault prediction can optimize maintenance plans, avoiding unnecessary repairs and replacements, thereby reducing maintenance costs. In actual oil refining production, issues such as lack of experience among staff and varying skill levels can lead to inaccurate or incomplete assessments of abnormal parameters. Inaccurate or inappropriate handling of accidents and anomalies can further exacerbate or escalate production incidents. Furthermore, some production anomalies involve numerous influencing factors and complex operating conditions, making them difficult to detect and prevent in a timely manner, resulting in accidents and production losses. Additionally, real-time assessment of production conditions and perception of anomalies rely primarily on on-site personnel. Currently, the age structure of shift workers is generally young, resulting in insufficient experience in unit production, particularly in assessing and handling complex and high-impact production events. Summary of the Invention

[0003] This invention aims to at least solve one of the technical problems existing in related technologies. To this end, this invention provides a method, system, equipment, and medium for autonomous diagnosis of petroleum production processes, enabling the monitoring and identification of abnormal events in the petroleum production process and generating corresponding solutions.

[0004] This invention provides a method for autonomous diagnosis of petroleum production processes, comprising:

[0005] S1: Collect production data, perform time-series segmentation on the production data to obtain a production data sequence, and extract target diagnostic data and training data from the production data sequence;

[0006] S2: Decentralize the training data and calculate the covariance matrix. Calculate the eigenvalues ​​of the covariance matrix. Obtain the spatial feature dimension based on the eigenvalues. Project the spatial feature dimension to obtain the projected features. Project the diagnostic data to obtain the diagnostic features. Determine anomalies using the diagnostic features and projected features, and obtain the abnormal events.

[0007] S3: Construct a fault tree model, decompose abnormal events through the fault tree model to obtain an event fault tree, and connect the event fault trees using logic gates to obtain a fault report;

[0008] S4: Obtain experience information from users, parse the experience text to obtain structured experience data, obtain the initial document, merge the structured experience data into the initial document, and obtain the document.

[0009] S5: Generate semantic vectors for document documents, write consultation statements based on fault reports, obtain consultation statement vectors for consultation statements, and generate response text based on semantic vectors and consultation statement vectors.

[0010] According to the self-diagnosis method for petroleum production process provided by the present invention, step S1 further includes:

[0011] S11: Deploy production process monitoring equipment and obtain the production data from the production process monitoring equipment;

[0012] S12: The production data is time-series segmented and sorted according to the timestamp of the production data to obtain a production data sequence including production data segments;

[0013] S13: Select the production data segment from the production data sequence as the training data, and use the other production data segments as the target diagnostic data.

[0014] According to the self-diagnosis method for petroleum production process provided by the present invention, step S2 further includes:

[0015] S21: Calculate the average value of the production data segments in the training data, and decentralize the training data using the average value to obtain decentralized training data;

[0016] S22: Calculate the covariance matrix of the decentralized training data, calculate the eigenvalues ​​of the covariance matrix, and calculate the cumulative contribution rate of the production data segment in the training data based on the eigenvalues ​​to obtain the spatial feature dimension;

[0017] S23: Project the decentralized training data using the spatial feature dimension to obtain projected features, and project the diagnostic data using the spatial feature dimension to obtain diagnostic features;

[0018] S24: Perform a L2 norm comparison on the projected features and the diagnostic features to obtain a comparison result, determine a comparison result threshold, and perform anomaly determination based on the comparison result and the comparison result threshold to obtain the abnormal event.

[0019] According to the self-diagnosis method for petroleum production process provided by the present invention, step S3 further includes:

[0020] S31: Construct a fault tree model, decompose abnormal events through the fault tree model, and obtain an event fault tree including top event, intermediate event and bottom event;

[0021] S32: Obtain the production process flow, analyze intermediate events and bottom events layer by layer according to the production process flow, and use the logic gates to connect the event fault tree to obtain a fault report.

[0022] According to the self-diagnosis method for petroleum production process provided by the present invention, in step S4, a prompt field is determined, the user inputs the experience information according to the prompt field, the experience text is parsed and a timestamp of the experience information is added to obtain the structured experience data.

[0023] According to the self-diagnosis method for petroleum production process provided by the present invention, step S5 further includes:

[0024] S51: The document is structured using natural language processing technology to obtain a structured document, and the structured document is vectorized using the BERT model to obtain the semantic vector;

[0025] S52: Write consultation statements based on the fault report, and use the BERT model to vectorize the consultation statements to obtain the consultation statement vector;

[0026] S53: Calculate the cosine similarity between the semantic vector and the consultation statement vector, obtain the language model input sequence based on the cosine similarity, and input the language model input sequence into the large language model to obtain the response text.

[0027] According to the self-diagnosis method for petroleum production process provided by the present invention, in step S53, the pre-training parameters of the large language model are obtained, the large language model is trained using the data document and low-rank adaptation technology to obtain fine-tuning parameters, the pre-training parameters are updated using the fine-tuning parameters, and the response text is generated based on the updated pre-training parameters.

[0028] This invention also provides an autonomous diagnostic system for petroleum production processes, comprising:

[0029] Data extraction module: used to collect production data, perform time-series segmentation on the production data to obtain production data sequences, and extract target diagnostic data and training data from the production data sequences;

[0030] The abnormal event module is used to decentralize the training data and calculate the covariance matrix, calculate the eigenvalues ​​of the covariance matrix, obtain the spatial feature dimension based on the eigenvalues, project the spatial feature dimension to obtain the projected features, project the diagnostic data to obtain the diagnostic features, and determine the abnormal event based on the diagnostic features and the projected features.

[0031] Fault Reporting Module: Used to build a fault tree model, decompose abnormal events through the fault tree model to obtain an event fault tree, and connect the event fault trees using logic gates to obtain a fault report;

[0032] Documentation module: Used to obtain experience information from users, parse the experience text to obtain structured experience data, obtain the initial documentation, and merge the structured experience data into the initial documentation to obtain the documentation.

[0033] The response text module is used to generate semantic vectors for documentation documents, write consultation statements based on fault reports, obtain consultation statement vectors for consultation statements, and generate response text based on semantic vectors and consultation statement vectors.

[0034] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the self-diagnosis method for an oil production process as described above.

[0035] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of an autonomous diagnostic method for an oil production process as described above.

[0036] The above-described one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects:

[0037] This invention provides a method, system, equipment, and medium for autonomous diagnosis of petroleum production processes. By autonomously determining anomalies in production data, it can autonomously identify abnormal events and analyze them using a fault tree model to generate fault reports. After obtaining the fault reports, it can also automatically generate response text based on user-written inquiries, thereby providing users with fault handling and solutions. This effectively compensates for the lack of technical expertise among on-site operators, enabling them to promptly detect and take appropriate measures to handle faults, thereby improving production efficiency and reducing losses.

[0038] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0040] Figure 1 This is a flowchart illustrating an autonomous diagnostic method for petroleum production processes provided by the present invention.

[0041] Figure 2 This is a schematic diagram of the structure of an autonomous diagnostic system for petroleum production processes provided by the present invention.

[0042] Figure 3 This is a schematic diagram of the structure of an autonomous diagnostic device for petroleum production processes provided by the present invention.

[0043] Figure label:

[0044] 100. Data extraction module; 200. Abnormal event module; 300. Fault reporting module; 400. Documentation module; 500. Reply text module; 810. Processor; 820. Communication interface; 830. Memory; 840. Communication bus. Detailed Implementation

[0045] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention. The following embodiments are used to illustrate this invention but cannot be used to limit the scope of this invention.

[0046] In the description of the embodiments of the present invention, it should be noted that the terms "first", "second" and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0047] In the description of the embodiments of the present invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "connected" and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in the embodiments of the present invention based on the specific circumstances.

[0048] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0049] The following is combined Figures 1 to 3 Specific embodiments of the present invention are described below:

[0050] Figure 1 This is a flowchart illustrating an autonomous diagnostic method for petroleum production processes provided by this invention. First, production data is collected and time-series segmented to obtain a production data sequence. Target diagnostic data and training data are extracted from the production data sequence. Next, the training data is decentralized, and a covariance matrix is ​​calculated. Eigenvalues ​​of the covariance matrix are calculated, and spatial feature dimensions are obtained based on these eigenvalues. These spatial feature dimensions are then projected to obtain projected features. Diagnostic data is projected to obtain diagnostic features. Anomaly detection is performed using both diagnostic and projected features to identify abnormal events. Subsequently, a fault tree model is constructed, and abnormal events are decomposed using the fault tree model to obtain an event fault tree. Logic gates are used to connect the event fault trees to obtain a fault report. Next, experience information from users is acquired, and the experience text is parsed to obtain structured experience data. An initial document is obtained, and the structured experience data is merged into the initial document to obtain a document document. Finally, a semantic vector of the document document is generated. Consultation statements are written based on the fault report, and the consultation statement vector is obtained. Response text is generated based on the semantic vector and the consultation statement vector.

[0051] This invention provides a method for autonomous diagnosis of petroleum production processes, comprising:

[0052] S1: Collect production data, perform time-series segmentation on the production data to obtain a production data sequence, and extract target diagnostic data and training data from the production data sequence;

[0053] Furthermore, the objective of this stage is to perform time-series segmentation on the production data to extract target diagnostic data and training data. Specifically, step S1 further includes:

[0054] S11: Deploy production process monitoring equipment and obtain the production data from the production process monitoring equipment;

[0055] S12: The production data is time-series segmented and sorted according to the timestamp of the production data to obtain a production data sequence including production data segments;

[0056] S13: Select the production data segment from the production data sequence as the training data, and use the other production data segments as the target diagnostic data.

[0057] The specific implementation method for the above steps in this embodiment is as follows:

[0058] First, production process monitoring equipment needs to be installed on the production equipment. This equipment can continuously collect process parameter data from the production equipment, such as pressure, temperature, and liquid level of each piece of equipment during production. This data is then uploaded to the terminal system of the production process monitoring equipment to obtain production data.

[0059] Subsequently, the timestamps of the production data are obtained, that is, the time when each piece of production data was generated in the most recent period is taken as the timestamp. The production data is then sorted chronologically from beginning to end according to the timestamps, and segmented into time-series segments of several pieces of production data, thus obtaining production data segments. In this embodiment, every 30 pieces of production data are divided into a production data segment, and the total number of production data is 330, so 11 production data segments can be obtained. The set of these production data segments is taken as the production data sequence, and the 30 production data sequences in each segment are arranged in a column.

[0060] Finally, the earlier production data segments in the production data sequence are used as training data. In this embodiment, the first 10 production data segments are selected as training data. ,and ,in For the i-th production data segment, the remaining ones As target diagnostic data .

[0061] S2: Decentralize the training data and calculate the covariance matrix. Calculate the eigenvalues ​​of the covariance matrix. Obtain the spatial feature dimension based on the eigenvalues. Project the spatial feature dimension to obtain the projected features. Project the diagnostic data to obtain the diagnostic features. Determine anomalies using the diagnostic features and projected features, and obtain the abnormal events.

[0062] Furthermore, the objective of this stage is to obtain the covariance matrix and calculate its eigenvalues ​​to obtain the spatial feature dimensions, perform projection to obtain projected features and diagnostic features, and then perform anomaly detection to identify anomalous events. Specifically, step S2 further includes:

[0063] S21: Calculate the average value of the production data segments in the training data, and decentralize the training data using the average value to obtain decentralized training data;

[0064] S22: Calculate the covariance matrix of the decentralized training data, calculate the eigenvalues ​​of the covariance matrix, and calculate the cumulative contribution rate of the production data segment in the training data based on the eigenvalues ​​to obtain the spatial feature dimension;

[0065] S23: Project the decentralized training data using the spatial feature dimension to obtain projected features, and project the diagnostic data using the spatial feature dimension to obtain diagnostic features;

[0066] S24: Perform a L2 norm comparison on the projected features and the diagnostic features to obtain a comparison result, determine a comparison result threshold, and perform anomaly determination based on the comparison result and the comparison result threshold to obtain the abnormal event.

[0067] The specific implementation method for the above steps in this embodiment is as follows:

[0068] First, the average value of the production data in each production data segment of the training data needs to be calculated. Next, the training data is decentralized, which involves subtracting the average value from the production data of each production data segment, so that the average value of each production data segment in the training data is 0. The decentralized training data is then used as the decentralized training data. .

[0069] Then, the covariance of the decentralized training data is calculated to obtain the covariance matrix C. Since it has been decentralized, the mean of each production data segment in the decentralized training data has become 0, so we can directly multiply the decentralized training data with its transpose.

[0070]

[0071] Where A is the number of production data segments included in each production data segment of the centralized training data, which is 30 here, and T represents transpose.

[0072] Then, the eigenvalues ​​of the covariance matrix are calculated using the formula for calculating the eigenvalues ​​of a matrix. :

[0073]

[0074] Where v is the eigenvector of the covariance matrix.

[0075] The feature values ​​include the feature value of the i-th production data segment in each production data segment of the decentralized training data. Using paragraph feature values, the cumulative contribution rate B of the first few production data paragraphs can be calculated. Here, to determine the spatial feature dimension, we need to take the minimum value K of the number of production data paragraphs that results in a cumulative contribution rate ≥ 85%, and use K as the spatial feature dimension.

[0076]

[0077] Next, the decentralized training data is projected using the spatial feature dimension to obtain the projected features. :

[0078]

[0079] in, The matrix is ​​composed of the eigenvectors of the first K production data segments:

[0080]

[0081] Let be the feature vector of the Kth production data segment. The feature vector of the covariance matrix includes the feature vector of each production data segment.

[0082] Next, the diagnostic data is projected using spatial feature dimensions to obtain diagnostic features. :

[0083]

[0084] Finally, the threshold for the comparison results was determined based on experience. Here, when there are too many false alarms, the threshold value of the comparison result can be appropriately increased; when there are too many false negatives, the threshold value of the comparison result can be appropriately decreased to meet the sensitivity requirements. Each row of the projected features is compared with the diagnostic features using the L2 norm to complete the anomaly determination.

[0085]

[0086] in, This means that the content is compared using the second norm. If the result of the second norm comparison of each row of projected features is greater than the comparison result threshold, it is determined that the target diagnostic data is abnormal. The abnormality or failure of the production process and production equipment that caused the abnormality of the target diagnostic data is then judged, thereby obtaining the abnormal event.

[0087] S3: Construct a fault tree model, decompose abnormal events through the fault tree model to obtain an event fault tree, and connect the event fault trees using logic gates to obtain a fault report;

[0088] Furthermore, the objective of this stage is to construct a fault tree model, thereby decomposing abnormal events and obtaining an event fault tree, thus generating a fault report. Specifically, step S3 further includes:

[0089] S31: Construct a fault tree model, decompose abnormal events through the fault tree model, and obtain an event fault tree including top event, intermediate event and bottom event;

[0090] S32: Obtain the production process flow, analyze intermediate events and bottom events layer by layer according to the production process flow, and use the logic gates to connect the event fault tree to obtain a fault report.

[0091] Regarding the above steps, the specific implementation plan in this embodiment is as follows:

[0092] First, a fault tree model needs to be constructed. This model decomposes and analyzes abnormal events, starting with the abnormal event itself (the top event) and breaking it down into intermediate and bottom events. Intermediate events are those that may lead to the top event, while bottom events are those that cause the intermediate events. For example, when the abnormal event is a pipeline blockage, the top event is the blockage itself. Intermediate events could include excessively high oil viscosity and the presence of impurities in the oil. Bottom events related to excessively high oil viscosity could include excessively long distillation time and excessively low oil temperature. Arranging the top, intermediate, and bottom events in these three hierarchical levels sequentially yields the event fault tree.

[0093] Subsequently, the production process flow is acquired, and intermediate and basic events are analyzed layer by layer according to the process flow. Logic gates are used to connect the intermediate and basic events. Logic gates include AND gates: indicating that when multiple events occur simultaneously, the next higher-level event occurs. OR gates: indicating that when any one of multiple events occurs, the next higher-level event occurs. By connecting the event fault tree using logic gates, the event fault tree can be constructed. The root cause of the abnormal event can then be located by analyzing the event fault tree and production data, thereby generating a fault report.

[0094] S4: Obtain experience information from users, parse the experience text to obtain structured experience data, obtain the initial document, merge the structured experience data into the initial document, and obtain the document.

[0095] Furthermore, the objective of this stage is to acquire and parse the experience text to obtain structured data and merge it into the initial document. Specifically, in step S4, a prompt field is determined, the user inputs the experience information according to the prompt field, the experience text is parsed, and a timestamp of the experience information is added to obtain the structured experience data.

[0096] Regarding the above steps, the specific implementation plan in this embodiment is as follows:

[0097] During the process of handling faults, users may generate some experience-based solutions, which are valuable when generating response text for the fault. Therefore, it is first necessary to define the prompt field. The prompt field is the text that prompts the user to input the required content and format when entering experience information. In this embodiment, the prompt field can be "Please enter experience information in the order of fault time, fault location, fault phenomenon, fault cause, and handling suggestions." The user can then choose to input experience information according to the format given by the prompt field, or they can choose to input a paragraph containing this information in their own natural language. Subsequently, natural language processing technology is used to parse the experience text, performing text segmentation, semantic understanding, entity recognition, and information extraction to obtain structured experience data.

[0098] When parsing the experience text, it is crucial to check for the presence of fault time information. If not, the system time at the time the experience text was entered is used as the fault time, and this fault time is used as the experience information timestamp. Since experience data becomes outdated due to production process optimization and equipment updates, the experience information timestamp is essential. Finally, initial documentation including equipment manuals, operating procedures, process flow descriptions, and historical fault cases is obtained. If the initial documentation is in paper form, it needs to be scanned, and optical character recognition (OCR) technology is used to recognize characters in the scanned document, converting the paper document into a usable initial documentation document. The structured experience data is then merged into the initial documentation document to obtain the final documentation document.

[0099] S5: Generate semantic vectors for document documents, write consultation statements based on fault reports, obtain consultation statement vectors for consultation statements, and generate response text based on semantic vectors and consultation statement vectors.

[0100] Furthermore, the objective of this stage is to obtain the query statement vector of the query statement, thereby generating the response text. Specifically, step S5 further includes:

[0101] S51: The document is structured using natural language processing technology to obtain a structured document, and the structured document is vectorized using the BERT model to obtain the semantic vector;

[0102] S52: Write consultation statements based on the fault report, and use the BERT model to vectorize the consultation statements to obtain the consultation statement vector;

[0103] S53: Calculate the cosine similarity between the semantic vector and the consultation statement vector, obtain the language model input sequence based on the cosine similarity, and input the language model input sequence into the large language model to obtain the response text.

[0104] In step S53, the pre-training parameters of the large language model are obtained, the large language model is trained using the document and low-rank adaptation technique to obtain fine-tuning parameters, the pre-training parameters are updated using the fine-tuning parameters, and the response text is generated based on the updated pre-training parameters.

[0105] The specific implementation method for the above steps in this embodiment is as follows:

[0106] First, the document Text needs to be structured using natural language processing (NLP) techniques. This involves cleaning and formatting the extracted text using NLP, including removing irrelevant characters, filtering noise, standardizing text formatting, and extracting key information. The goal is to transform the unstructured document into a unified, clean, structured document D, represented as:

[0107]

[0108] Here, NLP-Clean() indicates that natural language processing technology is used to structure the content within the parentheses. The structured document is then segmented into structured document paragraphs, and the k-th structured document paragraph is then processed. Vectorization is performed using the BERT model to obtain the k-th semantic vector. :

[0109]

[0110] Here, Sentence-BERT() means vectorizing the content within the parentheses using the Sentence BERT model. This yields semantic vectors for all structured document paragraphs.

[0111] The user then writes a consultation statement based on the fault report, asking how to resolve the fault. The BERT model is used to vectorize the consultation statements, resulting in consultation statement vectors. :

[0112]

[0113] Next, since a higher cosine similarity between two text vectors indicates a stronger correlation, the cosine similarity between each semantic vector and the query statement vector is calculated. The semantic vectors are then arranged in descending order of cosine similarity, and the top m semantic vectors are selected. These semantic vectors are concatenated with the query statement vector to obtain the language model input sequence. This language model input sequence is then fed into a large language model to obtain the response text.

[0114] The large language model includes pre-trained parameters. Because its learning data comes from diverse sources and covers a broad range of topics, training for a large language model generally aims to make it more general rather than specialized in a specific domain. To make the large language model more specialized in the oil production process domain, it's necessary to obtain its pre-trained parameters, use relevant documentation, and then train the model using low-rank adaptation techniques to obtain fine-tuned parameters. Adding these fine-tuned parameters to the pre-trained parameters yields updated pre-trained parameters, which the large language model then uses to generate response text.

[0115] This invention can effectively generate timely warnings for faults, analyze the faults, find the causes of the faults, and generate appropriate response texts.

[0116] The following describes an autonomous diagnostic device for a petroleum production process provided by the present invention. The autonomous diagnostic device for a petroleum production process described below and the autonomous diagnostic method for a petroleum production process described above can be referred to and correspond to each other.

[0117] Figure 2 An example is a schematic diagram of the structure of an autonomous diagnostic system for oil production processes, such as... Figure 2 As shown, a method for performing an autonomous diagnostic of a petroleum production process as described above includes:

[0118] Data extraction module 100: used to collect production data, perform time-series segmentation on the production data to obtain production data sequences, and extract target diagnostic data and training data from the production data sequences;

[0119] Anomaly Module 200: This module is used to decentralize the training data and calculate the covariance matrix, calculate the eigenvalues ​​of the covariance matrix, obtain the spatial feature dimension based on the eigenvalues, project the spatial feature dimension to obtain the projected features, project the diagnostic data to obtain the diagnostic features, determine anomalies based on the diagnostic features and the projected features, and obtain the anomaly events.

[0120] Fault Reporting Module 300: Used to construct a fault tree model, decompose abnormal events through the fault tree model to obtain an event fault tree, and connect the event fault trees using logic gates to obtain a fault report;

[0121] Document Module 400: Used to obtain experience information from users, parse the experience text to obtain structured experience data, obtain the initial document, and merge the structured experience data into the initial document to obtain the document.

[0122] Response text module 500: Used to generate semantic vectors for document documents, write consultation statements based on fault reports, obtain consultation statement vectors for consultation statements, and generate response text based on semantic vectors and consultation statement vectors.

[0123] Figure 3 An example of a physical structure diagram of an electronic device is shown below. Figure 3 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute a self-diagnostic method for an oil production process, the method including:

[0124] S1: Collect production data, perform time-series segmentation on the production data to obtain a production data sequence, and extract target diagnostic data and training data from the production data sequence;

[0125] S2: Decentralize the training data and calculate the covariance matrix. Calculate the eigenvalues ​​of the covariance matrix. Obtain the spatial feature dimension based on the eigenvalues. Project the spatial feature dimension to obtain the projected features. Project the diagnostic data to obtain the diagnostic features. Determine anomalies using the diagnostic features and projected features, and obtain the abnormal events.

[0126] S3: Construct a fault tree model, decompose abnormal events through the fault tree model to obtain an event fault tree, and connect the event fault trees using logic gates to obtain a fault report;

[0127] S4: Obtain experience information from users, parse the experience text to obtain structured experience data, obtain the initial document, merge the structured experience data into the initial document, and obtain the document.

[0128] S5: Generate semantic vectors for document documents, write consultation statements based on fault reports, obtain consultation statement vectors for consultation statements, and generate response text based on semantic vectors and consultation statement vectors.

[0129] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0130] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the aforementioned autonomous diagnostic method for an oil production process, the method comprising:

[0131] S1: Collect production data, perform time-series segmentation on the production data to obtain a production data sequence, and extract target diagnostic data and training data from the production data sequence;

[0132] S2: Decentralize the training data and calculate the covariance matrix. Calculate the eigenvalues ​​of the covariance matrix. Obtain the spatial feature dimension based on the eigenvalues. Project the spatial feature dimension to obtain the projected features. Project the diagnostic data to obtain the diagnostic features. Determine anomalies using the diagnostic features and projected features, and obtain the abnormal events.

[0133] S3: Construct a fault tree model, decompose abnormal events through the fault tree model to obtain an event fault tree, and connect the event fault trees using logic gates to obtain a fault report;

[0134] S4: Obtain experience information from users, parse the experience text to obtain structured experience data, obtain the initial document, merge the structured experience data into the initial document, and obtain the document.

[0135] S5: Generate semantic vectors for document documents, write consultation statements based on fault reports, obtain consultation statement vectors for consultation statements, and generate response text based on semantic vectors and consultation statement vectors.

[0136] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units 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. Those skilled in the art can understand and implement this without any creative effort.

[0137] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for autonomous diagnosis of petroleum production processes, characterized in that, include: S1: Collect production data, perform time-series segmentation on the production data to obtain a production data sequence, and extract target diagnostic data and training data from the production data sequence; S2: Decentralize the training data and calculate the covariance matrix. Calculate the eigenvalues ​​of the covariance matrix. Obtain the spatial feature dimension based on the eigenvalues. Project the spatial feature dimension to obtain the projected features. Project the diagnostic data to obtain the diagnostic features. Determine anomalies using the diagnostic features and projected features, and obtain the abnormal events. S3: Construct a fault tree model, decompose abnormal events through the fault tree model to obtain an event fault tree, and connect the event fault trees using logic gates to obtain a fault report; S4: Obtain experience information from users, parse the experience text to obtain structured experience data, obtain the initial document, merge the structured experience data into the initial document, and obtain the document. S5: Generate semantic vectors for document documents, write consultation statements based on fault reports, obtain consultation statement vectors for consultation statements, and generate response text based on semantic vectors and consultation statement vectors.

2. The method for autonomous diagnosis of a petroleum production process according to claim 1, characterized in that, Step S1 further includes: S11: Deploy production process monitoring equipment and obtain the production data from the production process monitoring equipment; S12: The production data is time-series segmented and sorted according to the timestamp of the production data to obtain a production data sequence including production data segments; S13: Select the production data segment from the production data sequence as the training data, and use the other production data segments as the target diagnostic data.

3. The method for autonomous diagnosis of a petroleum production process according to claim 1, characterized in that, Step S2 further includes: S21: Calculate the average value of the production data segments in the training data, and decentralize the training data using the average value to obtain decentralized training data; S22: Calculate the covariance matrix of the decentralized training data, calculate the eigenvalues ​​of the covariance matrix, and calculate the cumulative contribution rate of the production data segment in the training data based on the eigenvalues ​​to obtain the spatial feature dimension; S23: Project the decentralized training data using the spatial feature dimension to obtain projected features, and project the diagnostic data using the spatial feature dimension to obtain diagnostic features; S24: Perform a L2 norm comparison on the projected features and the diagnostic features to obtain a comparison result, determine a comparison result threshold, and perform anomaly determination based on the comparison result and the comparison result threshold to obtain the abnormal event.

4. The method for autonomous diagnosis of a petroleum production process according to claim 1, characterized in that, Step S3 further includes: S31: Construct a fault tree model, decompose abnormal events through the fault tree model, and obtain an event fault tree including top event, intermediate event and bottom event; S32: Obtain the production process flow, analyze intermediate events and bottom events layer by layer according to the production process flow, and use the logic gates to connect the event fault tree to obtain a fault report.

5. The method for autonomous diagnosis of a petroleum production process according to claim 1, characterized in that, In step S4, a prompt field is determined, and the user inputs the experience information according to the prompt field. The experience text is parsed and a timestamp of the experience information is added to obtain the structured experience data.

6. The method for autonomous diagnosis of a petroleum production process according to claim 1, characterized in that, Step S5 further includes: S51: The document is structured using natural language processing technology to obtain a structured document, and the structured document is vectorized using the BERT model to obtain the semantic vector; S52: Write consultation statements based on the fault report, and use the BERT model to vectorize the consultation statements to obtain the consultation statement vector; S53: Calculate the cosine similarity between the semantic vector and the consultation statement vector, obtain the language model input sequence based on the cosine similarity, and input the language model input sequence into the large language model to obtain the response text.

7. The method for autonomous diagnosis of a petroleum production process according to claim 6, characterized in that, In step S53, the pre-training parameters of the large language model are obtained, the large language model is trained using the document and low-rank adaptation technique to obtain fine-tuning parameters, the pre-training parameters are updated using the fine-tuning parameters, and the response text is generated based on the updated pre-training parameters.

8. A self-diagnostic system for a petroleum production process, used to execute a self-diagnostic method for a petroleum production process as described in any one of claims 1 to 7, characterized in that, include: Data extraction module: used to collect production data, perform time-series segmentation on the production data to obtain production data sequences, and extract target diagnostic data and training data from the production data sequences; The abnormal event module is used to decentralize the training data and calculate the covariance matrix, calculate the eigenvalues ​​of the covariance matrix, obtain the spatial feature dimension based on the eigenvalues, project the spatial feature dimension to obtain the projected features, project the diagnostic data to obtain the diagnostic features, and determine the abnormal event based on the diagnostic features and the projected features. Fault Reporting Module: Used to build a fault tree model, decompose abnormal events through the fault tree model to obtain an event fault tree, and connect the event fault trees using logic gates to obtain a fault report; Documentation module: Used to obtain experience information from users, parse the experience text to obtain structured experience data, obtain the initial documentation, and merge the structured experience data into the initial documentation to obtain the documentation. The response text module is used to generate semantic vectors for documentation documents, write consultation statements based on fault reports, obtain consultation statement vectors for consultation statements, and generate response text based on semantic vectors and consultation statement vectors.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the autonomous diagnostic method for an oil production process as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the autonomous diagnostic method for a petroleum production process as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Intelligent diagnosis platform for production of oil field ground equipment

    CN114493915A

  • Steel production equipment fault diagnosis system based on large language model

    CN119917965A