Oil product inspection and analysis method and device, computer equipment and storage medium

By building an automated oil product inspection system based on decision tree model, the efficiency and accuracy problems caused by manual audit dependence in the existing technology are solved, and more efficient and accurate oil product inspection and analysis are achieved.

CN119829981APending Publication Date: 2025-04-15CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411914509.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In the existing oil product inspection and analysis, the multi-level inspection process mainly relies on manual audits, resulting in high subjectivity and error rates, reducing the accuracy and efficiency of audits, and thus affecting the efficiency and accuracy of oil product inspection and analysis.

Method used

By obtaining the initial oil sample set and target feature data set, using domain knowledge and expert knowledge for discrete processing, combining Gini coefficient calculation method and decision tree algorithm, a target decision tree model is constructed, and the model is optimized through the five-fold cross-validation method to achieve automated oil product inspection and audit.

Benefits of technology

It improves the accuracy and efficiency of oil product inspection and analysis, reduces the cost and error rate of manual review, and ensures the scientificity and reliability of oil product inspection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829981A_ABST
    Figure CN119829981A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of oil product inspection, and discloses an oil product inspection analysis method and device, computer equipment and a storage medium, discretization processing is performed on a feature data set by means of domain knowledge and expert knowledge, and each test analysis feature of an oil product can be divided in a mode more conforming to actual business logic and oil product features. And a target feature data set with the highest distinction degree on oil product classification (qualified or unqualified) is screened out through a Gini coefficient calculation method, so that the interference of irrelevant features on result judgment is reduced, and the accuracy of oil product inspection and analysis is effectively improved. Meanwhile, oil product verification is carried out through the decision tree model, a new oil product sample can be rapidly analyzed and judged in the verification process, manual verification is replaced and optimized, the verification accuracy and efficiency are greatly improved, and then the oil product verification and analysis efficiency is improved. Furthermore, the model is constructed in combination with a five-fold cross validation method, and it is ensured that the model has good generalization ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of oil product inspection, and in particular to an oil product inspection and analysis method, device, computer equipment and storage medium. Background Art

[0002] In the field of energy and chemical industry, oil product inspection and analysis are required before the sale of finished oil to ensure that the quality of the oil products sold meets the market's requirements for performance and safety. Through oil product inspection and analysis, companies can accurately understand the various performance indicators of oil products, so as to adjust product formulas according to market demand and improve customer satisfaction. In addition, oil product inspection and analysis can also identify and prevent possible risks in advance, such as equipment failure and environmental pollution, to ensure the stable operation of the company. At the same time, this analysis process is also an important basis for guiding production, helping companies optimize production processes and improve product quality and production efficiency. Most importantly, through oil product inspection and analysis, companies can ensure that the oil products they sell meet the requirements of laws and regulations, avoid legal disputes caused by product quality issues, and safeguard the company's reputation and interests.

[0003] At present, oil inspection and analysis mainly adopts a series of advanced analytical methods, such as chromatography, spectral analysis, physical property testing, etc., to accurately determine the chemical composition, physical properties and performance of oil products. The analysis steps usually include sample collection, pretreatment, instrument analysis, data processing and result reporting, etc., to ensure that each step is rigorous and accurate. The review process covers the entire process from sample receipt to final report, including the formulation of analysis plan, review of analysis data, confirmation of results and approval of report, to ensure the reliability of analysis results and compliance with relevant standards and regulatory requirements.

[0004] The audit process is a critical and complex link in the inspection and analysis, and the multi-level inspection and audit process reflects the extremely high requirements for data accuracy and integrity. At present, the multi-level inspection process mainly relies on manual audit, which is subjective and has a high error rate, reducing the accuracy and efficiency of the audit, which in turn leads to low efficiency and accuracy of oil inspection and analysis. Summary of the invention

[0005] In view of this, the present invention provides an oil inspection and analysis method, device, computer equipment and storage medium to solve the problem that the current multi-level inspection process mainly relies on manual review, which has high subjectivity and error rate, reduces the accuracy and efficiency of the review, and thus leads to low efficiency and accuracy of oil inspection and analysis.

[0006] In a first aspect, the present invention provides an oil product inspection and analysis method, the method comprising:

[0007] Obtain an initial oil sample set and an oil product testing and analysis target feature data set corresponding to the initial oil sample set; discretize the oil product testing and analysis target feature data set based on domain knowledge and expert knowledge to obtain a discrete feature data set; obtain a target feature data set based on the initial oil sample set and the discretized feature data set after processing using the Gini coefficient calculation method; construct a target decision tree model based on the target feature data set after processing using a decision tree algorithm and a five-fold cross validation method; use the target decision tree model to perform oil product inspection and review to obtain oil product inspection and analysis results.

[0008] The oil inspection and analysis method provided by the present invention discretizes the feature data set with the help of domain knowledge and expert knowledge, and can divide the various oil product test and analysis features in a way that is more in line with the actual business logic and oil product characteristics, and mine the hidden laws in the data. Then, the target feature data set with the most distinguishing degree for oil product classification (qualified or unqualified) is screened out by the Gini coefficient calculation method, which reduces the interference of irrelevant features on the result judgment, and allows the decision tree model to focus on key information when it is constructed, so as to more accurately evaluate the quality of oil products, reduce the possibility of misjudgment, and effectively improve the accuracy of oil product inspection and analysis. At the same time, oil product verification is carried out through the decision tree model, abandoning the traditional full reliance on manual experience and cumbersome manual detection and analysis processes, and can quickly analyze and judge new oil product samples during the audit process, realize the replacement and optimization of manual audit, greatly improve the accuracy and efficiency of the audit, and thus improve the efficiency of oil product inspection and analysis. Further, the model is constructed in combination with the five-fold cross validation method to ensure that the model has good generalization ability, avoid model overfitting and cause deviations in practical applications, and make the oil product inspection and analysis results output by the model more scientific and accurate.

