Method, device, equipment, medium and product for measuring organic chlorine content in crude oil

By scanning the crude oil samples with nuclear magnetic resonance spectroscopy and using the organic chlorine content analysis model, the organic chlorine content content in crude oil is quickly measured, which solves the problems of complex measurement processes and delayed results in the existing technology, and realizes timely monitoring of organic chlorine content and equipment anti-corrosion measures.

CN114720503BActive Publication Date: 2025-05-27PETROCHINA CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110012345.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-06
Publication Date
2025-05-27
Estimated Expiration
2041-01-06

AI Technical Summary

Technical Problem

In the prior art, the measurement process of the organic chlorine content in crude oil is complicated, and the time to obtain the results is long. It is impossible to timely determine whether the organic chlorine content exceeds the standard, so it is impossible to guide relevant technical personnel to make corresponding adjustments to the device process to avoid equipment corrosion.

Method used

By obtaining the target crude oil sample and scanning it through the nuclear magnetic resonance spectrum, the organochlorine content content is quickly and accurately measured based on the mapping relationship between the nuclear magnetic resonance spectrum and the organochlorine content.

Benefits of technology

It realizes rapid and accurate measurement of the organic chlorine content in crude oil, and can promptly determine whether the organic chlorine content exceeds the standard, so as to guide relevant technical personnel to make corresponding adjustments to avoid equipment corrosion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114720503B_ABST
    Figure CN114720503B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a method, device, equipment, medium and product for measuring the organic chlorine content in crude oil. The method includes: obtaining a target crude oil sample and scanning the target crude oil sample to obtain a target nuclear magnetic resonance spectrum; determining the target organic chlorine content in the target crude oil sample according to the target nuclear magnetic resonance spectrum and a pre-constructed organic chlorine content analysis model, where the organic chlorine content analysis model has a mapping relationship between the nuclear magnetic resonance spectrum and the organic chlorine content; and outputting the target organic chlorine content through the organic chlorine content analysis model. It can quickly and accurately measure the organic chlorine content, and when the organic chlorine content exceeds the standard, it can timely guide relevant technical personnel to make corresponding adjustments to the device process to avoid equipment corrosion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of data processing, and in particular, to a method, device, equipment, medium and product for measuring the content of organic chlorine in crude oil. Background Art

[0002] Crude oil contains trace amounts of organic and inorganic chlorides. During the crude oil processing, due to hydrolysis and decomposition of organic chlorides, hydrogen chloride gas may be generated, which may further cause equipment corrosion problems, such as HCl-H 2 S-H 2 O corrosion problems in the atmospheric distillation column top and vacuum distillation column top of the distillation unit, and under-deposit corrosion problems in the fractionation column of fluid catalytic cracking, etc. Although anti-corrosion measures such as "one removal and three injections" can slow down the chlorine corrosion rate, the problem cannot be completely solved, and chlorine corrosion problems still occur from time to time. Therefore, domestic and foreign refineries have set strict control indicators for the content of organic chlorine in crude oil.

[0003] Currently, most refineries measure the total chlorine and inorganic chlorine contents in crude oil separately, and then calculate according to the subtraction method to obtain the measurement method of the organic chlorine content. However, the technical proficiency of experimental personnel, sample conditions, etc. will affect the accuracy of the measurement results, and this method has a complex process. An experiment often takes 2-3 days, resulting in a time lag in obtaining the organic chlorine content in crude oil, and it is impossible to timely judge whether the organic chlorine content exceeds the standard, so it is impossible to guide relevant technicians to make corresponding adjustments to the device process to avoid equipment corrosion. Summary of the Invention

[0004] The embodiments of the present invention provide a method, device, equipment, medium and product for measuring the content of organic chlorine in crude oil. This method solves the technical problems in the prior art that the measurement process of organic chlorine content is complex, the time lag in obtaining the organic chlorine content in crude oil, and it is impossible to timely judge whether the organic chlorine content exceeds the standard, so it is impossible to guide relevant technicians to make corresponding adjustments to the device process to avoid equipment corrosion when the organic chlorine content exceeds the standard.

[0005] In a first aspect, the embodiments of the present invention provide a method for measuring the content of organic chlorine in crude oil, including:

[0006] Obtain a target crude oil sample, and scan the target crude oil sample to obtain a target nuclear magnetic resonance spectrum;

[0007] Determine the target organic chlorine content in the target crude oil sample according to the target nuclear magnetic resonance spectrum and a pre-constructed organic chlorine content analysis model, and there is a mapping relationship between the nuclear magnetic resonance spectrum and the organic chlorine content in the organic chlorine content analysis model;

[0008] Output the target organic chlorine content through the organic chlorine content analysis model.

[0009] Optionally, for the method described above, after obtaining the target crude oil sample and scanning the target crude oil sample to obtain the target nuclear magnetic resonance spectrum, the method further includes:

[0010] Performing a first derivative process on the target nuclear magnetic resonance spectrum and performing a smoothing process on the target nuclear magnetic resonance spectrum after the first derivative process by using a polynomial smoothing algorithm;

[0011] Selecting the target nuclear magnetic resonance spectrum within a preset wavelength range from the target nuclear magnetic resonance spectrum after the smoothing process.

[0012] Optionally, for the method described above, before determining the target organic chlorine content in the target crude oil sample according to the target nuclear magnetic resonance spectrum and the pre-constructed organic chlorine content analysis model, the method further includes:

[0013] Obtaining a calibration set and a validation set for constructing the organic chlorine content analysis model, where the calibration set and the validation set include sample nuclear magnetic resonance spectra corresponding to a plurality of historical crude oil samples and corresponding sample chlorine contents;

