A Machine Learning-Based Intelligent Analysis Method for Imported and Exported Hazardous Chemicals
By constructing a knowledge graph of hazardous chemicals, detecting and evaluating the value index of invalid paths, and screening high-value paths for feature extraction and model training, the problem of incomplete analysis caused by path length limitations in the PRA path ranking algorithm is solved, enabling more comprehensive inference of similar products and substitutes and reducing risks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-02
- Publication Date
- 2026-03-13
AI Technical Summary
In existing technologies, the PRA route ranking algorithm, when inferring similar or substitute products for exported hazardous chemicals, suffers from route length limitations, resulting in the failure to discover ineffective routes. This affects the comprehensiveness, accuracy, and practicality of the analysis, and poses safety, compliance, and trade risks.
By constructing a knowledge graph of hazardous chemicals, valid and invalid paths are detected. The value index of invalid paths is evaluated using their information features. High-value paths are selected and used together with valid paths for feature extraction and model training to construct a hazardous chemical analysis model.
It improves the comprehensiveness and accuracy of hazardous chemical analysis, reduces the uncertainty of risk assessment and alternative selection, and provides stronger support for safety supervision and compliance review.
Smart Images

Figure CN121235576B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to an intelligent analysis method for imported and exported hazardous chemicals based on machine learning. Background Technology
[0002] Because hazardous chemicals are flammable, explosive, toxic, corrosive, or otherwise hazardous, it is necessary to analyze imported and exported hazardous chemicals. In the analysis of imported and exported hazardous chemicals, it is particularly important to infer similar or substitute products for exported hazardous chemicals. This can not only identify potential risks in advance, but also recommend alternatives with low hazard and high compliance, ensuring smooth supply chains and trade, providing reference for emergency management and risk decision-making, and making the export plan for hazardous chemicals safer and more controllable.
[0003] Traditional methods typically use the PRA path ranking algorithm to infer similarities or substitutes for exported hazardous chemicals: First, a hazardous chemicals knowledge graph is constructed using international and domestic regulations and standards, customs declaration documents, and hazardous chemicals databases. Then, the PRA path ranking algorithm is used to extract effective paths from the hazardous chemicals knowledge graph. Finally, feature extraction and model training are performed using the effective paths to obtain a prediction model, which is then used to infer similarities or substitutes for hazardous chemicals.
[0004] However, in the PRA path ranking algorithm, to ensure the intuitive interpretability and computational efficiency of the paths, a maximum length limit is set for the paths. Only paths sampled or searched within the maximum length limit are considered valid paths. This leads to the following problems when using the PRA path ranking algorithm to infer similarities or substitutes for exported hazardous chemicals using traditional methods: the same chemical may be assigned different classifications in Chinese standards, EU standards, and UN standards, making it necessary to rely on cross-standard mapping to find similarities or substitutes. At the same time, some chemicals and their substitutes are not directly substitutable and need to be found through multi-hop chain logic. Therefore, these paths may exceed the maximum length limit in the PRA path ranking algorithm and not be considered invalid paths, resulting in incomplete or even distorted inference results. This affects the comprehensiveness, accuracy, and practicality of hazardous chemical analysis, and may ultimately bring risks in terms of safety, compliance, and trade.
[0005] Therefore, how to perform a secondary screening of ineffective routes when using the PRA route ranking algorithm to infer similarities or substitutes for exported hazardous chemicals, so as to achieve a comprehensive and accurate inference of similarities or substitutes for hazardous chemicals, has become an urgent problem to be solved. Summary of the Invention
[0006] In view of this, embodiments of the present invention provide a machine learning-based intelligent analysis method for import and export hazardous chemicals to solve the problem of how to perform secondary screening of ineffective paths when using the PRA path ranking algorithm to infer similarities or substitutes of exported hazardous chemicals, so as to achieve comprehensive and accurate inference of similarities or substitutes of hazardous chemicals.
[0007] This invention provides a machine learning-based intelligent analysis method for imported and exported hazardous chemicals, which includes the following steps:
[0008] Acquire each chemical and its information characteristics, take the chemical as the target entity and the information characteristics of the chemical as the intermediate entity, construct a hazardous chemical knowledge graph, perform path detection on every two target entities in the hazardous chemical knowledge graph, and obtain at least one valid path and at least one invalid path;
[0009] For any invalid path, obtain the consistency information coverage factor of the invalid path based on the information coverage between the intermediate entities of the invalid path.
[0010] Based on the similarity characteristics between adjacent intermediate entities of any invalid path, the information relevance of any invalid path is obtained; based on the reliability of each connection segment in any invalid path, the connection relationship confidence of any invalid path is obtained; based on the consistency information coverage factor, the information relevance, and the connection relationship confidence, the value index of any invalid path is obtained.
[0011] By utilizing the value index of each invalid path, at least one high-value path is selected from all invalid paths. The PRA path ranking algorithm is then used to extract features and train models for all high-value paths and all valid paths to obtain a hazardous chemical analysis model. This model is used to infer similar or substitute products for hazardous chemicals before their export, thus completing the intelligent analysis of hazardous chemicals.
[0012] Preferably, obtaining the consistency information coverage factor of any invalid path based on the information coverage degree between intermediate entities of any invalid path includes:
[0013] Classify the intermediate entities in the hazardous chemicals knowledge graph to obtain at least two categories of intermediate entities, and each category of intermediate entity includes at least the regulatory system;
[0014] The number of intermediate entities belonging to the regulatory system in the hazardous chemicals knowledge graph is obtained and recorded as the total number of regulatory entities. The number of intermediate entities belonging to the regulatory system in any invalid path is obtained and recorded as the path regulatory system number. The ratio of the path regulatory system number to the total number of regulatory entities is calculated to obtain the information consistency degree of any invalid path.
[0015] The number of intermediate entity categories in the hazardous chemicals knowledge graph is obtained and recorded as the total number of categories. The number of intermediate entity categories in any invalid path is obtained and recorded as the path category number. The ratio of the path category number to the total number of categories is calculated to obtain the information richness of any invalid path.
[0016] The consistency information coverage factor of any invalid path is obtained by adding the information consistency level and the information richness level.
[0017] Preferably, obtaining the information relevance of any invalid path based on the similarity features between adjacent intermediate entities of any invalid path includes:
[0018] Using the TransE embedding model, target entities and intermediate entities in the hazardous chemicals knowledge graph are mapped into geometric vectors;
[0019] For any two adjacent intermediate entities in any invalid path, obtain the cosine similarity between the geometric vectors corresponding to the two adjacent intermediate entities, calculate the mean between the cosine similarity and the constant 1, and denote it as the information-related feature value of the two adjacent intermediate entities.
[0020] The information relevance feature values of every two adjacent intermediate entities in any invalid path are obtained respectively, forming an information relevance feature value sequence. The average value of the information relevance feature value sequence is obtained to obtain the first information relevance degree of any invalid path.
[0021] The absolute values of the differences between any two adjacent information-related feature values in the information-related feature value sequence are accumulated to obtain the information-related feature difference accumulation value. The negative of the information-related feature difference accumulation value is substituted into an exponential function with the natural constant as the base to obtain the second information relevance of any invalid path.
[0022] The information relevance of any invalid path is obtained by adding the first information relevance and the second information relevance.
[0023] Preferably, obtaining the connection relationship confidence of any invalid path based on the reliability of each connection segment in any invalid path includes:
[0024] Chemical safety information specifications should include at least international and domestic regulations and standards, authoritative chemical databases, customs declaration documents, and SDS;
[0025] In the knowledge graph of hazardous chemicals, each connection segment corresponds to a connection relationship with its connected intermediate or target entity. Each connection relationship is determined by at least one chemical safety information specification, and the credibility of each chemical safety information specification is set.
[0026] For any connection segment in any invalid path, the credibility of the chemical safety information specification that determines the connection relationship corresponding to the connection segment is accumulated to obtain the relationship confidence index of the connection segment. The relationship confidence index of each connection segment in any invalid path is obtained respectively, and the mean of the relationship confidence index is obtained. The mean of the relationship confidence index is processed by hyperbolic tangent to obtain the connection relationship confidence of the invalid path.
[0027] Preferably, obtaining the value index of any invalid path based on the consistency information coverage factor, the information relevance, and the connection confidence includes:
[0028] The sum of the relevance of the information and the confidence of the connection relationship is obtained. The consistency information coverage factor is used as the base, and the sum is used as the exponent to obtain the exponent result. The exponent result is then subjected to hyperbolic tangent processing to obtain the value index of any invalid path.
[0029] Preferably, the step of performing path detection on every two target entities in the hazardous chemicals knowledge graph to obtain at least one valid path and at least one invalid path includes:
[0030] For every two target entities in the hazardous chemicals knowledge graph, path detection is performed to obtain at least two paths. The path length of each path is obtained. Paths with a path length less than or equal to a preset path length threshold are recorded as valid paths, and paths with a path length greater than the preset path length threshold are recorded as invalid paths.
[0031] Preferably, the step of using the value index of each invalid path to screen for at least one high-value path among all invalid paths includes:
[0032] Set a value index threshold, and mark invalid paths with a value index greater than the value index threshold as high-value paths.
[0033] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:
[0034] In this invention, the consistency information coverage factor, information relevance, and connectivity confidence of invalid paths are obtained and used to evaluate the value of invalid paths based on their information characteristics. The higher the value of an invalid path, the more likely it is to be a high-value path that has been discarded due to path length limitations (i.e., the two chemicals corresponding to the path may also be similar or substitutes). The value index of invalid paths is obtained and used to screen high-value paths among the invalid paths. These high-value paths are then used together with valid paths for feature extraction and model training. This makes the inference results of similarities and substitutes obtained from the hazardous chemical analysis model more consistent with the actual needs of import and export compliance, safety, and trade, reducing the uncertainty in risk assessment and substitute selection, and providing stronger support for safety supervision, compliance review, and substitute selection. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a flowchart of a machine learning-based intelligent analysis method for imported and exported hazardous chemicals, provided in Embodiment 1 of the present invention. Detailed Implementation
[0037] Embodiments of this disclosure are described in detail below, with examples of these embodiments illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting it.
[0038] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.
[0039] To illustrate the technical solution of the present invention, specific embodiments are described below.
[0040] See Figure 1 This is a flowchart of a machine learning-based intelligent analysis method for imported and exported hazardous chemicals, as provided in Embodiment 1 of the present invention. Figure 1As shown, the method may include:
[0041] Step S101: Obtain each chemical and its information features, use the chemical as the target entity and the information features of the chemical as the intermediate entity to construct a hazardous chemical knowledge graph, perform path detection on every two target entities in the hazardous chemical knowledge graph to obtain at least one valid path and at least one invalid path.
[0042] Hazardous chemicals refer to chemicals that are flammable, explosive, toxic, corrosive, or otherwise hazardous. Due to the safety risks associated with hazardous chemicals, it is necessary to analyze imported and exported hazardous chemicals to ensure that they comply with import and export laws and regulations, thereby guaranteeing safety, compliance, and smooth trade.
[0043] In the analysis of imported and exported hazardous chemicals, in addition to routine risk assessment and compliance verification, it is also necessary to systematically consider their potential impact under different standard systems, transportation conditions, and usage environments. This helps enterprises provide internal reference and risk control, enabling them to select highly compliant and low-hazard alternatives in advance and reduce the risk of being returned or penalized due to non-compliance. Therefore, it is particularly important to infer similarities or alternatives to imported and exported hazardous chemicals. This not only allows for the identification of chemicals that are similar in structure, hazard, or transportation conditions, and the early detection of potential risks, but also enables the recommendation of low-hazard and highly compliant alternatives under regulatory constraints. This ensures smooth supply chains and trade, provides reference for emergency management and risk decision-making, and makes the export of hazardous chemicals safer and more controllable.
[0044] Traditional methods typically use the PRA (Path Ranking Algorithm) to infer similarities or substitutes for exported hazardous chemicals. First, a hazardous chemicals knowledge graph is constructed using international and domestic regulations and standards, customs declaration documents, and hazardous chemicals databases. Then, the PRA algorithm is used to extract valid paths from the hazardous chemicals knowledge graph. To ensure the intuitive interpretability and computational efficiency of the paths, a maximum length limit is set for the paths. Only paths sampled or searched within the maximum length limit are considered valid paths. Finally, feature extraction and model training are performed using the valid paths to obtain a prediction model. The prediction model is then used to infer similarities or substitutes for hazardous chemicals.
[0045] However, the same chemical may be classified differently in Chinese standards, EU standards, and UN standards, which means that similar substances or substitutes must be identified through cross-standard mapping. At the same time, some chemicals and their substitutes are not directly substitutable and need to be identified through multi-hop chain logic. Therefore, these paths may exceed the maximum length limit in the PRA path ranking algorithm and not be considered as invalid paths, resulting in incomplete or even distorted inference results. This affects the comprehensiveness, accuracy, and practicality of hazardous chemical analysis, and may ultimately bring risks in terms of safety, compliance, and trade.
[0046] Therefore, after obtaining valid and invalid paths (i.e., ineffective paths) using the PRA path ranking algorithm, this embodiment of the invention evaluates the value of invalid paths based on their information features, and performs a secondary screening of invalid paths.
[0047] The high-value paths among the invalid paths are obtained, and then features are extracted and models are trained together from the high-value paths and the valid paths, so that the inference results of similarities and substitutes obtained by the hazardous chemical analysis model are more comprehensive and accurate.
[0048] First, a knowledge graph of hazardous chemicals is constructed. Since constructing a knowledge graph of hazardous chemicals is existing technology, it will be briefly described here: In this embodiment, the chemical safety information specification includes international and domestic regulations and standards (e.g., UN TDG, IMDG Code, GB). The system utilizes resources such as the 30000 series, customs declaration documents, hazardous chemical characteristic databases (e.g., authoritative chemical databases), and SDS (Safety Data Sheets) to obtain information on each chemical and its characteristics through chemical safety information specifications. For example, international and domestic regulations and standards include chemical classification, hazard rating, and transport conditions; customs declaration documents include chemical name, export / import country, trade category, and mode of transport; and hazardous chemical characteristic databases and SDSs include chemical molecular structure, physicochemical properties, toxicological information, hazard categories, emergency measures, and storage and transport requirements. The obtained chemical and information characteristics are semantically aligned, using structural information, molecular formula, and CAS number for unified representation. Deduplication and disambiguation are performed, treating chemicals as target entities and their information characteristics as intermediate entities. A hazardous chemical knowledge graph is constructed based on the connections between entities defined by the chemical safety information specifications. Each connection segment corresponds to a connection relationship with its connected intermediate or target entity. For example: Chemical—belongs to—classification standard; Chemical—has—hazard category, etc.
[0049] Then, the PRA path ranking algorithm is used to perform path detection on every two target entities in the hazardous chemicals knowledge graph, obtaining at least two paths. The path length of each path is obtained, and paths with a length less than or equal to a preset path length threshold are recorded as valid paths, while paths with a length greater than the preset path length threshold are recorded as invalid paths. In this embodiment, the preset path length threshold is set to 3, which is a common standard in the PRA path ranking algorithm and is not limited here; it can be set according to the specific implementation scenario. The path detection using the PRA path ranking algorithm is existing technology and will not be elaborated here. Since the purpose of this embodiment is to infer similar or substitute substances, the paths in this embodiment must start with one chemical and end with another chemical, for example: Chemical A—Intermediate Entity 1—Intermediate Entity 2—Chemical B. Paths where the starting or ending point is not a chemical are not considered paths, for example: Intermediate Entity 1—Intermediate Entity 2—Chemical B.
[0050] Thus, at least one valid path and at least one invalid path have been obtained.
[0051] Step S102: For any invalid path, obtain the consistency information coverage factor of the invalid path based on the information coverage degree between the intermediate entities of the invalid path.
[0052] Because the same chemical may be classified differently in Chinese standards, EU standards, and UN standards, similar substances or substitutes must be identified through cross-standard mapping. However, cross-standard mapping indicates the existence of consistency across multiple countries or standards within the pathway, and the relationships between entities at the beginning and end of the pathway are reliable at the regulatory level under cross-standards. Furthermore, some chemicals and their substitutes are not directly interchangeable; their identification requires a multi-hop chain-like logic. Each hop in this multi-hop chain often corresponds to a semantic layer or relationship category in the hazardous chemicals knowledge graph. Multiple hops indicate that the pathway traverses more semantic categories (e.g., physicochemical properties → hazards → regulations → transportation), representing that the similarity or substitutability of chemicals is confirmed across more dimensions, resulting in broader information coverage. Therefore, these pathways possess higher value.
[0053] The greater the potential for inferring analogues or substitutes of chemicals, the more likely they are to be identified as high-value pathways for subsequent feature extraction and model training.
[0054] Therefore, in this embodiment, for any invalid path, the consistency information coverage factor of that invalid path is obtained based on the degree of information coverage between the intermediate entities of that invalid path, and is used to evaluate the value content of the invalid path. The method for obtaining the consistency information coverage factor of any invalid path is as follows:
[0055] The intermediate entities in the hazardous chemicals knowledge graph are classified according to the chemical safety information standard, resulting in at least two categories of intermediate entities. These categories include regulatory system, hazard level, transportation conditions, physical and chemical properties, and hazard category.
[0056] The number of intermediate entities belonging to the regulatory system in the hazardous chemicals knowledge graph is obtained and denoted as the total number of regulatory systems. The number of intermediate entities belonging to the regulatory system in any invalid path is obtained and denoted as the path regulatory system. For example, if the intermediate entities in a path only include Chinese standards and EU standards, then the path regulatory system is 2. The ratio of the path regulatory system to the total number of regulatory systems is calculated to obtain the information consistency degree of any invalid path.
[0057] The number of intermediate entity categories in the hazardous chemicals knowledge graph is recorded as the total number of categories. The number of intermediate entity categories in any invalid path is recorded as the number of path categories. For example, if a path contains only 5 intermediate entities, but these 5 intermediate entities all belong to the same intermediate entity category (flash point, density, boiling point, vapor pressure, solubility, etc. are all physicochemical properties), then the number of path categories for this path is 1. The ratio of the number of path categories to the total number of categories is calculated to obtain the information richness of any invalid path.
[0058] The consistency information coverage factor of any invalid path is obtained by adding the information consistency level and the information richness level.
[0059] In one implementation, taking the k-th invalid path as an example, the formula for calculating the consistency information coverage factor of the k-th invalid path is:
[0060]
[0061] in, The consistency information coverage factor for the k-th invalid path; The number of path regulations for the k-th invalid path; The total number of regulations; This represents the number of path categories for the k-th invalid path. This represents the total number of categories.
[0062] It should be noted that, The information consistency level of the k-th invalid path represents the proportion of the number of regulatory systems in the k-th invalid path to the total number of regulatory systems. A higher proportion indicates that the k-th invalid path involves more standards, and the relationships in the path are not only valid under a single standard, but also possess consistency certification across multiple countries and systems. The larger it is; The information richness of the k-th invalid path represents the proportion of path categories in the k-th invalid path to the total number of categories. A higher proportion indicates that the k-th invalid path has more semantic levels, richer and more comprehensive information coverage, and that the relationships in the path are supported in all dimensions, resulting in broader information coverage. The larger it is.
[0063] Thus, the consistency information coverage factor for any invalid path is obtained.
[0064] Step S103: Based on the similarity characteristics between adjacent intermediate entities of any invalid path, obtain the information relevance of any invalid path; based on the reliability of each connection segment in any invalid path, obtain the connection relationship confidence of any invalid path; based on the consistency information coverage factor, the information relevance, and the connection relationship confidence, obtain the value index of any invalid path.
[0065] Since each intermediate entity in the path carries logical or semantic information connecting the first and last target entities, in the inference of similarities or substitutes for imported and exported hazardous chemicals, the logic and semantics between intermediate entities in the path should be coherent and consistent to ensure that the path can support the potential similarity or substitution relationship between the first and last entities. Although the consistency information coverage factor obtained in step S102 can reflect the overall information coverage and consistency characteristics of the path, it ignores the changing characteristics of the logical or semantic relationships between intermediate entities within the path. That is, although a path covers multiple standards and semantic levels, if the logical jumps between intermediate entities in the path are too large and the semantics are discontinuous, it still cannot be said that this path is a high-value path.
[0066] Therefore, this embodiment utilizes the TransE embedding model to map target entities and intermediate entities in the hazardous chemicals knowledge graph into geometric vectors, and calculates the cosine similarity between the geometric vectors corresponding to adjacent intermediate entities. This objectively reflects the semantic proximity between intermediate entities in the numerical space. Furthermore, based on the cosine similarity between the geometric vectors corresponding to adjacent intermediate entities, the information relevance of any invalid path is obtained, capturing the semantic continuity and logical rationality within the path, thereby more accurately assessing the value content of invalid paths. The TransE embedding model and cosine similarity are existing technologies and will not be elaborated upon here. The method for obtaining the information relevance of any invalid path is as follows:
[0067] For any two adjacent intermediate entities in any invalid path, obtain the cosine similarity between the geometric vectors corresponding to the two adjacent intermediate entities, calculate the mean between the cosine similarity and the constant 1, and denote it as the information-related feature value of the two adjacent intermediate entities.
[0068] The information relevance feature values of every two adjacent intermediate entities in any invalid path are obtained respectively, forming an information relevance feature value sequence. The average value of the information relevance feature value sequence is obtained to obtain the first information relevance degree of any invalid path.
[0069] The absolute values of the differences between any two adjacent information-related feature values in the information-related feature value sequence are accumulated to obtain the information-related feature difference accumulation value. The negative of the information-related feature difference accumulation value is substituted into an exponential function with the natural constant as the base to obtain the second information relevance of any invalid path.
[0070] The information relevance of any invalid path is obtained by adding the first information relevance and the second information relevance.
[0071] In one implementation, taking the k-th invalid path as an example, the formula for calculating the relevance of the information of the k-th invalid path is:
[0072]
[0073] in; The degree of relevance of the information of the k-th invalid path; Let cosine similarity be the geometric vectors corresponding to the i-th intermediate entity and the (i+1)-th intermediate entity in the k-th invalid path. This represents the number of intermediate entities in the k-th invalid path. It is an exponential function with the natural constant as the base, used for inverse proportional normalization; It is the absolute value symbol.
[0074] It should be noted that, The larger the value, the greater the semantic similarity between the i-th intermediate entity and the (i+1)-th intermediate entity in the k-th invalid path. The first information relevance of the k-th invalid path reflects the semantic coherence between the intermediate entities in the k-th invalid path. The larger the value, the greater the semantic coherence between intermediate entities in the k-th invalid path. The larger it is; The relevance of the second information for the k-th invalid path. The larger the value, the greater the magnitude of change between two adjacent information-related feature values in the information-related feature value sequence, and thus... The larger the value, the smoother the semantic fluctuations between adjacent intermediate entities in the k-th invalid path, the higher the stability of the similarity between intermediate entities, and the less likely semantic jumps will occur. The larger it is. The information relevance feature value between the i-th intermediate entity and the (i+1)-th intermediate entity in the k-th invalid path is given by... The value range is [-1, 1]. To facilitate subsequent analysis, this embodiment limits the value range to [0, 1] by calculating the relevant feature values of the information for subsequent analysis.
[0075] In addition, in the knowledge graph of hazardous chemicals, the connection relationship between each link segment and the intermediate or target entity it connects to often represents the relationship between the chemical and its classification, transportation conditions, hazardous characteristics, substitutes, etc. The ultimate goal of inferring similar or substitute products of chemicals is to serve safety compliance and trade decisions, ensuring that the import and export of hazardous chemicals comply with import and export laws and regulations, and guaranteeing safety, compliance and smooth trade. If the source of these relationships is unclear or lacks authoritative support, it will directly affect the reliability of chemical analysis.
[0076] Therefore, after obtaining the consistency information coverage factor and information relevance of any invalid path, it is necessary to perform a reliability analysis on the connection relationship between each connection segment in any invalid path and the intermediate or target entity it connects to. Based on the reliability of each connection segment in any invalid path, the connection relationship confidence of any invalid path is obtained, which reflects the credibility of the connection relationship in any invalid path. The higher the connection relationship confidence, the higher the acceptance of the connection relationship in any invalid path, and the higher its credibility and interpretability, and the higher its value content.
[0077] The method for obtaining the connection confidence of any invalid path based on the reliability of each connection segment in any invalid path is as follows:
[0078] (1) Set the credibility of each chemical safety information specification.
[0079] Since each connection is defined by at least one chemical safety information specification, and the authority and credibility of each chemical safety information specification vary, a credibility level for each chemical safety information specification is set.
[0080] In this embodiment, the credibility range of the chemical safety information specification is [0, 1]. The credibility of the chemical safety information specification is set based on its authority. For example, international and domestic regulations and standards (UN TDG, EU CLP, Chinese GB, etc.) have legal effect and the highest credibility, so the credibility of international and domestic regulations and standards is set at 0.45. Next is industry databases (such as authoritative chemical databases), which are compiled by professional institutions and have high recognition, so the credibility of industry databases is set at 0.3. Next is customs declaration data, which has high authenticity, so the credibility of customs declaration data is set at 0.2. Finally, there are texts such as SDS, which may have extraction errors and therefore have lower credibility, so the credibility of texts such as SDS is set at 0.05. The specific credibility value needs to be set according to actual needs and is not limited here.
[0081] (2) Obtain the confidence of the connection relationship of any invalid path.
[0082] Specifically, for any connection segment in any invalid path, the credibility of the chemical safety information specification that determines the connection relationship corresponding to the connection segment is accumulated to obtain the relationship confidence index of the connection segment. The relationship confidence index of each connection segment in any invalid path is obtained respectively, and the mean of the relationship confidence index is obtained. The mean of the relationship confidence index is processed by hyperbolic tangent to obtain the connection relationship confidence of the invalid path.
[0083] In one implementation, taking the k-th invalid path as an example, the formula for calculating the connection confidence of the k-th invalid path is:
[0084]
[0085] in, The confidence level of the connection relationship for the k-th invalid path; To determine the credibility of the b-th security information specification of the connection relationship corresponding to the j-th connection segment in the k-th invalid path; o is the number of credibility values of the b-th security information specification of the connection relationship corresponding to the j-th connection segment in the k-th invalid path; m is the number of connection segments in the k-th invalid path; It is the hyperbolic tangent function.
[0086] It should be noted that, The larger the value, the higher the authority of the b-th security information specification in determining the connection relationship corresponding to the j-th connection segment in the k-th invalid path; that is, the more reliable the connection relationship corresponding to the j-th connection segment in the k-th invalid path. The larger it is.
[0087] After obtaining the consistency information coverage factor, information relevance, and connectivity confidence of any invalid path, the value index of any invalid path is further obtained based on the consistency information coverage factor, the information relevance, and the connectivity confidence. Specifically:
[0088] The sum of the relevance of the information and the confidence of the connection relationship is obtained. The consistency information coverage factor is used as the base, and the sum is used as the exponent to obtain the exponent result. The exponent result is then subjected to hyperbolic tangent processing to obtain the value index of any invalid path.
[0089] In one implementation, taking the kth invalid path as an example, the formula for calculating the value index of the kth invalid path is:
[0090]
[0091] in, The value index of the kth invalid path; The degree of relevance of the information of the k-th invalid path; The confidence level of the connection relationship for the k-th invalid path; The consistency information coverage factor for the k-th invalid path; It is the hyperbolic tangent function.
[0092] It should be noted that, This represents the cross-standard mapping strength and information coverage of the k-th invalid path. The larger the value, the more regulatory framework the k-th invalid path covers; the greater the information coverage, the higher the value for inferring similarities or substitutes. The larger it is; The semantic relevance and logical coherence of the intermediate entities in the k-th invalid path are considered. The larger the value, the more semantically similar the adjacent intermediate entities in the k-th invalid path are, and the smoother the semantics of the path without significant fluctuations, thus increasing the path's value. The larger it is; The larger the value, the more likely the connections in the k-th invalid path originate from authoritative, reliable, and multi-source cross-validated channels; the higher the credibility and the higher the value. The larger it is.
[0093] Thus, the value index of any invalid path is obtained.
[0094] Step S104: Using the value index of each invalid path, at least one high-value path is selected from all invalid paths. The PRA path ranking algorithm is used to extract features and train models for all high-value paths and all valid paths to obtain a hazardous chemical analysis model. This model is used to infer similar or substitute products for hazardous chemicals before their export, thus completing the intelligent analysis of hazardous chemicals.
[0095] Since a higher value index indicates a higher value content in invalid paths, meaning invalid paths are more likely to be retained for subsequent feature extraction and model sequencing, the value index of each invalid path is obtained using the method described above for obtaining the value index of the k-th invalid path. A value index threshold is set, and invalid paths with a value index greater than the threshold are recorded as high-value paths for subsequent feature extraction and model sequencing. Since the value index ranges from [0, 1], this embodiment uses the center of the range as the threshold for distinguishing path value, i.e., the value index threshold is set to 0.5. This is not a limitation and can be set according to the specific implementation scenario.
[0096] Furthermore, the PRA path ranking algorithm is used to extract features and train models on all high-value and effective paths to obtain a hazardous chemical analysis model. This model is then used to infer similarities or substitutes for hazardous chemicals, helping companies provide internal reference and risk control. It allows for the early selection of highly compliant and low-hazard alternatives, reducing the risk of return or penalties due to non-compliance. Specifically, this includes: early detection of potential hazards or compliance risks, reducing accidents during transportation, storage, or use; advance preparation of hazardous chemical substitutes, enabling rapid adjustments to plans when the original hazardous chemicals cannot be exported temporarily or costs fluctuate, ensuring production and trade continuity; and designing contingency plans based on similarity and substitute information for rapid response in the event of accidents or sudden restrictions. The use of the PRA path ranking algorithm for feature extraction and model training to obtain the hazardous chemical analysis model, and the use of this model to infer similarities or substitutes for hazardous chemicals, are existing technologies and will not be elaborated upon here.
[0097] In summary, in this embodiment of the invention, the consistency information coverage factor, information relevance, and connectivity confidence of invalid paths are obtained to evaluate the value of invalid paths based on their information characteristics. The higher the value of an invalid path, the more likely it is to be a high-value path discarded due to path length limitations (i.e., the two chemicals corresponding to this path may also be similar or substitutes). The value index of invalid paths is obtained to screen high-value paths among invalid paths. These high-value paths are then used for feature extraction and model training along with valid paths. This makes the inference results of similarities and substitutes obtained from the hazardous chemical analysis model more consistent with the actual needs of import and export compliance, safety, and trade, reducing the uncertainty in risk assessment and substitute selection, and providing stronger support for safety supervision, compliance review, and substitute selection.
[0098] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A machine learning-based intelligent analysis method for import and export dangerous chemicals, characterized in that, The machine learning-based import and export dangerous chemical intelligent analysis method comprises the following steps: Obtain each chemical and its information characteristics, take the chemical as a target entity, take the information characteristics of the chemical as an intermediate entity, construct a dangerous chemical knowledge graph, perform path detection on each two target entities in the dangerous chemical knowledge graph, and obtain at least one valid path and at least one invalid path; For any invalid path, obtain a consistency information coverage factor of the any invalid path according to an information coverage degree between intermediate entities of the any invalid path; According to the similarity characteristics between adjacent intermediate entities of the any invalid path, obtain an information correlation degree of the any invalid path, obtain a connection relationship confidence of the any invalid path according to a reliable degree of each connection segment in the any invalid path, obtain an addition result of the information correlation degree and the connection relationship confidence, take the consistency information coverage factor as a base, take the addition result as an index, obtain an index result, perform a hyperbolic tangent processing on the index result, and obtain a value index of the any invalid path; Using the value index of each invalid path, at least one high-value path is screened out from all invalid paths, feature extraction and model training are performed on all high-value paths and all valid paths by using a PRA path ranking algorithm, a dangerous chemical analysis model is obtained, which is used for inferring similar or substitute products of the dangerous chemical before the dangerous chemical is exported, and intelligent analysis of the dangerous chemical is completed; The consistency information coverage factor of the any invalid path is obtained according to the information coverage degree between the intermediate entities of the any invalid path, which comprises the following steps: Classify the intermediate entities in the dangerous chemical knowledge graph to obtain at least two intermediate entity categories, and the intermediate entity categories at least include a regulation system; Obtain the number of intermediate entities belonging to the regulation system in the dangerous chemical knowledge graph, denoted as a total regulation system number, obtain the number of intermediate entities belonging to the regulation system in the any invalid path, denoted as a path regulation system number, calculate the ratio of the path regulation system number to the total regulation system number, and obtain the information consistency degree of the any invalid path; Obtain the number of intermediate entity categories in the dangerous chemical knowledge graph, denoted as a total category number, obtain the number of intermediate entity categories in the any invalid path, denoted as a path category number, calculate the ratio of the path category number to the total category number, and obtain the information richness degree of the any invalid path; According to the addition result of the information consistency degree and the information richness degree, the consistency information coverage factor of the any invalid path is obtained.
2. The machine learning-based intelligent analysis method for import and export dangerous chemicals according to claim 1, characterized in that, The information correlation degree of the any invalid path is obtained according to the similarity characteristics between adjacent intermediate entities of the any invalid path, which comprises the following steps: The target entities and intermediate entities in the dangerous chemical knowledge graph are mapped into geometric vectors by using a TransE embedding model; For any two adjacent intermediate entities in the any invalid path, obtain the cosine similarity between the geometric vectors corresponding to the any two adjacent intermediate entities, calculate the average between the cosine similarity and constant 1, and record it as the information correlation characteristic value of the any two adjacent intermediate entities; Respectively obtain the information correlation characteristic value of each two adjacent intermediate entities in the any invalid path, form an information correlation characteristic value sequence, obtain the average value of the information correlation characteristic value sequence, and obtain the first information correlation degree of the any invalid path; Accumulate the absolute value of the difference between each two adjacent information correlation characteristic values in the information correlation characteristic value sequence to obtain an information correlation characteristic difference accumulation value, and substitute the reciprocal of the information correlation characteristic difference accumulation value into an exponential function with a natural constant as the base to obtain the second information correlation degree of the any invalid path; According to the addition result of the first information correlation degree and the second information correlation degree, obtain the information correlation degree of the any invalid path.
3. The machine learning-based intelligent analysis method for import and export dangerous chemicals according to claim 1, characterized in that, The connection relationship confidence of the any invalid path is obtained according to the reliability degree of each connection segment in the any invalid path, including: The chemical safety information specification at least includes international and domestic regulations and standards, authoritative chemical database, customs declaration data and SDS; In the dangerous chemical knowledge graph, each connection segment and the intermediate entity or target entity connected thereto correspond to a connection relationship, each connection relationship is determined by at least one chemical safety information specification, and the reliability of each chemical safety information specification is set; For any connection segment in the any invalid path, the reliability of the chemical safety information specification determining the connection relationship corresponding to the any connection segment is accumulated to obtain the relationship confidence index of the any connection segment, the relationship confidence index of each connection segment in the any invalid path is obtained respectively, the average value of the relationship confidence index is obtained correspondingly, the relationship confidence index average value is processed by hyperbolic tangent, and the connection relationship confidence of the any invalid path is obtained.
4. The machine learning-based intelligent analysis method for import and export dangerous chemicals according to claim 1, characterized in that, The path detection is performed on each two target entities in the dangerous chemical knowledge graph to obtain at least one valid path and at least one invalid path, including: The path detection is performed on each two target entities in the dangerous chemical knowledge graph to obtain at least two paths, the path length of each path is obtained, the path with a path length less than or equal to a preset path length threshold is recorded as a valid path, and the path with a path length greater than the preset path length threshold is recorded as an invalid path.
5. The machine learning-based intelligent analysis method for import and export dangerous chemicals according to claim 1, characterized in that, The value index of each invalid path is used to screen at least one high-value path from all invalid paths, including: A value index threshold is set, and the invalid path with a value index greater than the value index threshold is recorded as a high-value path.
Citation Information
Patent Citations
Knowledge graph path mining method using conditional random field and relation extraction
CN118627614A
Knowledge graph reasoning method and system combining reinforcement learning and attention mechanism
CN120671841A