[0009] In an optional implementation, obtaining an initial oil sample set and an oil product testing and analysis target feature data set corresponding to the initial oil sample set includes:

[0010] Acquire an initial oil product sample set; determine an initial feature data set for oil product testing and analysis based on the initial oil product sample set; perform structured processing on the initial feature data set for oil product testing and analysis to obtain a target feature data set for oil product testing and analysis.

[0011] The oil product inspection and analysis method provided by the present invention performs structured processing on the initial characteristic data set of oil product testing and analysis, thereby ensuring the standardization and availability of the data.

[0012] In an optional implementation, based on the initial oil sample set and the discretized feature data set, a target feature data set is obtained by processing using a Gini coefficient calculation method, including:

[0013] Based on the initial oil sample set and the discretized feature data set, multiple Gini coefficient values ​​are obtained through processing using the Gini coefficient calculation method; based on the multiple Gini coefficient values, the target feature data set is determined in the discretized feature data set.

[0014] The oil inspection and analysis method provided by the present invention combines the initial oil sample set and the discretized feature data set to calculate the Gini coefficient, which can effectively screen out the key features that have the most significant impact on the oil inspection results and reduce data redundancy and noise. Furthermore, by determining the target feature data set through the calculated multiple Gini coefficient values, it can better reflect the intrinsic characteristics and differences of the oil samples, providing support for the subsequent enhancement of the model's discrimination and generalization capabilities.

[0015] In an optional implementation, based on the initial oil sample set and the discretized feature data set, a plurality of Gini coefficient values ​​are obtained by processing using a Gini coefficient calculation method, including:

[0016] The initial oil sample set is split based on the discretized feature data set to obtain the target oil sample set; based on the target oil sample set, multiple Gini coefficient values ​​are obtained by processing with the Gini coefficient calculation method.

[0017] The oil inspection and analysis method provided by the present invention first splits the initial oil sample set based on the discretized feature data set, and then calculates the Gini coefficient value based on the target oil sample set obtained by the splitting, which fully considers the actual distribution of the oil samples in different discrete feature intervals. Furthermore, when calculating the Gini coefficient using the target oil sample set, it is possible to accurately measure the ability of each feature to distinguish oil classification (such as qualified and unqualified) under different sample distribution scenarios, avoiding the deviation that may occur in the general calculation of the Gini coefficient, making the feature screening more in line with the actual state of the oil sample, and improving the accuracy of the screened features in judging the oil inspection results.

[0018] In an optional implementation, based on the target feature data set, a target decision tree model is constructed through processing with a decision tree algorithm and a five-fold cross validation method, including:

[0019] Based on the target feature data set, an initial decision tree model is constructed after being processed by the decision tree algorithm; the performance of the initial decision tree model is verified using the five-fold cross-validation method; when the performance of the initial decision tree model meets the requirements, the initial decision tree model is determined as the target decision tree model.

[0020] In the oil inspection and analysis method provided by the present invention, at the stage of constructing the initial decision tree model, the decision tree algorithm is learned and summarized based on the target feature data set, so that the model can focus on the key features that have an important impact on oil inspection and sort out reasonable classification rules. Furthermore, the performance of the initial decision tree model is comprehensively evaluated by the five-fold cross-validation method. It can effectively detect whether the model has problems such as overfitting, ensure that the model has good generalization ability, and enable it to accurately output results when facing new oil samples for inspection, thereby improving the reliability and accuracy of the decision tree model in actual oil inspection applications, and ensuring the effectiveness of the entire oil inspection and analysis method.

[0021] In an optional embodiment, the method further includes:

[0022] When the performance of the initial decision tree model does not meet the requirements, the initial decision tree model is iteratively optimized until the target decision tree model is obtained.

[0023] The oil product inspection and analysis method provided by the present invention can make targeted adjustments to the model according to actual conditions through iterative optimization when it is found that the performance of the initial decision tree model does not meet the requirements, which helps to solve the overfitting or underfitting problems that may occur in the model.

[0024] In a second aspect, the present invention provides an oil product inspection and analysis device, the device comprising:

[0025] The acquisition module is used to obtain the initial oil sample set and the target feature data set of oil product testing and analysis corresponding to the initial oil sample set; the first processing module is used to discretize the target feature data set of oil product testing and analysis based on domain knowledge and expert knowledge to obtain a discretized feature data set; the second processing module is used to obtain the target feature data set based on the initial oil sample set and the discretized feature data set after processing by the Gini coefficient calculation method; the construction module is used to construct a target decision tree model based on the target feature data set after processing by the decision tree algorithm and the five-fold cross validation method; the verification module is used to use the target decision tree model to perform oil inspection and review to obtain oil inspection and analysis results.

[0026] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the oil inspection and analysis method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0027] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the oil inspection and analysis method of the first aspect or any corresponding embodiment thereof.

[0028] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the oil inspection and analysis method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0030] Figure 1 is a schematic flow chart of an oil product inspection and analysis method according to an embodiment of the present invention;

[0031] Figure 2 is a schematic diagram of a decision tree structure according to an embodiment of the present invention;

[0032] Figure 3A is a scatter plot of classification results of a decision tree algorithm according to an embodiment of the present invention;

[0033] Figure 3B is a scatter plot of classification results of another decision tree algorithm according to an embodiment of the present invention;

[0034] Figure 4 is a flow chart of another oil product inspection and analysis method according to an embodiment of the present invention;

[0035] Figure 5 is a flow chart of another oil product inspection and analysis method according to an embodiment of the present invention;

[0036] Figure 6 is a schematic diagram of an initial decision tree model according to an embodiment of the present invention;