[0014] Constructing the organic chlorine content analysis model by using a plurality of sample nuclear magnetic resonance spectra and corresponding sample chlorine contents;

[0015] Obtaining a prediction set for validating the organic chlorine content analysis model;

[0016] Determining the sample organic chlorine content in each historical crude oil sample in the prediction set by using the organic chlorine content analysis model;

[0017] Calculating the relative standard errors corresponding to the calibration set and the prediction set respectively according to the sample organic chlorine contents corresponding to the calibration set and the prediction set;

[0018] Validating the organic chlorine content analysis model according to the corresponding relative standard errors and principal factors.

[0019] Optionally, for the method described above, after validating the organic chlorine content analysis model according to the corresponding relative standard errors and principal factors, the method further includes:

[0020] If the validation fails, performing an optimization process on the organic chlorine content analysis model.

[0021] Optionally, for the method described above, before constructing the organic chlorine content analysis model by using a plurality of sample nuclear magnetic resonance spectra and corresponding sample chlorine contents, the method further includes:

[0022] Perform first derivative processing on the nuclear magnetic resonance spectra of the samples in the calibration set and the validation set, and use the polynomial smoothing algorithm to smooth the nuclear magnetic resonance spectra of the samples in the calibration set and the validation set after the first derivative processing;

[0023] Select the nuclear magnetic resonance spectra of the samples within a preset wavelength range from the smoothed nuclear magnetic resonance spectra of the samples;

[0024] Use the Mahalanobis distance algorithm to identify and eliminate abnormal historical crude oil samples.

[0025] In a second aspect, an embodiment of the present invention provides a device for measuring the organic chlorine content in crude oil, including:

[0026] An acquisition module, configured to acquire a target crude oil sample and scan the target crude oil sample to obtain a target nuclear magnetic resonance spectrum;

[0027] A determination module, configured to determine the target organic chlorine content in the target crude oil sample according to the target nuclear magnetic resonance spectrum and a pre-constructed organic chlorine content analysis model, where the organic chlorine content analysis model has a mapping relationship between the nuclear magnetic resonance spectrum and the organic chlorine content;

[0028] An output module, configured to output the target organic chlorine content through the organic chlorine content analysis model.

[0029] Optionally, the device as described above further includes:

[0030] The model construction module is configured to:

[0031] Acquire a calibration set and a validation set for constructing the organic chlorine content analysis model, where the calibration set and the validation set include sample nuclear magnetic resonance spectra corresponding to a plurality of historical crude oil samples and corresponding sample chlorine contents; use the plurality of sample nuclear magnetic resonance spectra and corresponding sample chlorine contents to construct the organic chlorine content analysis model;

[0032] A model verification module, configured to acquire a prediction set for verifying the organic chlorine content analysis model;

[0033] Use the organic chlorine content analysis model to determine the sample organic chlorine content in each historical crude oil sample in the prediction set;

[0034] Calculate the relative standard errors corresponding to the calibration set and the prediction set respectively according to the sample organic chlorine contents corresponding to the calibration set and the prediction set;

[0035] Verify the organic chlorine content analysis model according to the corresponding relative standard errors and the main factors.

[0036] Optionally, the device as described above further includes:

[0037] A model optimization module, configured to optimize the organochlorine content analysis model if the verification fails.

[0038] Optionally, the device as described above further includes a spectrum processing module.

[0039] The spectrum processing module is configured to:

[0040] Perform first derivative processing on the target nuclear magnetic resonance spectrum, and perform smoothing processing on the target nuclear magnetic resonance spectrum after the first derivative processing by using a polynomial smoothing algorithm.

[0041] Select the target nuclear magnetic resonance spectrum within a preset wavelength range from the smoothed target nuclear magnetic resonance spectrum.

[0042] Optionally, for the device as described above, the spectrum processing module is further configured to:

[0043] Perform first derivative processing on the sample nuclear magnetic resonance spectra in the calibration set and the verification set, and perform smoothing processing on the sample nuclear magnetic resonance spectra in the calibration set and the verification set after the first derivative processing by using a polynomial smoothing algorithm.

[0044] Select the sample nuclear magnetic resonance spectrum within a preset wavelength range from the smoothed sample nuclear magnetic resonance spectra.

[0045] Use the Mahalanobis distance algorithm to identify and eliminate abnormal historical crude oil samples.

[0046] In a third aspect, an embodiment of the present invention provides a nuclear magnetic resonance analyzer, including: a memory, a processor, a crude oil acquisition device, and a scanning device.

[0047] The crude oil acquisition device is configured to acquire a target crude oil sample, and the scanning device is configured to scan the target crude oil sample to obtain a target nuclear magnetic resonance spectrum.

[0048] The computer program is stored in the memory and is configured to be executed by the processor to implement the method for measuring the organochlorine content in crude oil as described in any one of the first aspects.

[0049] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the method for measuring the organochlorine content in crude oil as described in any one of the first aspects.

[0050] In a fifth aspect, an embodiment of the present invention provides a computer program product, including computer instructions, and when the computer instructions are executed by a processor, the method for measuring the organochlorine content in crude oil as described in any one of the first aspects is implemented.