[0037] Figure 7 is a schematic diagram of characteristic Gini coefficient values ​​according to an embodiment of the present invention;

[0038] Figure 8 is a structural block diagram of an oil product inspection and analysis device according to an embodiment of the present invention;

[0039] Fig. 9 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0041] The audit process is a critical and complex link in inspection and analysis, and the multi-level inspection and audit process reflects the extremely high requirements for data accuracy and completeness. The multi-level inspection process mainly relies on manual review, which brings the following challenges:

[0042] 1. Complexity. Each inspection link requires professionals to make independent judgments and decisions. They need to have rich professional knowledge and experience to identify potential errors or anomalies in the data. This manual review method requires analysts to maintain a high degree of concentration and vigilance, which increases the complexity of the process;

[0043] 2. Error-proneness. In the secondary inspection, analysts in the same position conduct mutual inspections, which is a duplication of the primary inspection work to a certain extent. Although this duplication can enhance the reliability of the data, it may also lead to errors being missed due to fatigue or negligence. In addition, long-term repetitive work will also affect the judgment and accuracy of analysts, further increasing the error-proneness;

[0044] 3. High cost. Manual review requires a large number of professional analysts to invest time and energy, which not only increases human resource costs, but may also lead to waste of other resources, such as the use of equipment and materials. In addition, since the inspection and analysis involves high technical and knowledge requirements, training and maintaining a qualified team of analysts also requires a lot of cost.

[0045] According to an embodiment of the present invention, an embodiment of an oil inspection and analysis method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0046] In this embodiment, a method for oil inspection and analysis is provided, which can be used in electronic devices such as computers, mobile phones, tablet computers, etc. Figure 1 : is a flow chart of an oil product inspection and analysis method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0047] Step S101, obtaining an initial oil product sample set and an oil product testing and analysis target feature data set corresponding to the initial oil product sample set.

[0048] Among them, the initial oil sample set represents the set of oil objects that actually need to be quality tested and analyzed; the oil product testing and analysis target feature data set represents a set of quantitative descriptions of the initial oil sample set from multiple key dimensions, reflecting the quality characteristics of each oil in the initial oil sample set in the form of data.

[0049] Specifically, the channels for obtaining oil samples should be clarified. These samples can come from finished oil products from different production batches of oil refineries, oil products for sale stored at gas stations, or oil products sampled in the market, etc. For example, from the finished product warehouses of multiple oil refineries, motor gasoline samples produced in different time periods can be selected according to certain sampling rules (such as random sampling, stratified sampling, etc.) to ensure that the samples are representative and can cover various oil product conditions under actual production conditions.

[0050] Furthermore, according to the determined sampling method, the corresponding oil products can be actually collected, properly stored in suitable containers, and marked, and the basic information of the samples can be recorded, such as sampling time, sampling location, oil product number, etc.

[0051] Furthermore, the target characteristic data set for oil product testing and analysis may include key characteristic information such as the sample's octane number, density at 20°C, and olefin content.

[0052] Step S102, discretizing the target feature data set of oil product testing and analysis based on domain knowledge and expert knowledge to obtain a discretized feature data set.

[0053] Specifically, the collected oil product testing and analysis target feature data sets can be preliminarily observed and analyzed to understand the distribution range and general characteristics of these data. For example, it is observed that the octane number ranges from 91.4 to 97.8, the temperature ranges from 20.1°C to 23.6°C, etc.

[0054] Furthermore, we can combine the professional knowledge in the field of oil inspection to understand the importance of various characteristics for oil quality assessment. For example, octane number is an important indicator for measuring gasoline anti-knock performance, and olefin content, aromatic content, etc. can affect combustion performance and emission characteristics.

[0055] Furthermore, we can communicate and cooperate with oil inspection business experts, gain in-depth understanding of business processes and actual needs through expert knowledge, and obtain business insights. For example, we know that in actual oil inspection work, different characteristic value ranges have an important impact on the determination of whether the oil is qualified or not.

[0056] Furthermore, each feature can be discretized based on business needs and understanding of the data. For example, for the discretization of octane number: it is observed that the octane number is between 91.4 and 97.8. Based on business insights, it is divided into three intervals: low (91.4-93.1), medium (93.2-94.3), and high (94.4-97.8). This division method takes into account the impact of different octane number ranges on oil performance and quality in actual oil inspection, as well as the requirements for octane number in different application scenarios.

[0057] Similarly, other features such as temperature, density at 20°C, olefin content, etc. can also be flexibly discretized according to the needs of actual business scenarios and oil quality assessment.

[0058] Furthermore, each feature can be divided into intervals based on full consideration of the data distribution and business rules. For example, for 20℃ density, the range is 713.8kg / m 3 to 765.3kg / m 3 Based on the data aggregation and the business rules of oil quality assessment, it is divided into three intervals: low (713.8-733.4), medium (733.5-736.8) and high (736.9-765.3).

[0059] Furthermore, through the above discretization process, the corresponding discretized feature data set can be obtained. Compared with traditional discretization methods based on fixed rules or algorithms such as equal-width method and equal-frequency method, it effectively improves the accuracy and interpretability of data discretization, while enhancing the model's adaptability to business changes and improving decision-making effectiveness.

[0060] Step S103, based on the initial oil sample set and the discretized feature data set, a target feature data set is obtained by processing using a Gini coefficient calculation method.

[0061] The Gini coefficient is an indicator used to measure the degree of uneven statistical distribution. Its value range is between 0 and 1. The specific calculation formula is shown in the following relationship (1):

[0062]

[0063] Where: p represents the probability that a sample belongs to a certain category; J represents the total number of categories.

[0064] Further, the target feature data set may include an optimal feature value, a suboptimal feature value, a third feature value, and other feature values.

[0065] Specifically, the Gini coefficient calculation method is used to find the corresponding optimal feature, suboptimal feature, third feature and other features in the discretized feature data set and form the corresponding target feature data set.

[0066] Step S104, based on the target feature data set, a target decision tree model is constructed through processing with a decision tree algorithm and a five-fold cross validation method.

[0067] Among them, the decision tree (DT) algorithm represents a supervised machine learning algorithm, which divides the data layer by layer based on the data features until all the features are divided. The decision tree algorithm can be used to solve classification and regression problems.

[0068] Furthermore, the algorithm consists of nodes, branches, and leaves. Each node represents an attribute (or feature), each branch represents a splitting rule (or decision), and each leaf represents a result. Figure 2 As shown, the Root Node represents the starting point of the tree and is the top-level node in the tree structure; Internal Nodes represent nodes that can be further split into other nodes; Leaf Node represents a node that is no longer split; Branch refers to the line connecting nodes and represents the relationship between nodes.

[0069] Furthermore, the decision tree algorithm can generate binary classification or regression trees according to the target variable for classification or regression, respectively. It processes data in its original form and can use the same variables multiple times in different parts of the same DT, revealing complex interdependencies between sets of variables.

[0070] Further, in the case of classification trees, the CART algorithm uses the Gini coefficient to measure the creation of decision points for classification tasks, where the Gini index is an indicator of the quality of a feature, which reflects the degree to which the feature can segment a sample. The Gini index formula is: $$G(S)=1-\sum{i=1}^{n}p(si)^2$$. Among them, $S$ is the sample set, $si$ is the sample category, and $p(si)$ is the probability of the sample category $s_i$.

[0071] Gini Impurity gives an idea of ​​how accurate the split is (the "purity" of the node) by how mixed the classes are in the two classes created by the split. When all observations belong to the same label, the Gini coefficient is 0 (the minimum value). On the other hand, when all observations are evenly distributed between the different labels, we face the worst-case split result, in which the Gini coefficient is 1 (the maximum value).

[0072] In such Figure 3A and Figure 3BIn the scatter plot shown, the ideal segmentation is to make the sample points in the segmented subset belong to the same category as much as possible (that is, the "Target indicator" category is as single as possible). When this ideal situation is achieved, the Gini coefficient is 0 (minimum value), indicating that the purity of the segmented subset is the highest. For example, if Figure 3B If a split point can be found in ("Indicator 2") so that the samples on the left and right sides after the split belong to completely different "Targetindicator" categories, then the Gini coefficient corresponding to this split point is 0.

[0073] In contrast, when all observations are equally distributed between different labels, we face the worst-case segmentation result, in which the Gini coefficient is 1 (maximum value). In a scatter plot, this means that the sample classes in the split subset are very mixed and not well separated. For example, if Figure 3A Randomly selecting an "Indicator1" value for segmentation may result in a large number of samples of one "Target indicator" category and a large number of samples of another "Targetindicator" category in the segmented subset. The Gini coefficient corresponding to this segmentation will be close to 1.

[0074] Furthermore, 5-Fold Cross-Validation is a commonly used model evaluation method, which divides the dataset into multiple subsets and uses these subsets as training sets and test sets in turn to evaluate the performance of the model.

[0075] Specifically, based on the target feature data set, a target decision tree model that meets the conditions can be constructed by combining the decision tree algorithm and the five-fold cross validation method.

[0076] Step S105, using the target decision tree model to perform oil inspection and review to obtain oil inspection analysis results.

[0077] Specifically, the target feature data set of the oil product testing and analysis of the oil product to be verified can be input into the target decision tree model for oil product inspection and review, and the corresponding oil product inspection and analysis results can be output.

[0078] The oil inspection and analysis method provided in this embodiment discretizes the feature data set with the help of domain knowledge and expert knowledge, and can divide the various oil product test and analysis features in a way that is more in line with the actual business logic and oil product characteristics, and mine the hidden rules in the data. Then, the target feature data set with the most distinguishing degree for oil product classification (qualified or unqualified) is screened out through the Gini coefficient calculation method, which reduces the interference of irrelevant features on the result judgment, and allows the decision tree model to focus on key information when it is constructed, so as to more accurately evaluate the quality of oil products, reduce the possibility of misjudgment, and effectively improve the accuracy of oil product inspection and analysis. At the same time, oil product verification is carried out through the decision tree model, abandoning the traditional complete reliance on manual experience and cumbersome manual detection and analysis processes, and can quickly analyze and judge new oil product samples during the audit process, realize the replacement and optimization of manual audit, greatly improve the accuracy and efficiency of the audit, and thus improve the efficiency of oil product inspection and analysis. Further, the model is constructed in combination with the five-fold cross-validation method to ensure that the model has good generalization ability, avoid model overfitting and cause deviations in practical applications, and make the oil product inspection and analysis results output by the model more scientific and accurate.

[0079] In this embodiment, a method for oil inspection and analysis is provided, which can be used in electronic devices such as computers, mobile phones, tablet computers, etc. Figure 4 : is a flow chart of an oil product inspection and analysis method according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0080] Step S401, obtaining an initial oil product sample set and an oil product testing and analysis target feature data set corresponding to the initial oil product sample set.

[0081] Specifically, the above step S401 includes:

[0082] Step S4011, obtaining an initial oil sample set.

[0083] The specific process refers to the description in the above step S101 and will not be repeated here.

[0084] Step S4012, determining an initial feature data set for oil product testing and analysis based on the initial oil product sample set.

[0085] Specifically, for each oil sample in the initial oil sample set, we can determine which characteristics need to be analyzed to evaluate the oil quality based on the professional knowledge and routine test items in the oil inspection field. These characteristics usually include physical properties, such as octane number (a key indicator for measuring gasoline anti-knock performance), 20°C density (reflecting the density characteristics of oil products), and chemical composition content, such as olefin content, aromatic content, benzene content, sulfur content, etc. (affecting the combustion performance and environmental performance of oil products).