[0051] An embodiment of the present invention provides a method, device, equipment, medium and product for measuring the organic chlorine content in crude oil. By obtaining a target crude oil sample and scanning the target crude oil sample to obtain a target nuclear magnetic resonance spectrum; determining the target organic chlorine content in the target crude oil sample according to the target nuclear magnetic resonance spectrum and a pre-constructed organic chlorine content analysis model, wherein the organic chlorine content analysis model has a mapping relationship between the nuclear magnetic resonance spectrum and the organic chlorine content; outputting the target organic chlorine content through the organic chlorine content analysis model. Since there is a close relationship between the nuclear magnetic resonance spectrum of the crude oil sample and the organic chlorine content, by establishing an organic chlorine content analysis model and obtaining the mapping relationship between the nuclear magnetic resonance spectrum of the crude oil sample and the organic chlorine content, and then sending the obtained target nuclear magnetic resonance spectrum into the organic chlorine content analysis model, the organic chlorine content can be measured quickly and accurately. When the organic chlorine content exceeds the standard, it can timely guide relevant technicians to make corresponding adjustments to the device process to avoid equipment corrosion.

[0052] It should be understood that the content described in the above-mentioned invention content part is not intended to limit the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0054] Figure 1 It is a flowchart of the method for measuring the organic chlorine content in crude oil provided in Embodiment 1 of the present invention;

[0055] Figure 2 It is a flowchart of the method for measuring the organic chlorine content in crude oil provided in Embodiment 2 of the present invention;

[0056] Figure 3 It is a flowchart of the establishment process of the organic chlorine content analysis model in the method for measuring the organic chlorine content in crude oil provided in Embodiment 3 of the present invention;

[0057] Figure 4 It is a nuclear magnetic resonance spectrum diagram of crude oil;

[0058] Figure 5 It is an effect diagram of the organic chlorine content analysis model;

[0059] Figure 6 It is a structural schematic diagram of the device for measuring the organic chlorine content in crude oil provided in Embodiment 1 of the present invention;

[0060] Figure 7 This is a schematic structural diagram of the nuclear magnetic resonance analyzer provided in the first embodiment of the present invention. Detailed implementation manners

[0061] The embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not used to limit the protection scope of the present invention.

[0062] The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and above-mentioned drawings of the embodiments of the present invention are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that comprises a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these process, method, product or device.

[0063] To clearly understand the technical solution of this application, the solutions of the prior art will be introduced in detail first.

[0064] In the prior art, when measuring the organic chlorine content in crude oil, generally, the total chlorine content is measured by the coulomb combustion method first, and then the inorganic chlorine content is measured by the titration method. The difference between the total chlorine content and the inorganic chlorine content is the organic chlorine content.

[0065] During the experiment, adding the standard solution and the standard sample time, it takes 2 - 3 days to measure the organic chlorine content in crude oil. If the organic chlorine content in crude oil exceeds the standard, the equipment has been corroded during the experiment. Therefore, the existing experimental method cannot timely determine whether the organic chlorine content exceeds the standard, and thus cannot guide relevant technicians to make corresponding adjustments to the device process to avoid equipment corrosion.

[0066] Therefore, in view of the technical problem that the existing experimental methods cannot promptly determine whether the organic chlorine content exceeds the standard, and thus cannot guide relevant technicians to make corresponding adjustments to the device process to avoid equipment corrosion, the inventor found in the research that a chemical metrology software can be used to establish an organic chlorine content analysis model, and a nuclear magnetic resonance analyzer can be used to obtain the target nuclear magnetic resonance spectrum of the target crude oil sample. Sending the obtained target nuclear magnetic resonance spectrum into the organic chlorine content analysis model can quickly and accurately measure the organic chlorine content, and when the organic chlorine content exceeds the standard, it can promptly guide relevant technicians to make corresponding adjustments to the device process to avoid equipment corrosion.

[0067] The following will specifically describe the embodiments of the present invention with reference to the accompanying drawings.

[0068] Embodiment 1

[0069] Figure 1 is a flowchart of a method for measuring the organic chlorine content in crude oil provided in Embodiment 1 of the present invention. As Figure 1 shown, the execution subject of this embodiment is a device for measuring the organic chlorine content in crude oil, and this device for measuring the organic chlorine content in crude oil can be integrated in a nuclear magnetic resonance analyzer. Then, the method for measuring the organic chlorine content in crude oil provided in this embodiment includes the following steps.

[0070] Step 101: Obtain a target crude oil sample and scan the target crude oil sample to obtain a target nuclear magnetic resonance spectrum.

[0071] Among them, the time taken to scan the target crude oil sample to obtain the target nuclear magnetic resonance spectrum is about 10 minutes.

[0072] Optionally, in this embodiment, if the nuclear magnetic resonance analyzer monitors that the target crude oil sample is placed, it obtains the target crude oil sample; if it monitors that the target crude oil sample is obtained, it controls the scanning of the target crude oil sample, and after the scanning is completed, the target nuclear magnetic resonance spectrum is obtained.

[0073] Among them, after the target crude oil sample is obtained from the crude oil, no treatment is required.

[0074] Optionally, in this embodiment, before scanning the target crude oil sample, a water test is required: Take a certain amount of water as a sample and scan the water sample to obtain the nuclear magnetic resonance spectrum of the water sample. When the line width range corresponding to the 0.5% peak height of the nuclear magnetic spectrum is 63 - 70, and the line width range corresponding to the 10% peak height of the nuclear magnetic spectrum is 9 - 12, and the line width range corresponding to the 50% peak height of the nuclear magnetic spectrum is 2 - 3, it can be determined that the equipment has reached a stable state and the condition for scanning the target crude oil sample is met; if any one of the conditions is not met, it is determined that the equipment has not reached a stable state and the condition for scanning the target crude oil sample is not met.