[0086] Furthermore, professional oil testing instruments and standard test methods can be used to actually measure and analyze the selected characteristics of each oil sample to obtain the corresponding numerical data. For example, a professional octane number meter can be used to accurately measure the octane number of oil according to the test procedures specified in national standards, and a density meter can be used to measure the density of oil at a specific temperature (20°C). The content of chemical components such as olefins, aromatics, benzene, and sulfur can be determined by chemical analysis methods such as chromatography. The measured values ​​are recorded to form a list of characteristic data corresponding to each oil sample, and these data can then be stored in the corresponding laboratory information management system (LIMS system).

[0087] Furthermore, when in use, key characteristic information such as octane number, density at 20°C, olefin content, etc. of the test sample can be directly obtained through the corresponding LIMS system to form a corresponding initial characteristic data set for oil product testing and analysis.

[0088] Step S4013, structure the initial feature data set for oil product testing and analysis to obtain a target feature data set for oil product testing and analysis.

[0089] Specifically, the initial feature data set of oil product testing and analysis can be organized and converted into a standard structured data format, ensuring the standardization and availability of the target feature data set of oil product testing and analysis.

[0090] Step S402: discretize the target feature data set for oil product testing and analysis based on domain knowledge and expert knowledge to obtain a discretized feature data set. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0091] Step S403, based on the initial oil sample set and the discretized feature data set, a target feature data set is obtained by processing using a Gini coefficient calculation method.

[0092] Specifically, the above step S403 includes:

[0093] Step S4031, based on the initial oil sample set and the discretized feature data set, a plurality of Gini coefficient values ​​are obtained by processing using a Gini coefficient calculation method.

[0094] Specifically, the Gini coefficient value corresponding to each feature can be calculated using the Gini coefficient calculation method shown in the above relationship (1).

[0095] In some optional implementations, the above step S4031 includes:

[0096] Step a1: split the initial oil sample set based on the discretized feature data set to obtain the target oil sample set.

[0097] Step a2, based on the target oil sample set, a plurality of Gini coefficient values ​​are obtained by processing using the Gini coefficient calculation method.

[0098] Specifically, the initial oil sample set can be divided into multiple subsets according to the value of each oil sample on the discretized feature, and these subsets constitute the corresponding target oil sample set.

[0099] For example, suppose there is a discretized feature in the discretized feature dataset called "octane number range", which is discretized into three ranges: low ([91.4, 93.1)), medium ([93.2, 94.3)), and high ([94.4, 97.8)).

[0100] For each oil sample in the initial oil sample set, check the range of its octane number. If the octane number of an oil sample is in [91.4, 93.1), it is classified into the corresponding "low octane number range" subset; if it is in [94.4, 97.8), it is classified into the "medium octane number range" subset; if it is in [94, 98], it is classified into the "high octane number range" subset.

[0101] Furthermore, the above method can be used to perform such an operation on each discrete feature in the discrete feature data set, and finally the initial oil product sample set can be split into multiple target oil product sample subsets, which together constitute the target oil product sample set.

[0102] Furthermore, the corresponding Gini coefficient value is calculated for each subset in the target oil sample set.

[0103] In one embodiment, taking the subset obtained by dividing the above octane number interval as an example:

[0104] First, count the number of qualified oil samples and unqualified oil samples in the subset. Assume that there are 8 qualified oil samples and 3 unqualified oil samples in the "high octane range" subset; there are 5 qualified oil samples and 4 unqualified oil samples in the "medium octane range" subset; there is 1 qualified oil sample and 1 unqualified oil sample in the "low octane range" subset.

[0105] Further, the category probability of each subset is calculated separately:

[0106] (1) Probability of qualified oil samples in the “high octane range” subset Probability of a failed oil sample

[0107] (2) Probability of qualified oil samples in the “medium octane range” subset Probability of a failed oil sample

[0108] (3) The probability of a qualified oil sample in the “low octane number range” subset is p5 = 1; the probability of an unqualified oil sample is

[0109] Furthermore, the above relationship can be used to calculate the Gini coefficient values ​​of each sample subset:

[0110] (1)

[0111] (2)

[0112] (3)

[0113] Furthermore, the proportion of each subset in the initial oil sample set can be calculated, and then these proportions can be used as weights to perform a weighted average on the Gini coefficients of each subset to obtain the weighted Gini coefficient corresponding to the octane number node.

[0114] Among them, the proportion of the "high octane range" subset to the total number of samples The proportion of the "medium octane range" subset to the total number of samples The proportion of the "low octane range" subset to the total number of samples

[0115] Furthermore, the weighted Gini coefficient corresponding to the octane number node

[0116] Furthermore, the same method can be used to calculate the Gini coefficient for other subsets in the target oil sample set (subsets obtained by dividing the target oil sample set with other discrete features), and finally obtain multiple Gini coefficient values.

[0117] Step S4032: determining a target feature data set in the discretized feature data sets based on multiple Gini coefficient values.

[0118] Specifically, the multiple calculated Gini coefficient values ​​may be sorted according to size.

[0119] Furthermore, the feature with the smallest Gini coefficient value is taken as the optimal feature, and then the corresponding suboptimal feature, the third feature and the remaining features are determined in order of the size of the Gini coefficient values ​​to form the corresponding target feature data set.

[0120] Step S404: Based on the target feature data set, a target decision tree model is constructed by using a decision tree algorithm and a five-fold cross validation method. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.

[0121] Step S405: Use the target decision tree model to perform oil inspection and review to obtain oil inspection and analysis results. Figure 1 Step S105 of the illustrated embodiment will not be described in detail here.

[0122] The oil inspection and analysis method provided in this embodiment performs structured processing on the initial feature data set for oil product testing and analysis, thereby ensuring the standardization and availability of the data. Furthermore, the initial oil sample set is first split based on the discretized feature data set, and then the Gini coefficient value is calculated based on the target oil sample set obtained by the split, which fully considers the actual distribution of the oil samples in different discrete feature intervals. Furthermore, when using the target oil sample set to calculate the Gini coefficient, it is possible to accurately measure the ability of each feature to distinguish oil classification (such as qualified and unqualified) under different sample distribution scenarios, avoiding the deviation that may occur in the general calculation of the Gini coefficient, making the feature screening more in line with the actual state of the oil sample, and improving the accuracy of the screened features in judging the oil inspection results. Furthermore, by determining the target feature data set through the calculated multiple Gini coefficient values, it is possible to better reflect the intrinsic characteristics and differences of the oil samples, and provide support for the subsequent enhancement of the discrimination and generalization capabilities of the model.

[0123] In this embodiment, a method for oil inspection and analysis is provided, which can be used in electronic devices such as computers, mobile phones, tablet computers, etc. Figure 5 : is a flow chart of an oil product inspection and analysis method according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:

[0124] Step S501, obtain an initial oil sample set and an oil product testing and analysis target feature data set corresponding to the initial oil sample set. Figure 4 Step S401 of the illustrated embodiment will not be described in detail here.

[0125] Step S502: discretize the target feature data set for oil product testing and analysis based on domain knowledge and expert knowledge to obtain a discretized feature data set. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0126] Step S503: Based on the initial oil sample set and the discretized feature data set, the target feature data set is obtained by processing using the Gini coefficient calculation method. Figure 4 Step S403 of the illustrated embodiment will not be described in detail here.

[0127] Step S504, based on the target feature data set, a target decision tree model is constructed through processing with a decision tree algorithm and a five-fold cross validation method.

[0128] Specifically, the above step S504 includes:

[0129] Step S5041, based on the target feature data set, an initial decision tree model is constructed through decision tree algorithm processing.

[0130] Specifically, a corresponding initial decision tree model may be constructed according to the description of the decision tree algorithm in step S104.

[0131] In one embodiment, the initial decision tree model constructed is as follows: Figure 6 As shown in the figure, smaples represents the total number of samples; values ​​represents the sample set screened by the node; and class represents the test result.

[0132] Step S5042, using the five-fold cross validation method to verify the performance of the initial decision tree model.

[0133] Specifically, the five-fold cross validation method mainly includes the following steps:

[0134] 1) Dataset division: The dataset containing 1000 samples is randomly and evenly divided into five subsets (Fold 1, Fold 2, Fold 3, Fold 4, and Fold 5), each containing 200 samples.

[0135] 2) Model training and testing. Each validation uses four subsets as training sets and the remaining subset as test sets.

[0136] 3) Repeat the verification process. Repeat the above steps four times, selecting a different subset as the test set each time, until the fifth verification is completed.

[0137] 4) Performance metrics. Each validation uses various performance metrics to evaluate the performance of the model, such as accuracy, precision, recall, F1 score, etc.

[0138] 5) Summarize the evaluation results. After completing five validations, average the performance measurement results of each validation to obtain the final performance evaluation of the model.

[0139] Step S5043: when the performance of the initial decision tree model meets the requirements, the initial decision tree model is determined as the target decision tree model.

[0140] Specifically, if the performance of the initial decision tree model meets the requirements, the initial decision tree model is used as the final target decision tree model for oil product inspection and review.

[0141] Step S5044: when the performance of the initial decision tree model does not meet the requirements, the initial decision tree model is iteratively optimized until a target decision tree model is obtained.

[0142] Specifically, if the performance of the initial decision tree model does not meet the requirements, the discrete feature parameters and tree depth value of the decision tree model can be optimized through continuous iteration to make the model more accurate and efficient and obtain the final target decision tree model.

[0143] Step S505: Use the target decision tree model to perform oil inspection and review to obtain oil inspection and analysis results. Figure 1 Step S105 of the illustrated embodiment will not be described in detail here.

[0144] In the oil inspection and analysis method provided in this embodiment, at the stage of constructing the initial decision tree model, the decision tree algorithm is learned and summarized based on the target feature data set, so that the model can focus on the key features that have an important impact on oil inspection and sort out reasonable classification rules. Further, the performance of the initial decision tree model is comprehensively evaluated by the five-fold cross-validation method. It can effectively detect whether the model has problems such as overfitting, ensure that the model has good generalization ability, and enable it to accurately output results when facing new oil samples for inspection, thereby improving the reliability and accuracy of the decision tree model in actual oil inspection applications, and ensuring the effectiveness of the entire oil inspection and analysis method. Furthermore, if it is found that the performance of the initial decision tree model does not meet the requirements, the model can be adjusted in a targeted manner according to the actual situation through iterative optimization, which helps to solve the problems of overfitting or underfitting that may occur in the model.

[0145] In one embodiment, an intelligent audit method for oil product inspection and analysis process is provided. The method is based on a five-fold cross validation technique and a CART decision tree algorithm, and significantly improves the efficiency and accuracy of oil product inspection through model training and model validation evaluation. The method mainly includes the following steps:

[0146] (1) Collecting laboratory analysis data sets. Taking No. 95 gasoline (national standard VIB) as an example, the key characteristic information of the laboratory samples in a certain enterprise's LIMS system, such as octane number, density at 20°C, olefin content, etc., is collected and converted into a standard structured data format, as shown in Table 1 below:

[0147] Table 1. Laboratory analysis data set

[0148]