[0075] Among them, the resolution of the nuclear magnetic resonance analyzer can be 60 MHz, or it can also be other values, which is not limited in this embodiment. The target nuclear magnetic resonance spectrum collected by the nuclear magnetic resonance analyzer is a nuclear magnetic hydrogen spectrum. The nuclear magnetic resonance spectrum analysis technology has the following characteristics:

[0076] (1) The peak intensity of chemical components has a linear relationship with the concentration of the corresponding components in the sample. The number of protons is the same, and the signal intensity is the same.

[0077] (2) For samples with different chemical properties, the spectral peaks of the nuclear magnetic resonance spectrum change significantly, and the peak response sensitivity is high.

[0078] (3) The nuclear magnetic resonance spectrum signal is an absolute value, without the need for reference, zeroing, etc., which eliminates the influence of blank samples and improves the accuracy.

[0079] (4) The electromagnetic technology is not affected by optical properties.

[0080] Therefore, by using the nuclear magnetic resonance spectrum analysis technology, a relatively accurate linear relationship between the peak intensity of chemical components and the concentration of the corresponding components in the sample can be obtained by collecting the target nuclear magnetic resonance spectrum.

[0081] Step 102: Determine the target organochlorine content in the target crude oil sample according to the target nuclear magnetic resonance spectrum and the pre-constructed organochlorine content analysis model. The organochlorine content analysis model has a mapping relationship between the nuclear magnetic resonance spectrum and the organochlorine content.

[0082] Among them, the target nuclear magnetic resonance spectrum is obtained by scanning the target crude oil sample; the organochlorine content analysis model is stored in the chemometrics software; the mapping relationship between the nuclear magnetic resonance spectrum and the organochlorine content can be obtained by training a large number of crude oil samples; when determining the target organochlorine content in the target crude oil sample, the target nuclear magnetic resonance spectrum is imported into the organochlorine content analysis model, and the target organochlorine content can be quickly obtained according to the mapping relationship between the nuclear magnetic resonance spectrum and the organochlorine content.

[0083] Optionally, in this embodiment, the chemometrics software calls the organochlorine content analysis model and imports the obtained target nuclear magnetic resonance spectrum into the organochlorine content analysis model, and the organochlorine content analysis model can determine the target organochlorine content in the target crude oil sample according to the mapping relationship between the nuclear magnetic resonance spectrum and the organochlorine content.

[0084] Among them, the chemometrics software can be stored in the nuclear magnetic resonance analyzer; the mapping relationship can be a linear relationship, or it can also be other relationships, which is not limited in this embodiment.

[0085] Step 103: Output the target organochlorine content through the organochlorine content analysis model.

[0086] Optionally, in this embodiment, the chemometrics software controls the organic chlorine content analysis model to output the determined target organic chlorine content.

[0087] Among them, the output method can be to display on the screen, or voice broadcast, or it can also be in other forms, and this embodiment does not limit this.

[0088] The method for measuring the organic chlorine content in crude oil provided in this embodiment includes obtaining a target crude oil sample, scanning the target crude oil sample to obtain a target nuclear magnetic resonance spectrum; determining the target organic chlorine content in the target crude oil sample according to the target nuclear magnetic resonance spectrum and a pre-constructed organic chlorine content analysis model, where the organic chlorine content analysis model has a mapping relationship between the nuclear magnetic resonance spectrum and the organic chlorine content; and outputting the target organic chlorine content through the organic chlorine content analysis model. Since it takes about 10 minutes to scan the target crude oil sample to obtain the target nuclear magnetic resonance spectrum, and then the target nuclear magnetic resonance spectrum is imported into the organic chlorine content analysis model, the target organic chlorine content can be quickly obtained to timely judge whether the organic chlorine content exceeds the standard. When the organic chlorine content exceeds the standard, it can guide relevant technicians to make corresponding adjustments to the device process to avoid equipment corrosion. And before measuring the target organic chlorine content, there is no need to perform any treatment on the target crude oil sample, and the process is simple.

[0089] Embodiment 2

[0090] Figure 2 It is a flowchart of the method for measuring the organic chlorine content in crude oil provided in Embodiment 2 of the present invention. As Figure 2 shown, the method for measuring the organic chlorine content in crude oil provided in this embodiment is a further refinement of steps 101-step 103 on the basis of Embodiment 1 of the method for measuring the organic chlorine content in crude oil of the present invention, and also includes other steps. Then the method for measuring the organic chlorine content in crude oil provided in this embodiment includes the following steps.

[0091] Step 201, obtain a target crude oil sample, and scan the target crude oil sample to obtain a target nuclear magnetic resonance spectrum.

[0092] Among them, it takes about 10 minutes to scan the target crude oil sample to obtain the target nuclear magnetic resonance spectrum, and the time used is short, so the crude oil in the equipment can be measured in real time. Among them, the measurement interval time can be several hours, or other time intervals, and this embodiment does not limit this.

[0093] Optionally, in this embodiment, if the nuclear magnetic resonance analyzer monitors that the target crude oil sample is placed, it obtains the target crude oil sample; if it monitors that the target crude oil sample is obtained, it controls the scanning of the target crude oil sample, and after the scanning is completed, the target nuclear magnetic resonance spectrum is obtained.

[0094] Among them, the amount of crude oil used for the target crude oil sample can be several microliters, and this is not limited in this embodiment. Therefore, when measuring the target organochlorine content, the amount of crude oil taken is very small, which can save petroleum resources.

[0095] Step 202: Perform a first derivative process on the target nuclear magnetic resonance spectrum, and use a polynomial smoothing algorithm to smooth the target nuclear magnetic resonance spectrum after the first derivative process.

[0096] Among them, the first derivative process can determine the edge of the target nuclear magnetic resonance spectrum; the polynomial smoothing algorithm is based on the least squares principle and can smooth the target nuclear magnetic resonance spectrum after the first derivative process.

[0097] Optionally, in this embodiment, first perform a first derivative process on the target nuclear magnetic resonance spectrum obtained in step 201 to obtain a target nuclear magnetic resonance spectrum with a determined edge; then use the polynomial smoothing algorithm to smooth the target nuclear magnetic resonance spectrum after the first derivative process to obtain a relatively smooth target nuclear magnetic resonance spectrum image.

[0098] Step 203: Screen out the target nuclear magnetic resonance spectrum within a preset wavelength range in the smoothed target nuclear magnetic resonance spectrum.

[0099] Optionally, in this embodiment, since the organochlorine analysis model measures the target organochlorine content within a preset wavelength range, it is necessary to screen out the target nuclear magnetic resonance spectrum within the preset wavelength range from the smoothed target nuclear magnetic resonance spectrum. Specifically, it is obtained by intercepting the target nuclear magnetic resonance spectrum within the preset wavelength range, which can make the target nuclear magnetic resonance spectrum meet the requirements for measuring the organochlorine content later.

[0100] Among them, the preset wavelength range can be 700 - 1600 nm, or it can also be other ranges, which is not limited in this embodiment. The preset wavelength range is the optimal wavelength range for measuring the organochlorine content.

[0101] Step 204: Determine the target organochlorine content in the target crude oil sample according to the target nuclear magnetic resonance spectrum and the pre-constructed organochlorine content analysis model. The organochlorine content analysis model has a mapping relationship between the nuclear magnetic resonance spectrum and the organochlorine content.

[0102] Optionally, in this embodiment, the chemometrics software calls the organochlorine content analysis model and imports the obtained target nuclear magnetic resonance spectrum into the organochlorine content analysis model, and the organochlorine content analysis model can determine the target organochlorine content in the target crude oil sample according to the mapping relationship between the nuclear magnetic resonance spectrum and the organochlorine content.

[0103] Step 205: Output the target organochlorine content through the organochlorine content analysis model.

[0104] Optionally, in this embodiment, the chemometrics software controls the organic chlorine content analysis model to output the determined target organic chlorine content.

[0105] Among them, the output method can be to display on the screen, or voice broadcast, or it can also be other forms, which are not limited in this embodiment.

[0106] The method for measuring the organic chlorine content in crude oil provided in this embodiment can perform real-time measurement on the crude oil in the equipment because the time taken to obtain the target nuclear magnetic resonance spectrum is short; when measuring the target organic chlorine content, the amount of crude oil used is very small, which can save petroleum resources; operations such as performing first derivative processing on the target nuclear magnetic resonance spectrum, smoothing processing with a polynomial smoothing algorithm, and screening the target nuclear magnetic resonance spectrum within a preset wavelength range can make the target nuclear magnetic resonance spectrum meet the requirements for measuring the organic chlorine content later.

[0107] Embodiment III

[0108] Figure 3 It is a flow chart of the establishment process of the organic chlorine content analysis model in the method for measuring the organic chlorine content in crude oil provided in Embodiment III of the present invention. As Figure 3 shown, the establishment process of the organic chlorine content analysis model provided in this embodiment has been completed before the implementation of Embodiment I or Embodiment II of the method for measuring the organic chlorine content in crude oil of the present invention to meet the usage requirements during the implementation of the method for measuring the organic chlorine content in crude oil provided in Embodiment I or Embodiment II. Then the establishment process of the organic chlorine content analysis model provided in this embodiment includes the following steps.

[0109] Step 301: Obtain a calibration set and a validation set for constructing the organic chlorine content analysis model. The calibration set and the validation set include sample nuclear magnetic resonance spectra corresponding to multiple historical crude oil samples and the corresponding sample chlorine contents.

[0110] Optionally, in this embodiment, sample nuclear magnetic resonance spectra corresponding to multiple historical crude oil samples and the corresponding sample chlorine contents are obtained through experimental methods. As Figure 4 shown, it is a nuclear magnetic resonance spectrum diagram of crude oil, where the horizontal axis represents the wavelength and the vertical axis represents the intensity, reflecting the information of hydrogen-containing groups in the crude oil sample. Among them, the multiple historical crude oil samples can be 200 crude oil samples, or it can also be other quantities, which are not limited in this embodiment.

[0111] Optionally, in this embodiment, multiple historical crude oil samples are divided, with 80% of them used as the calibration set and the remaining 20% used as the validation set. Among them, the calibration set is used to establish an organochlorine analysis model, and the validation set is used to verify the quality of the established organochlorine analysis model. The proportion of the calibration set can be 70% when the number of multiple historical crude oil samples is greater than 200, and 80% when the number of multiple historical crude oil samples is less than or equal to 200. This is because a large number of samples are required to establish an organochlorine analysis model to ensure that the organochlorine analysis model can measure more accurate organochlorine content.

[0112] Specifically, in this embodiment, the sample nuclear magnetic resonance spectra and the corresponding sample chlorine contents of multiple historical crude oil samples are obtained through experimental methods and saved; the multiple historical crude oil samples are divided into a calibration set and a validation set.

[0113] Step 302: Perform first derivative processing on the sample nuclear magnetic resonance spectra in the calibration set and the validation set, and use the polynomial smoothing algorithm to smooth the sample nuclear magnetic resonance spectra in the calibration set and the validation set after the first derivative processing.

[0114] Among them, the first derivative processing can determine the edges of the sample nuclear magnetic resonance spectra; the polynomial smoothing algorithm is based on the least squares principle and can smooth the sample nuclear magnetic resonance spectra after the first derivative processing.