[0149] (2) Discrete features. Discrete continuous features based on expert knowledge, based on domain knowledge and deep business insights, flexibly adjusted to adapt to specific scenarios, and accurately divided interval boundaries. Compared with traditional discrete methods based on fixed rules or algorithms such as equal width method and equal frequency method, it effectively improves the accuracy and interpretability of data discretization, while enhancing the model's adaptability to business changes and improving decision effectiveness. The results of discretization features based on expert knowledge are as follows:

[0150] 1) Octane number

[0151] Observing the data, the octane number ranges roughly between 91.4 and 97.8, which can be divided into several intervals:

[0152] A. Low: 91.4-93.1;

[0153] B.Medium:93.2-94.3;

[0154] C. High: 94.4-97.8.

[0155] 2) Temperature

[0156] The temperature range is between 20.1℃ and 23.6℃, ​​which can be discretized as:

[0157] A. Low temperature: 20.1℃-21.7℃;

[0158] B. Medium temperature: 21.8℃-23.5℃;

[0159] C. High temperature: 23.6°C (Since there is only one data point, it can be a separate category or incorporated into medium temperature).

[0160] 3) Density at 20℃

[0161] Density range is 713.8 kg / m 3 To 765.3 kg / m 3 It can be discretized as:

[0162] A. Low density: 713.8㎏ / m 3 -733.4㎏ / m 3 ;

[0163] B. Medium density: 733.5 kg / m 3 -736.8㎏ / m 3 ;

[0164] C. High density: 736.9 kg / m 3 -765.3㎏ / m 3 .

[0165] 4) Olefin content

[0166] The olefin content ranges from 1.12% to 1.43% and can be discretized as:

[0167] A. Low: 1.12%-1.22%;

[0168] B. Medium: 1.23%-1.34%;

[0169] C. High: 1.35%-1.43%.

[0170] 5) Aromatic content

[0171] The aromatic content ranges from 30.9% to 32.8% and can be discretized as:

[0172] A. Low: 30.9%-31.8%;

[0173] B. Medium: 31.9%-32.7%;

[0174] C. High: 32.8%.

[0175] 6) Benzene content

[0176] The benzene content is 0.2% or 0.3%, which can be simply discretized as:

[0177] A. Low: 0.2%;

[0178] B. High: 0.3%.

[0179] 7) Sulfur content

[0180] The sulfur content ranges from 2.15% to 2.58% and can be discretized as:

[0181] A. Low: 2.15%-2.27%;

[0182] B. Medium: 2.28%-2.38%;

[0183] C. High: 2.39%-2.58%.

[0184] Furthermore, based on the discrete features, the assay analysis data set is reorganized as shown in Table 2 below:

[0185] Table 2. Reorganized laboratory analysis data set

[0186]

[0187]

[0188] (3) Select the optimal feature based on the Gini coefficient. The calculation formula of the Gini coefficient is shown in the above relationship (1).

[0189] 1) After splitting according to the discretized octane number feature value, three sample sets are obtained: octane number-high: 11, octane number-medium: 9, octane number-low;

[0190] 2) Based on this, the Gini coefficient of the octane number node is:

[0191] Furthermore, according to the above Gini coefficient calculation steps, the Gini coefficients of all features are calculated, and the Gini coefficients of all features are obtained. The feature with the smallest Gini coefficient is the optimal feature, such as Figure 7 shown.

[0192] (4) Construct a decision tree. According to step (3), find the second best eigenvalue, the third eigenvalue, and the remaining eigenvalues ​​in turn, and construct a decision tree based on the CART algorithm, and visualize the decision tree, as shown in Figure 6 As shown (where gini is the Gini coefficient, smaples is the total number of samples, values ​​is the sample set screened by the node, and class is the test result).

[0193] (5) Model training and verification.

[0194] Based on the five-fold cross-validation method, the data set in step (1) is randomly divided into five equal parts, each with 5 samples. Each part is used as a test set, and the remaining parts are used as training sets to verify the model and evaluate its key indicators such as accuracy, recall rate, and F1 score.

[0195] (6) Iterative optimization and deployment. By continuously iteratively optimizing the discrete feature parameters and tree depth value of the decision tree model, the model is made more accurate and efficient, and finally deployed. The implementation steps are as follows:

[0196] 1) Data update: Regularly update the training data set, introduce new test analysis data and audit results, and maintain the timeliness of the model.

[0197] 2) Model retraining: Retrain and optimize the model based on new data and feedback to improve performance.

[0198] 3) Deployment and application: Deploy the optimized decision tree model into the oil inspection and analysis process to realize an automated and intelligent audit process.

[0199] Through the above steps, the present invention can effectively improve the efficiency and accuracy of oil product inspection and analysis, reduce the cost and error rate of manual review, and provide strong support for oil product quality control and safety management.

[0200] The intelligent audit method for the oil inspection and analysis process provided in this embodiment replaces and optimizes manual audits by using a decision tree algorithm to train an intelligent audit model in the oil inspection and analysis process based on a five-fold cross-validation technique, thereby greatly improving the accuracy and efficiency of audits. By quickly analyzing massive historical data of inspection and analysis, it automatically identifies and processes illegal or erroneous content, reduces the subjectivity and error rate of manual operations, and improves the speed and accuracy of the entire audit process.

[0201] In this embodiment, an oil inspection and analysis device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0202] This embodiment provides an oil product inspection and analysis device, such as Figure 8 As shown, the device comprises:

[0203] The acquisition module 801 is used to acquire an initial oil product sample set and an oil product testing and analysis target feature data set corresponding to the initial oil product sample set.

[0204] The first processing module 802 is used to discretize the target feature data set of oil product testing and analysis based on domain knowledge and expert knowledge to obtain a discretized feature data set.

[0205] The second processing module 803 is used to obtain a target feature data set based on the initial oil sample set and the discretized feature data set by using a Gini coefficient calculation method.

[0206] The construction module 804 is used to construct a target decision tree model based on the target feature data set through a decision tree algorithm and a five-fold cross validation method.

[0207] The verification module 805 is used to use the target decision tree model to perform oil inspection and review to obtain oil inspection analysis results.

[0208] In some optional implementations, the acquisition module 801 includes:

[0209] The acquisition submodule is used to obtain the initial oil sample set.

[0210] The first determination submodule is used to determine an initial feature data set for oil product testing and analysis based on an initial oil product sample set.

[0211] The processing submodule is used to perform structured processing on the initial feature data set of oil product testing and analysis to obtain the target feature data set of oil product testing and analysis.

[0212] In some optional implementations, the second processing module 803 includes:

[0213] The calculation submodule is used to obtain multiple Gini coefficient values ​​based on the initial oil sample set and the discretized feature data set through the Gini coefficient calculation method.

[0214] The second determination submodule is used to determine a target feature data set in the discretized feature data set based on multiple Gini coefficient values.

[0215] In some optional implementations, the calculation submodule includes:

[0216] The splitting unit is used to split the initial oil sample set based on the discretized feature data set to obtain the target oil sample set.

[0217] The processing unit is used to obtain multiple Gini coefficient values ​​based on the target oil sample set through the Gini coefficient calculation method.

[0218] In some optional implementations, the construction module 804 includes:

[0219] The construction submodule is used to construct an initial decision tree model based on the target feature data set after being processed by the decision tree algorithm.

[0220] The validation submodule is used to validate the performance of the initial decision tree model using the five-fold cross validation method.

[0221] The third determination submodule is used to determine the initial decision tree model as the target decision tree model when the performance of the initial decision tree model meets the requirements.

[0222] In some optional implementations, the construction module 904 further includes:

[0223] The iterative optimization submodule is used to iteratively optimize the initial decision tree model when the performance of the initial decision tree model does not meet the requirements until the target decision tree model is obtained.

[0224] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0225] The oil inspection and analysis device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0226] The embodiment of the present invention also provides a computer device having the above Figure 8The oil inspection and analysis device shown.

[0227] See also Fig. 9 , Fig. 9 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig. 9 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 10 is taken as an example.

[0228] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0229] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0230] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0231] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0232] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0233] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0234] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0235] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for oil product inspection and analysis, characterized in that: The method comprises: Acquire an initial oil sample set and an oil product testing and analysis target feature data set corresponding to the initial oil sample set; Discretizing the oil product testing and analysis target feature data set based on domain knowledge and expert knowledge to obtain a discretized feature data set; Based on the initial oil sample set and the discretized feature data set, a target feature data set is obtained by processing using a Gini coefficient calculation method; Based on the target feature data set, a target decision tree model is constructed by processing with a decision tree algorithm and a five-fold cross validation method; The target decision tree model is used to perform oil inspection and review to obtain oil inspection analysis results.

2. The method according to claim 1, characterized in that Acquiring an initial oil sample set and an oil product testing and analysis target feature data set corresponding to the initial oil sample set, including: Obtaining the initial oil sample set; Determining the initial characteristic data set for oil product testing and analysis based on the initial oil product sample set; The initial feature data set for oil product testing and analysis is structured to obtain the target feature data set for oil product testing and analysis.

3. The method according to claim 1, characterized in that: Based on the initial oil sample set and the discretized feature data set, a target feature data set is obtained by processing with the Gini coefficient calculation method, including: Based on the initial oil sample set and the discretized feature data set, a plurality of Gini coefficient values ​​are obtained by processing using a Gini coefficient calculation method; The target feature data set is determined in the discretized feature data sets based on the multiple Gini coefficient values.

4. The method according to claim 3, characterized in that Based on the initial oil sample set and the discretized feature data set, a plurality of Gini coefficient values ​​are obtained by processing with the Gini coefficient calculation method, including: Splitting the initial oil product sample set based on the discretized feature data set to obtain a target oil product sample set; Based on the target oil sample set, multiple Gini coefficient values ​​are obtained through processing by the Gini coefficient calculation method.

5. The method according to claim 1, characterized in that Based on the target feature data set, a target decision tree model is constructed after being processed by a decision tree algorithm and a five-fold cross validation method, including: Based on the target feature data set, an initial decision tree model is constructed after being processed by a decision tree algorithm; Using the five-fold cross validation method to verify the performance of the initial decision tree model; When the performance of the initial decision tree model meets the requirements, the initial decision tree model is determined as the target decision tree model.

6. The method according to claim 5, characterized in that The method further comprises: When the performance of the initial decision tree model does not meet the requirements, the initial decision tree model is iteratively optimized until the target decision tree model is obtained.

7. An oil product inspection and analysis device, characterized in that: The device comprises: An acquisition module, used to acquire an initial oil sample set and an oil product testing and analysis target feature data set corresponding to the initial oil sample set; The first processing module is used to discretize the oil product testing and analysis target feature data set based on domain knowledge and expert knowledge to obtain a discretized feature data set; A second processing module is used to obtain a target feature data set based on the initial oil sample set and the discretized feature data set through a Gini coefficient calculation method; A construction module is used to construct a target decision tree model based on the target feature data set through a decision tree algorithm and a five-fold cross validation method; The verification module is used to use the target decision tree model to perform oil inspection and review to obtain oil inspection analysis results.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the oil inspection and analysis method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the oil product inspection and analysis method according to any one of claims 1 to 6.

10. A computer program product, characterized in that It comprises computer instructions, and the computer instructions are used to make a computer execute the oil product inspection and analysis method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Multi-dimensional feature fusion oil product detection data optimization processing method and system

    CN121328834A

  • Optimization processing method and system for oil detection data based on multi-dimensional feature fusion

    CN121328834B