[0115] Optionally, in this embodiment, the sample nuclear magnetic resonance spectra obtained in step 302 are first subjected to first derivative processing to obtain sample nuclear magnetic resonance spectra with determined edges; then the polynomial smoothing algorithm is used to smooth the sample nuclear magnetic resonance spectra after the first derivative processing to obtain a relatively smooth sample nuclear magnetic resonance spectrum image.

[0116] Step 303: Screen out the sample nuclear magnetic resonance spectra within a preset wavelength range in the smoothed sample nuclear magnetic resonance spectra.

[0117] Optionally, in this embodiment, the smoothed sample nuclear magnetic resonance spectra are intercepted to screen out the sample nuclear magnetic resonance spectra within a preset wavelength range.

[0118] Among them, the preset wavelength range can be 700 - 1600 nm, or it can also be other ranges, which are not limited in this embodiment. The preset wavelength range is the best wavelength range for measuring the organochlorine content.

[0119] Step 304: Use the Mahalanobis distance algorithm to identify and eliminate abnormal historical crude oil samples.

[0120] Among them, the Mahalanobis distance represents the covariance distance of data, and the Mahalanobis distance algorithm is an effective method for calculating the similarity between two unknown sample sets. Since the existence of abnormal historical crude oil samples affects the accuracy of the organochlorine analysis model, it is necessary to remove the abnormal historical crude oil samples. Abnormal samples can be divided into abnormal samples of nuclear magnetic resonance spectra and abnormal samples of chemical values.

[0121] Optionally, in this embodiment, the Mahalanobis distance algorithm is used to obtain the covariance distance of the data, and the abnormal historical crude oil samples are identified and removed according to the covariance distance of the data.

[0122] Step 305, construct an organochlorine content analysis model using multiple sample nuclear magnetic resonance spectra and the corresponding sample chlorine contents.

[0123] Optionally, in this embodiment, an organochlorine content analysis model is constructed using the remaining multiple sample nuclear magnetic resonance spectra and the corresponding sample chlorine contents after removing the abnormal historical crude oil samples. Among them, the purpose of constructing the organochlorine content analysis model is to find the mapping relationship between the sample nuclear magnetic resonance spectra and the corresponding sample chlorine contents.

[0124] Optionally, in this embodiment, after the organochlorine content analysis model is established, the relative standard errors corresponding to the calibration set and the validation set are calculated respectively according to the sample organochlorine contents of the calibration set and the validation set.

[0125] Among them, the relative standard error reflects the degree of dispersion of the data. In this embodiment, when the relative standard error of the calibration set (abbreviation in English: RMSEC) and the relative standard error of the validation set differ not too much and the two are smaller, it indicates that the established organochlorine content analysis model has higher accuracy.

[0126] Step 306, obtain a prediction set for validating the organochlorine content analysis model.

[0127] Optionally, in this embodiment, after validating the organochlorine content analysis model using the validation set, samples outside the calibration set and the validation set are obtained as the prediction set.

[0128] Among them, the number of the prediction set can be dozens, and this embodiment does not limit this.

[0129] Step 307, determine the sample organochlorine content in each historical crude oil sample in the prediction set using the organochlorine content analysis model.

[0130] Optionally, in this embodiment, the nuclear magnetic resonance spectra of each historical crude oil sample in the prediction set are sequentially imported into the organochlorine content analysis model to determine the sample organochlorine content in each historical crude oil sample and save it.

[0131] Step 308: Calculate the relative standard errors corresponding to the calibration set and the prediction set respectively according to the organic chlorine contents of the samples corresponding to the calibration set and the prediction set.

[0132] Among them, the relative standard error reflects the degree of dispersion of the data. In this embodiment, when the relative standard error of the calibration set and the relative standard error of the prediction set (abbreviation in English: RMSEP) do not differ much and the smaller they are, the higher the accuracy of the established organic chlorine content analysis model.

[0133] Optionally, in this embodiment, calculate the relative standard errors corresponding to the calibration set and the prediction set respectively according to the organic chlorine contents of the samples corresponding to the calibration set and the prediction set.

[0134] Step 309: Verify the organic chlorine content analysis model according to the corresponding relative standard error and the main factor.

[0135] Among them, the number of main factors (abbreviation in English: PC) is a main parameter for judging the quality of the model.

[0136] Optionally, in this embodiment, as shown in Table 1, it is a list of parameters of the organic chlorine content analysis model in crude oil. According to the relative standard errors corresponding to the calibration set and the prediction set calculated in Step 308 and the calculated number of main factors, verify the organic chlorine content analysis model according to experience. Or it can also be combined with Figure 5 the relationship between the predicted value and the actual value reflected in the effect diagram of the organic chlorine content analysis model as shown. If the points on the graph are closely distributed on both sides of the straight line, it means that the accuracy of the model is relatively high and the verification passes; otherwise, it means that the accuracy of the model is not high and the verification fails.

[0137] Table 1 List of parameters of the organic chlorine content analysis model in crude oil

[0138] Model Name Number of Samples RMSEP RMSEC PC Concentration Range / ppm Organochlorine 151 3.3287 2.9586 7 3-57

[0139] Step 310: If the verification fails, perform optimization processing on the organic chlorine content analysis model.

[0140] Optionally, in this embodiment, if the verification fails, select different pretreatment methods to perform optimization processing on the model.

[0141] In the process of establishing the organic chlorine content analysis model in the method for measuring the organic chlorine content in crude oil provided by this embodiment, since a large number of samples are used to establish the organic chlorine analysis model, it is ensured that the organic chlorine analysis model can measure a more accurate organic chlorine content; there is an optimal wavelength range when the organic chlorine analysis model measures the organic chlorine content. By screening out the sample nuclear magnetic resonance spectra within the optimal wavelength range to establish the organic chlorine analysis model, the measured organic chlorine content can be made more accurate; due to the existence of abnormal historical crude oil samples affecting the accuracy of the organic chlorine analysis model, this embodiment uses the Mahalanobis distance algorithm to eliminate the abnormal samples in the historical crude oil samples, which can also make the measured organic chlorine content more accurate; after the organic chlorine analysis model is established, the validation set and the prediction set are used to verify the organic chlorine analysis model in sequence, and when the verification fails, the organic chlorine analysis model is optimized, which further ensures the accuracy of the organic chlorine analysis model.

[0142] Embodiment 4

[0143] Figure 6 It is a schematic structural diagram of the device for measuring the organic chlorine content in crude oil provided by Embodiment 1 of the present invention, as Figure 6 shown, the device 40 for measuring the organic chlorine content in crude oil provided by this embodiment includes: an acquisition module 41, a determination module 42, and an output module 43.

[0144] Among them, the acquisition module 41 is used to acquire a target crude oil sample and scan the target crude oil sample to obtain a target nuclear magnetic resonance spectrum; the determination module 42 is used to determine the target organic chlorine content in the target crude oil sample according to the target nuclear magnetic resonance spectrum and the pre-constructed organic chlorine content analysis model, and there is a mapping relationship between the nuclear magnetic resonance spectrum and the organic chlorine content in the organic chlorine content analysis model; the output module 43 is used to output the target organic chlorine content through the organic chlorine content analysis model.

[0145] The device for measuring the organic chlorine content in crude oil provided by this embodiment can execute Figure 1 the technical solutions of the method embodiment shown, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0146] Optionally, in this embodiment, it further includes: a model construction module, a model verification module, a model optimization module, and a spectrum processing module.

[0147] Specifically, the model construction module is used for:

[0148] acquire a calibration set and a validation set for constructing the organic chlorine content analysis model, where the calibration set and the validation set include the sample nuclear magnetic resonance spectra corresponding to multiple historical crude oil samples and the corresponding sample chlorine contents; use multiple sample nuclear magnetic resonance spectra and the corresponding sample chlorine contents to construct the organic chlorine content analysis model;

[0149] A model verification module, configured to obtain a prediction set for verifying an organochlorine content analysis model;

[0150] Use the organochlorine content analysis model to determine the sample organochlorine content in each historical crude oil sample in the prediction set;

[0151] Calculate the relative standard errors corresponding to the calibration set and the prediction set respectively according to the sample organochlorine contents corresponding to the calibration set and the prediction set;

[0152] Verify the organochlorine content analysis model according to the corresponding relative standard error and the main factor.

[0153] A model optimization module, configured to optimize the organochlorine content analysis model if the verification fails.

[0154] A spectrum processing module, configured to:

[0155] Perform a first derivative process on the target nuclear magnetic resonance spectrum, and use a polynomial smoothing algorithm to smooth the target nuclear magnetic resonance spectrum after the first derivative process;

[0156] Screen out the target nuclear magnetic resonance spectrum within a preset wavelength range in the smoothed target nuclear magnetic resonance spectrum.

[0157] The spectrum processing module is further configured to:

[0158] Perform a first derivative process on the sample nuclear magnetic resonance spectra in the calibration set and the verification set, and use a polynomial smoothing algorithm to smooth the sample nuclear magnetic resonance spectra in the calibration set and the verification set after the first derivative process;

[0159] Screen out the target nuclear magnetic resonance spectrum within a preset wavelength range in the smoothed sample nuclear magnetic resonance spectrum;

[0160] Use the Mahalanobis distance algorithm to identify and eliminate abnormal historical crude oil samples.

[0161] The measurement device for the organochlorine content in crude oil provided in this embodiment can execute Figure 2 or Figure 3 The technical solutions of the method embodiments shown, and their implementation principles and technical effects are similar, and will not be elaborated here.

[0162] According to an embodiment of the present invention, the present invention also provides a nuclear magnetic resonance analyzer, a computer-readable storage medium, and a computer program product.

[0163] As Figure 7 shown, it is a schematic structural diagram of a nuclear magnetic resonance analyzer provided according to an embodiment of the present invention.

[0164] The nuclear magnetic resonance analyzer includes: a memory 501, a processor 502, a crude oil acquisition device 503, and a scanning device 504. The memory 501, the processor 502, the crude oil acquisition device 503, and the scanning device 504 are interconnected by a circuit. Specifically, each component is connected to each other using a bus and can be installed on a common motherboard or installed in other ways as needed.

[0165] The memory 501 is the computer-readable storage medium provided by the present invention. Among them, the memory stores instructions executable by at least one processor, so that at least one processor executes the method for measuring the content of organic chlorine in crude oil provided by the present invention. The present invention also provides a computer program product, including computer instructions, which implement the method for measuring the content of organic chlorine in crude oil provided by the present invention when executed by the processor.

[0166] Those skilled in the art will readily think of other implementation schemes of the embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the embodiments of the present invention, which follow the general principles of the embodiments of the present invention and include well-known common knowledge or conventional technical means in the technical field not disclosed in the embodiments of the present invention. The specification and the embodiments are only regarded as exemplary, and the true scope and spirit of the embodiments of the present invention are pointed out by the following claims.

[0167] It should be understood that the embodiments of the present invention are not limited to the exact structures already described and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the embodiments of the present invention is only limited by the appended claims.

Claims

1. A method for measuring the organic chlorine content in crude oil, characterized in that, it includes: Obtain a target crude oil sample and scan the target crude oil sample to obtain a target nuclear magnetic resonance spectrum; Determine the target organic chlorine content in the target crude oil sample according to the target nuclear magnetic resonance spectrum and a pre-constructed organic chlorine content analysis model, and there is a mapping relationship between the nuclear magnetic resonance spectrum and the organic chlorine content in the organic chlorine content analysis model; Output the target organic chlorine content through the organic chlorine content analysis model; After obtaining the target crude oil sample and scanning the target original sample to obtain a target nuclear magnetic resonance spectrum, it further includes: Perform a first derivative process on the target nuclear magnetic resonance spectrum, and use a polynomial smoothing algorithm to smooth the target nuclear magnetic resonance spectrum after the first derivative process; Select the target nuclear magnetic resonance spectrum within a preset wavelength range in the smoothed target nuclear magnetic resonance spectrum.

2. The method according to claim 1, characterized in that, Before determining the target organic chlorine content in the target crude oil sample according to the target nuclear magnetic resonance spectrum and a pre-constructed organic chlorine content analysis model, it further includes: Obtain a calibration set and a validation set for constructing the organic chlorine content analysis model, and the calibration set and the validation set include sample nuclear magnetic resonance spectra corresponding to a plurality of historical crude oil samples and corresponding sample chlorine contents; Construct the organic chlorine content analysis model using a plurality of sample nuclear magnetic resonance spectra and corresponding sample chlorine contents; Obtain a prediction set for validating the organic chlorine content analysis model; Determine the sample organic chlorine content in each historical crude oil sample in the prediction set using the organic chlorine content analysis model; Calculate the relative standard errors corresponding to the calibration set and the prediction set respectively according to the sample organic chlorine contents corresponding to the calibration set and the prediction set; Validate the organic chlorine content analysis model according to the corresponding relative standard errors and main factors.

3. The method according to claim 2, characterized in that, After validating the organic chlorine content analysis model according to the corresponding relative standard errors and main factors, it further includes: If the validation fails, optimize the organic chlorine content analysis model.

4. The method according to claim 2, characterized in that, Before constructing the organic chlorine content analysis model using a plurality of sample nuclear magnetic resonance spectra and corresponding sample chlorine contents, it further includes: Perform a first derivative process on the sample nuclear magnetic resonance spectra in the calibration set and the validation set, and use a polynomial smoothing algorithm to smooth the sample nuclear magnetic resonance spectra in the calibration set and the validation set after the first derivative process; Select the sample nuclear magnetic resonance spectra within a preset wavelength range in the smoothed sample nuclear magnetic resonance spectra; Use the Mahalanobis distance algorithm to identify and eliminate abnormal historical crude oil samples.

5. A device for measuring the organic chlorine content in crude oil, characterized in that, it includes: An acquisition module for acquiring a target crude oil sample and scanning the target crude oil sample to obtain a target nuclear magnetic resonance spectrum; A determination module, configured to determine the target organochlorine content in the target crude oil sample according to the target nuclear magnetic resonance spectrum and a pre-constructed organochlorine content analysis model, wherein the organochlorine content analysis model has a mapping relationship between the nuclear magnetic resonance spectrum and the organochlorine content; An output module, configured to output the target organochlorine content through the organochlorine content analysis model; The device further includes a spectrum processing module, configured to perform a first derivative processing on the target nuclear magnetic resonance spectrum, and perform a smoothing processing on the target nuclear magnetic resonance spectrum after the first derivative processing by using a polynomial smoothing algorithm; screen out the target nuclear magnetic resonance spectrum within a preset wavelength range in the target nuclear magnetic resonance spectrum after the smoothing processing.

6. The device according to claim 5, wherein, it further includes: A model construction module, configured to obtain a calibration set and a validation set for constructing the organochlorine content analysis model, wherein the calibration set and the validation set include sample nuclear magnetic resonance spectra corresponding to a plurality of historical crude oil samples and corresponding sample chlorine contents; construct the organochlorine content analysis model by using the plurality of sample nuclear magnetic resonance spectra and the corresponding sample chlorine contents; A model validation module, configured to obtain a prediction set for validating the organochlorine content analysis model; determine the sample organochlorine content in each historical crude oil sample in the prediction set by using the organochlorine content analysis model; calculate the relative standard errors corresponding to the calibration set and the prediction set respectively according to the sample organochlorine contents corresponding to the calibration set and the prediction set; validate the organochlorine content analysis model according to the corresponding relative standard errors and the main factors.

7. A nuclear magnetic resonance analyzer, wherein, it includes: A memory, a processor, a crude oil acquisition device and a scanning device; The crude oil acquisition device is configured to acquire a target crude oil sample, and the scanning device is configured to scan the target crude oil sample to obtain a target nuclear magnetic resonance spectrum; A computer program is stored in the memory and is configured to be executed by the processor to implement the method for measuring the organochlorine content in crude oil according to any one of claims 1-4.

8. A computer-readable storage medium, wherein, a computer program is stored thereon, and the computer program is executed by a processor to implement the method for measuring the organochlorine content in crude oil according to any one of claims 1-4.

9. A computer program product, including computer instructions, wherein, when the computer instructions are executed by a processor, the method for measuring the organochlorine content in crude oil according to any one of claims 1-4 is implemented.

Citation Information

Patent Citations

  • Method for acetyl choline content indirect detection by proton magnetic resonance wave spectrum analysis

    CN101290297A