Intelligent conversion method and system of data units
By using a prior knowledge graph of data units for contextual analysis and confidence calculation, and by automating the conversion of data units, the problem of inconsistent units in data integration and analysis is solved, thus improving efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING CSSCA TECH CO LTD
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-17
AI Technical Summary
Because different systems have different unit usage habits, inconsistencies in data units occur during data integration and analysis. Existing technologies require manual correction, which is inefficient and prone to errors.
By identifying target data in the text of the data source, using a prior knowledge graph of data units for contextual analysis, determining a list of candidate units, calculating confidence levels, and finally converting the target data into a target unit ontology of the same unit dimension, the automatic unit conversion is achieved.
It requires no human intervention, improving the efficiency and accuracy of data integration and analysis, especially when the target data lacks the original unit entity, it can automatically determine and convert the unit.
Smart Images

Figure CN121412399B_ABST
Abstract
Description
Technical Field
[0001] This disclosure generally relates to the field of data conversion and processing technology, and specifically to an intelligent conversion method and system for data units. Background Technology
[0002] With the development of big data technology, data sources have become increasingly diverse. Therefore, before using and analyzing data, it is necessary to integrate and analyze heterogeneous data obtained from multiple different systems. During this process, inconsistencies in unit usage between different data sources often arise due to the different systems' unit usage habits. For example, length may be expressed in meters, kilometers, and feet, while time may be expressed in seconds, minutes, and hours. Furthermore, some data texts omit units altogether, meaning the unit is not indicated after the numerical value. This creates significant difficulties for subsequent data integration and analysis, often requiring manual correction before use, greatly reducing the efficiency of data integration and analysis. Summary of the Invention
[0003] In view of the above-mentioned defects or deficiencies in the existing technology, it is desirable to provide an intelligent conversion method and system for data units, which can complete the missing unit ontology based on the context information in the data source text and convert it into the target unit ontology under the same dimension, thereby effectively improving the efficiency of data integration and analysis.
[0004] In a first aspect, embodiments of this application provide an intelligent conversion method for data units, comprising:
[0005] Identify the target data to be converted from the data source text, perform context analysis on the target data, and obtain the corresponding data reference information;
[0006] Based on data reference information, a candidate unit list corresponding to the target data is determined using a data unit prior knowledge graph. The nodes in the data unit prior knowledge graph are unit entities, and the edges are the transformation relationships between unit entities. The data unit prior knowledge graph is built based on OWL and includes a unit class hierarchy, object attributes, transformation individual instances and semantic rules, supporting consistency verification and semantic path reasoning.
[0007] Obtain known units from the data source text, and calculate the confidence score of each candidate unit in the candidate unit list based on the known units and the prior knowledge graph of data units;
[0008] Based on the confidence level of each candidate unit, determine the original unit ontology corresponding to the target data;
[0009] Based on the prior knowledge graph of the data unit, the target data is transformed from the original unit ontology into the target unit ontology, and the target unit ontology and the original unit ontology belong to the same unit dimension.
[0010] In some embodiments, it also includes:
[0011] Multiple known unit entities are converted into unit feature vectors, which are composed of the seven base dimensions of the International System of Units (SI), dimensional indices, and conversion factors.
[0012] By constructing a prior knowledge graph of data units based on the unit feature vectors corresponding to multiple known unit ontologies and according to the transformation relationship between the unit ontologies.
[0013] In some embodiments, contextual analysis of the target data includes automatically identifying physical quantity units from the input structured data using a multi-strategy identification method, specifically including:
[0014] Field naming pattern recognition is used to analyze unit indicators in field names;
[0015] Metadata analysis is used to parse unit information in data descriptions;
[0016] Data value feature identification is used to infer possible unit types based on numerical distribution characteristics;
[0017] Contextual association analysis is used to assist in unit identification by leveraging relationships between fields;
[0018] The integrated decision-making unit is used to integrate multiple identification results to form a final judgment.
[0019] In some embodiments, based on data reference information, a candidate unit list corresponding to the target data is determined using a prior knowledge graph of data units, including:
[0020] For at least one candidate unit in the prior knowledge graph of the data unit, determine the word frequency, inverse document frequency, length of the data reference information, and average length of the data source context of the candidate unit in the data reference information;
[0021] Based on the word frequency, inverse document frequency, length of the data reference information, and average length of the data source context of the candidate unit, calculate the relevance score between each candidate unit and the data reference information.
[0022] At least one candidate unit is sorted according to its first relevance score to obtain a list of candidate units.
[0023] In some embodiments, known units in the data source text are obtained, and based on the known units and a prior knowledge graph of data units, the confidence score of each candidate unit in the candidate unit list is calculated, including:
[0024] Obtain at least one transformation relation related to the known units from the prior map of data units. The transformation relations include direct transformation relations and indirect transformation relations.
[0025] Based on the known units and conversion relationships, determine the reasoning unit corresponding to the known units;
[0026] Based on candidate units and inference units, a second relevance score between candidate units and known units is determined;
[0027] The confidence level of the candidate unit is determined based on the first relevance score between the candidate unit and the data reference information and the second relevance score between the candidate unit and the known unit.
[0028] In some embodiments, a second relevance score between the candidate unit and the known unit is determined based on the candidate unit and the inference unit, including:
[0029] Calculate the similarity between candidate units and inference units;
[0030] The second relevance score is determined based on the distance between the inference unit corresponding to the maximum similarity and the known unit.
[0031] In some embodiments, the confidence level of a candidate unit is determined based on a first relevance score between the candidate unit and data reference information and a second relevance score between the candidate unit and known units, including:
[0032] The weighted sum of the first and second relevance scores is used as the confidence level of the candidate unit.
[0033] In some embodiments, the conversion of target data from the original unit ontology to the target unit ontology based on the data unit prior knowledge graph includes:
[0034] Based on the prior knowledge graph of data units, at least one candidate path is obtained to transform from the original unit ontology to the target unit ontology;
[0035] Calculate the conversion path cost for each candidate path;
[0036] Based on the candidate path with the lowest conversion cost, the original unit ontology is converted into the target unit ontology.
[0037] In some embodiments, calculating the conversion path cost corresponding to each candidate path includes:
[0038] Based on the prior knowledge graph of data units, the transformation factor corresponding to each edge in the candidate path is obtained;
[0039] For each edge, determine the transformation weight corresponding to that edge based on the transformation factor;
[0040] The cost of a transformation path is determined by the sum of all transformation weights in the candidate paths.
[0041] In some embodiments, the original unit ontology is converted into the target unit ontology based on the candidate path with the lowest conversion path cost, including:
[0042] Based on the prior knowledge graph of data units, the target transformation factor corresponding to each edge in the candidate path with the lowest transformation path cost is obtained;
[0043] Determine the total conversion factor from the original unit ontology to the target unit ontology based on the target conversion factor;
[0044] Based on the total transformation factor, the original unit ontology is transformed into the target unit ontology.
[0045] Secondly, embodiments of this application provide an intelligent data unit conversion system, comprising:
[0046] The identification module is used to identify the target data to be converted from the data source text, perform context analysis on the target data, and obtain the data reference information corresponding to the target data.
[0047] The determination module is used to determine the candidate unit list corresponding to the target data based on data reference information and using a data unit prior knowledge graph. The nodes in the data unit prior knowledge graph are unit entities, and the edges are the transformation relationships between unit entities. The data unit prior knowledge graph is built based on OWL and includes a unit class hierarchy, object attributes, transformation individual instances and semantic rules, supporting consistency verification and semantic path reasoning.
[0048] The calculation module is used to obtain known units in the data source text, and calculate the confidence of each candidate unit in the candidate unit list based on the known units and the prior knowledge graph of data units.
[0049] The analysis module is used to determine the original unit ontology corresponding to the target data based on the confidence level of each candidate unit.
[0050] The transformation module is used to transform the target data from the original unit ontology to the target unit ontology based on the prior knowledge graph of the data unit. The target unit ontology and the original unit ontology belong to the same unit dimension.
[0051] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in embodiments of this application.
[0052] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in embodiments of this application.
[0053] Fifthly, embodiments of this application provide a computer program product, including a computer program, characterized in that, when the computer program is executed by a processor, it implements the method described in embodiments of this application.
[0054] The intelligent data unit conversion method and system proposed in this application, after identifying the target data to be converted from the data source text, calculates the confidence of multiple candidate units using data reference information, a prior knowledge graph of data units, and known units in the data source text. Then, the candidate unit with the highest confidence is taken as the original unit ontology of the target data, and the target data is converted from the original unit ontology to the target unit ontology according to the prior knowledge graph of data units. This achieves automated unit conversion of the target data. Especially when the target data lacks an original unit ontology, the system performs a series of operations to determine the original unit ontology of the target data and convert the units through analysis, without manual intervention, which greatly improves the efficiency and accuracy of data analysis.
[0055] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0056] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0057] Figure 1 A flowchart illustrating an embodiment of the intelligent conversion method for data units provided in this application is shown.
[0058] Figure 2 This invention provides a schematic diagram of the structure of an intelligent data unit conversion system according to an embodiment of the present application.
[0059] Figure 3 A system architecture diagram provided in one embodiment of this application is shown;
[0060] Figure 4 This invention provides a flowchart of a physical quantity unit identification process according to an embodiment of the present application.
[0061] Figure 5 A schematic diagram of the structure of a unit of measurement ontology library provided in an embodiment of this application is shown;
[0062] Figure 6 This paper illustrates a schematic diagram of the working principle of an ontology reasoning engine provided in an embodiment of this application.
[0063] Figure 7 A schematic diagram of the composition of a conversion rule generator provided in an embodiment of this application is shown;
[0064] Figure 8 This paper illustrates an example diagram of a data conversion process in a practical application scenario provided by an embodiment of this application;
[0065] Figure 9 A schematic diagram of the structure of a computer system suitable for implementing an electronic device or server according to embodiments of this application is shown. Detailed Implementation
[0066] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0067] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0068] In related technologies, the lack of standardized units for physical quantities has become a major pain point for data analysis organizations. This is typically addressed through manual preprocessing, where data engineers manually convert data to a unified unit before importing it – a labor-intensive and error-prone process. While technologies offer processing based on fixed conversion rules—providing fixed conversion rules for known unit bases—in practice, data sources often omit the corresponding unit bases or introduce new units without predefined conversion rules. In these cases, manual processing is still required, significantly increasing the workload for data engineers.
[0069] Based on this, this application proposes an intelligent conversion method for data units, which can complete the missing unit ontology according to the context information in the data source text and convert it into the target unit ontology under the same dimension, thereby effectively improving the efficiency of data integration and analysis.
[0070] To further illustrate the technical solutions provided in the embodiments of this application, a detailed description is provided below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of this application provide method operation instruction steps as shown in the following embodiments or drawings, the method may include more or fewer operation instruction steps based on conventional or non-creative effort. In steps where there is no logically necessary causal relationship, the execution order of these steps is not limited to the execution order provided in the embodiments of this application. In actual processing or when the device executes the method, it may be executed sequentially or in parallel according to the method shown in the embodiments or drawings.
[0071] It should be noted that the acquisition or use of data in the embodiments of this application requires the user's consent. The relevant data can only be obtained after the user's authorization and permission, and the acquisition or use of the data complies with the provisions of relevant laws and regulations.
[0072] Example 1
[0073] This embodiment provides an intelligent conversion method for data units. For details not disclosed in the intelligent conversion method for data units in this embodiment, please refer to the specific implementation of the intelligent conversion system for data units in Embodiment 1.
[0074] Please refer to Figure 1 , Figure 1 A flowchart illustrating an embodiment of the intelligent conversion method for data units provided in this application is shown. Figure 1 As shown, the method includes:
[0075] Step 101: Identify the target data to be converted from the data source text, perform context analysis on the target data, and obtain the data reference information corresponding to the target data.
[0076] It should be noted that the target data to be converted can be data with known units or data with omitted units. Preferably, the target data to be converted is data with omitted units, that is, the data's unit is not directly and explicitly assigned in the context of the data source text. For example, in a data text, the first column is identified by the attribute "length," and the second column is identified by the attribute "time," but it is not explicitly stated that the unit corresponding to the length is kilometer, meter, centimeter, or any other length unit, nor is it explicitly stated that the unit corresponding to the time is hour, minute, second, or any other time unit. In this case, the data in the first and second columns is the target data to be converted.
[0077] It should also be noted that the data reference information corresponding to the target data can be multiple words obtained from text recognition of the data source, or it can be a numerically related entity or attribute entity obtained from contextual analysis of the text recognition results. For example, entity entities such as "oil" and "gas" and attribute entities such as "speed" and "area" in the data source text can be used as the data reference information corresponding to the target data. In other words, the data reference information corresponding to the target data can be text information that is related to the original entity of the target data. When text information that is related to the original entity of the target data cannot be determined through contextual analysis in the data source text, each word identified in the data source text can be directly used as the data reference information corresponding to the target data. This application does not impose specific limitations.
[0078] In other preferred embodiments, contextual analysis of the target data is performed, including the use of a multi-strategy identification method, specifically including:
[0079] Field naming pattern recognition is used to analyze unit indicators in field names;
[0080] Metadata analysis is used to parse unit information in data descriptions;
[0081] Data value feature identification is used to infer possible unit types based on numerical distribution characteristics;
[0082] Contextual association analysis is used to assist in unit identification by leveraging relationships between fields;
[0083] The integrated decision-making unit is used to integrate multiple identification results to form a final judgment.
[0084] Step 102: Based on the data reference information, use the data unit prior knowledge graph, i.e., the measurement unit ontology, to determine the candidate unit list corresponding to the target data; the nodes in the data unit prior knowledge graph are unit ontologies, and the edges are the transformation relationships between unit ontologies.
[0085] The prior knowledge graph of data units is built on OWL and includes a hierarchical structure of unit classes, object attributes, transformation individual instances and semantic rules, supporting consistency verification and semantic path reasoning.
[0086] In a preferred embodiment, the prior knowledge graph for data units is constructed based on OWL, including:
[0087] Unit type hierarchy, used to define the classification system of physical quantity units;
[0088] Unit relation model, used to represent semantic associations between different units;
[0089] Transformation rules are used to formally describe methods for transforming units;
[0090] A semantic query interface is used to support complex unit information retrieval;
[0091] A set of inference rules to support semantic-based derivation of unit relations.
[0092] It should be noted that the data unit prior knowledge graph is a machine-readable and understandable unit knowledge model built using ontology. Ontology can define hierarchical, equivalence, and composite relationships between units, and defines basic units (such as meters, kilograms, seconds, amperes, etc., SI units) as root nodes. Other units can be traced back to these basic units through conversion factors and mathematical formulas.
[0093] In a feasible embodiment, multiple known unit ontology can be converted into unit feature vectors, which are composed of the seven base units of the International System of Units (SI), dimensional indices, and conversion factors. The unit feature vectors corresponding to the multiple known unit ontology are then used to construct a prior knowledge graph of data units according to the conversion relationships between the unit ontology.
[0094] The seven base dimensions of the International System of Units (SI) include: mass (M), length (L), time (T), electric current (I), temperature (θ), amount of substance (N), and luminous intensity (J).
[0095] Furthermore, the unit eigenvector can be expressed as follows:
[0096] ;
[0097] in, For unit eigenvectors, It is the basic unit of length measurement. It is the basic unit of mass dimension. The basic unit of time measurement. It is the basic unit of electric current. Temperature is the basic unit of measurement. It is the basic unit of measurement for the amount of substance. is the basic unit for measuring luminous intensity. Dimensional index for length. Dimensional index for mass. Dimensional index for time. Dimensional exponent is the unit of electric current. Dimensional exponent, which is a unit of measurement for temperature. Dimensional index is the unit of measurement of the amount of substance. Dimensional index is a unit of measurement for luminous intensity.
[0098] It should be noted that the dimensional exponent can be an integer or a rational number, representing the power of the unit in the corresponding fundamental dimension. Any unit body can consist of a single fundamental unit dimension or a combination of multiple fundamental unit dimensions; for example, the unit of force, the Newton (N), has N = ... kg·m / s² Then there is, α= 1 ,β= 1 γ= -2, other exponents are 0, at this time Let N be the unit eigenvector.
[0099] In some embodiments, U1 and U2 There is a reversible transformation relationship between them, where the transformation relationship is expressed by a transformation factor c, that is, the edge between two adjacent unit entities in the prior knowledge graph of data units is c.
[0100] In a feasible embodiment, based on data reference information, a candidate unit list corresponding to the target data is determined using a data unit prior knowledge graph. This includes: for at least one candidate unit in the data unit prior knowledge graph, determining the term frequency, inverse document frequency, length of the data reference information, and average length of the data source context of the candidate unit in the data reference information; calculating the relevance score between each candidate unit and the data reference information based on the term frequency, inverse document frequency, length of the data reference information, and average length of the data source context of the candidate unit; and sorting at least one candidate unit according to the first relevance score to obtain a candidate unit list.
[0101] For example, the first relevance score between the candidate unit and the reference data information can be calculated using the following formula:
[0102] ;
[0103] in, The first relevance score is given to the candidate unit and the reference data information. As a candidate unit, For data reference information, The word frequency of candidate units in the data reference information. The inverse document frequency of candidate units in the data reference information. This is the word frequency correction factor. This is a length correction factor. The text length of the data reference information. This represents the average length of the data source context.
[0104] Step 103: Obtain known units from the data source text, and calculate the confidence level of each candidate unit in the candidate unit list based on the known units and the prior knowledge graph of data units.
[0105] It should be noted that the known units in the data source text can be the units of other data. For example, if the target data in the data list is the third column, then the known units can be the units of the first and second columns, or the units of other columns, or the units recorded in the text data before or after the data list.
[0106] In one feasible embodiment, at least one transformation relationship related to a known unit is obtained from a priori map of data units. The transformation relationship includes direct transformation relationship and indirect transformation relationship. Based on the known unit and the transformation relationship, the inference unit corresponding to the known unit is determined. Based on the candidate unit and the inference unit, a second relevance score between the candidate unit and the known unit is determined. Based on the first relevance score between the candidate unit and the data reference information and the second relevance score between the candidate unit and the known unit, the confidence level of the candidate unit is determined.
[0107] It should be noted that the conversion relationship related to the known unit is an edge that is directly or indirectly connected to the known unit. For example, if the known unit is meters per second (m / s), the direct conversion relationship can be a conversion rule for the length unit meter (m) or a conversion rule for the time unit second (s). The indirect conversion relationship can be a conversion rule for other length units such as kilometers or millimeters, or a conversion rule for other time units such as minutes or hours. This application does not make any specific limitations.
[0108] It should be understood that in normal behavior, the acceptable omission of units is usually because the unit ontology of the data can be inferred from adjacent known units. Based on this, this application infers multiple inference units that have a conversion relationship with known units based on the conversion relationship in the prior graph of known units and data units. Then, by comparing the candidate units with the inference units, the second relevance score between the candidate units and the known units is determined.
[0109] In one specific embodiment, a second relevance score is determined between the candidate unit and the known unit based on the candidate unit and the inference unit, including: calculating the similarity between the candidate unit and the inference unit, and determining the second relevance score based on the distance between the inference unit corresponding to the maximum similarity and the known unit.
[0110] In other words, the similarity between candidate units and inference units is compared. A higher similarity score indicates a higher probability that the candidate unit is indeed an inference unit. Therefore, the distance between known units and inference units with high similarity to candidate units can be calculated as a second relevance score. The distance between a candidate unit and a known unit can be represented by the number of edges in the shortest path between them, i.e., the number of unit transformations required to convert a candidate unit to a known unit.
[0111] Furthermore, the weighted sum of the first and second relevance scores is used as the confidence level of the candidate unit.
[0112] It should be noted that, in this embodiment, the first relevance score is the relevance score between the candidate unit and the data reference information, which can characterize the association relationship between the candidate unit and the entire data source text context. The second relevance score is the distance between the candidate unit and known units, which can characterize the association relationship between the candidate unit and known units in the data source text. Therefore, by calculating the weighted sum of the first and second relevance scores, the credibility of the candidate unit, i.e., the confidence level, can be comprehensively considered.
[0113] It should be understood that the weights corresponding to the first relevance score and the second relevance score can be set according to actual needs. Preferably, the weight corresponding to the second relevance score is greater than or equal to the weight corresponding to the first relevance score.
[0114] Step 104: Determine the original unit ontology corresponding to the target data based on the confidence level of each candidate unit.
[0115] In other words, in this embodiment of the application, the candidate unit with the highest confidence level can be determined as the original unit ontology corresponding to the target data, so as to realize that the candidate unit with higher correlation with the data reference information and higher correlation with the known unit is used as the original unit ontology corresponding to the target data, thereby improving the reliability of determining the original unit ontology corresponding to the target data.
[0116] Step 105: Based on the prior knowledge graph of the data unit, the target data is transformed from the original unit ontology into the target unit ontology. The target unit ontology and the original unit ontology belong to the same unit dimension.
[0117] In other words, after determining the original unit ontology corresponding to the target data, in order to facilitate subsequent statistical analysis of the data, it is necessary to further convert the target data into the basic unit or standard unit of the dimension in which it is located, i.e., the target unit ontology.
[0118] In one feasible embodiment, converting the original unit ontology into the target unit ontology based on the data unit prior knowledge graph includes: obtaining at least one candidate path for converting the original unit ontology into the target unit ontology based on the data unit prior knowledge graph; calculating the conversion path cost corresponding to each candidate path; and converting the original unit ontology into the target unit ontology based on the candidate path with the lowest conversion path cost.
[0119] The calculation of the conversion path cost for each candidate path includes: obtaining the conversion factor corresponding to each edge in the candidate path based on the prior knowledge graph of the data unit; determining the conversion weight corresponding to the edge based on the conversion factor for each edge; and determining the conversion path cost based on the sum of all conversion weights in the candidate path.
[0120] It should be noted that, in the embodiments of this application, the transformation weight is used to characterize the loss or complexity of transformation between unit entities. Preferably, the candidate path with the lowest transformation path cost is the candidate path with the smallest sum of transformation weights.
[0121] For example, the conversion factor can be determined as the conversion weight using the following formula:
[0122] or
[0123] Where w is the conversion weight corresponding to the conversion of Ui to Uj, and c is the conversion factor corresponding to the conversion of Ui to Uj.
[0124] It should be understood that, through the above transformation relationship, the transformation path cost calculation can be converted into an additive cost, so that the transformation between Ui and Uj and the inverse transformation have the same positive weight. Moreover, by selecting the path with the smallest sum of transformation weights, that is, selecting the candidate path with a transformation weight close to 1, if the transformation weight is close to 1, the target data itself will not change much when using the transformation path, thereby further ensuring the data accuracy in the unit ontology transformation process.
[0125] Furthermore, based on the candidate path with the lowest conversion cost, the original unit ontology is converted into the target unit ontology, including: based on the prior knowledge graph of the data unit, obtaining the target conversion factor corresponding to each edge in the candidate path with the lowest conversion cost, determining the total conversion factor from the original unit ontology to the target unit ontology based on the target conversion factor, and converting the original unit ontology to the target unit ontology based on the total conversion factor.
[0126] Optionally, the target conversion factor can be the product of multiple target conversion factors among the candidate paths with the lowest conversion path cost.
[0127] For example, the total transformation factor from U1 to Un can be expressed as:
[0128] in, The total conversion factor, The conversion factor from U1 to U2, Let U2 be the transformation factor for U2 to Un. The conversion factor is used to transform Un-1 to Un.
[0129] Furthermore, the target data Value1 is transformed from the original unit ontology to the target unit ontology as follows:
[0130] Value=Value1*
[0131] Where Value represents the target data to be transformed into the target unit ontology, and Value1 represents the target data of the original unit ontology. This is the total conversion factor.
[0132] Therefore, the intelligent data unit conversion method proposed in this application identifies the target data to be converted from the data source text, and then uses the data reference information in the data source text, the data unit prior knowledge graph, and the known units in the data source text to calculate the confidence of multiple candidate units. Then, the candidate unit with the highest confidence is taken as the original unit ontology of the target data, and the target data is converted from the original unit ontology to the target unit ontology according to the data unit prior knowledge graph. This realizes the automated unit conversion of the target data. Especially when the target data lacks the original unit ontology, the method realizes a series of operations to determine the original unit ontology of the target data and the unit conversion through analysis, without manual intervention, which greatly improves the efficiency and accuracy of data analysis.
[0133] In other preferred embodiments, step 105 involves using a path discovery algorithm to calculate the conversion path cost corresponding to each candidate path.
[0134] The path discovery algorithm includes: cost estimation of conversion paths based on the complexity and accuracy loss of the conversion formula; support for decomposition of composite units and path construction; and provision of semantic consistency verification to ensure the physical quantity compatibility of the conversion paths.
[0135] Furthermore, the method also includes the following rule learning steps:
[0136] Collect user feedback on conversion results, including confirmations and corrections; analyze the characteristic patterns of successful and failed conversion cases; adjust the parameters and structure of conversion rules based on the analysis results; update the accumulated new knowledge into the prior knowledge graph of the data unit; and establish a domain-specific conversion knowledge base to improve the accuracy of subsequent conversions.
[0137] In other embodiments, the method further includes the following conversion monitoring steps:
[0138] An event-driven architecture is used to record the execution status of each transformation step;
[0139] By combining rule-based and statistical model-based detection mechanisms, potential conversion errors can be identified.
[0140] The conversion quality is evaluated based on multidimensional indicators, and a visual quality report is generated.
[0141] It should be noted that although the operation of the method of the present invention is described in a specific order in the accompanying drawings, this does not require or imply that the operations must be performed in that specific order, or that all of the operations shown must be performed in order to achieve the desired result.
[0142] Example 2 This example provides an intelligent data unit conversion system. For details not disclosed in the intelligent data unit conversion system of this example, please refer to the specific implementation of the intelligent data unit conversion method in Example 1.
[0143] Figure 2 A schematic diagram of the structure of an intelligent data unit conversion system provided in an embodiment of this application is shown.
[0144] like Figure 2 As shown, the intelligent conversion system 10 for this data unit includes:
[0145] The identification module 11 is used to identify the target data to be converted from the data source text, perform context analysis on the target data, and obtain the data reference information corresponding to the target data.
[0146] The determination module 12 is used to determine the candidate unit list corresponding to the target data based on the data reference information and using the data unit prior knowledge graph, i.e., the measurement unit ontology; the nodes in the data unit prior knowledge graph are unit ontology, and the edges are the transformation relationships between the unit ontology.
[0147] Calculation module 13 is used to obtain known units in the data source text, and calculate the confidence level of each candidate unit in the candidate unit list based on the known units and the prior knowledge graph of the data units;
[0148] Analysis module 14 is used to determine the original unit ontology corresponding to the target data based on the confidence level of each candidate unit;
[0149] The conversion module 15 is used to convert the target data from the original unit ontology into a target unit ontology based on the prior knowledge graph of the data unit, wherein the target unit ontology and the original unit ontology belong to the same unit dimension.
[0150] In some embodiments, the determining module 12 is further configured to:
[0151] Multiple known unit entities are converted into unit feature vectors, which are composed of the seven base dimensions of the International System of Units (SI), dimensional indices, and conversion factors.
[0152] The data unit prior knowledge graph is constructed by taking the unit feature vectors corresponding to multiple known unit ontologies and constructing them according to the transformation relationship between the unit ontologies.
[0153] In some embodiments, the determining module 12 is further configured to:
[0154] For at least one candidate unit in the prior knowledge graph of the data unit, determine the word frequency, inverse document frequency, length of the data reference information, and average length of the data source context of the candidate unit in the data reference information;
[0155] Based on the word frequency and inverse document frequency of the candidate unit in the data reference information, the length of the data reference information, and the average length of the data source context, calculate the relevance score between each candidate unit and the data reference information;
[0156] At least one of the candidate units is sorted according to the first relevance score to obtain the candidate unit list.
[0157] In some embodiments, the computing module 13 is further configured to:
[0158] Obtain at least one transformation relation related to the known unit from the prior map of the data units, the transformation relation including direct transformation relation and indirect transformation relation;
[0159] Based on the known units and the conversion relationship, determine the reasoning unit corresponding to the known units;
[0160] Based on the candidate unit and the inference unit, a second relevance score between the candidate unit and the known unit is determined;
[0161] The confidence level of the candidate unit is determined based on the first relevance score between the candidate unit and the data reference information and the second relevance score between the candidate unit and the known unit.
[0162] In some embodiments, the computing module 13 is further configured to:
[0163] Calculate the similarity between the candidate unit and the inference unit;
[0164] The second relevance score is determined based on the distance between the inference unit corresponding to the maximum similarity and the known unit.
[0165] In some embodiments, the computing module 13 is further configured to:
[0166] The weighted sum of the first relevance score and the second relevance score is used as the confidence level of the candidate unit.
[0167] In some embodiments, the conversion module 15 is further configured to:
[0168] Based on the prior knowledge graph of the data units, at least one candidate path is obtained from the original unit ontology to the target unit ontology;
[0169] Calculate the conversion path cost corresponding to each of the candidate paths;
[0170] Based on the candidate path with the lowest conversion cost, the original unit ontology is converted into the target unit ontology.
[0171] In some embodiments, the conversion module 15 is further configured to:
[0172] Based on the prior knowledge graph of the data unit, obtain the transformation factor corresponding to each edge in the candidate path;
[0173] For each edge, the transformation weight corresponding to that edge is determined based on the transformation factor.
[0174] The cost of the transformation path is determined based on the sum of all the transformation weights in the candidate path.
[0175] In some embodiments, the conversion module 15 is further configured to:
[0176] Based on the prior knowledge graph of the data unit, obtain the target conversion factor corresponding to each edge in the candidate path with the lowest conversion path cost;
[0177] Determine the total conversion factor from the original unit ontology to the target unit ontology based on the target conversion factor;
[0178] Based on the total conversion factor, the original unit ontology is converted to the target unit ontology.
[0179] In another preferred embodiment, the system specifically includes:
[0180] The unit identification module is used to automatically identify physical quantity unit information from field names, metadata descriptions, data value characteristics, or contextual associations in structured data using multi-strategy identification methods.
[0181] The measurement unit ontology, built on OWL (Web Ontology Language), is used to store the types, relationships, attributes and conversion rules of physical quantity units, and provides semantic query and reasoning capabilities;
[0182] The ontology reasoning engine is used for unit relation reasoning, transformation path discovery, and semantic consistency verification based on a unit ontology library.
[0183] A transformation rule generator is used to automatically generate unit transformation rules based on the reasoning results of the ontology reasoning engine.
[0184] The rule execution module is used to apply transformation rules to perform real-time unit conversion and formatting of structured data;
[0185] The rule learning module is used to analyze user feedback and conversion results through incremental learning methods, optimize unit identification rules and conversion rules, and update the unit ontology.
[0186] The conversion monitoring module is used to monitor the unit's conversion process, detect anomalies through a dual mechanism of rule-based and statistical models, and provide a conversion quality assessment report.
[0187] The ontology of units of measurement includes:
[0188] The hierarchical structure of unit types defines the classification system of physical quantity units, including basic units, derived units, and composite units;
[0189] The unit relationship model uses OWL attributes to represent the semantic associations and transformation relationships between units;
[0190] The conversion rules are formally described by conversion formulas, precision parameters, and conditional constraints to represent unit conversion methods.
[0191] The semantic query interface supports SPARQL query and inference services;
[0192] The dynamic update mechanism supports expanding the ontology content through automatic learning or manual management.
[0193] In specific implementation, the ontology reasoning engine includes:
[0194] The path discovery algorithm uses a graph search algorithm to automatically discover direct or indirect conversion paths between units;
[0195] The relational transitive reasoning unit infers implicit transformation relations based on unit relational attributes;
[0196] The transformation combination optimization unit is used to select the optimal path from multiple transformation paths and combine transformation formulas;
[0197] An uncertainty handling unit is used to manage confidence levels and missing knowledge during the reasoning process;
[0198] The semantic consistency verification unit is used to check the physical quantity compatibility and rule validity of the transformation path.
[0199] In the preferred implementation, the unit identification module employs a multi-strategy identification method, including:
[0200] The field naming pattern recognition unit analyzes unit indicators in field names using regular expressions and stemming techniques.
[0201] The metadata analysis unit extracts unit information from the metadata description using text analysis algorithms;
[0202] The data value feature identification unit infers the unit type through statistical analysis and clustering algorithms;
[0203] The context association analysis unit infers unit information by constructing an algorithm based on field relationship graphs.
[0204] The integrated decision-making unit uses a weighted voting mechanism to integrate the results of various strategies and outputs a confidence score.
[0205] Regarding the rule learning module, the module includes:
[0206] The user feedback collection unit is used to record in a structured manner the user's confirmation or correction information regarding the conversion results;
[0207] The pattern mining unit uses clustering and association rule mining algorithms to identify unit identification errors or new unit types.
[0208] The rule optimization unit is used to adjust the parameters and structure of transformation rules or generate new rules;
[0209] The ontology update unit is used to add the learning results to the metrology ontology and maintain consistency.
[0210] The cold start processing unit is used to provide initial rules based on similar units when knowledge is scarce.
[0211] Specifically, the conversion monitoring module includes:
[0212] The process monitoring unit uses an event-driven architecture to record the execution status of the transformation steps;
[0213] Anomaly detection unit identifies transition anomalies by combining rule-based checks and statistical model analysis.
[0214] The quality assessment unit quantifies quality conversion through indicators such as accuracy, coverage, consistency, and precision.
[0215] The report generation unit generates visual quality reports using a template engine and supports export in multiple formats.
[0216] Finally, the intelligent conversion method implemented through the system is as follows:
[0217] First, the units of physical quantities are automatically identified from the input structured data using a multi-strategy identification method;
[0218] Then, the ontology database of measurement units is queried, and the ontology reasoning engine is used to perform unit relationship reasoning and transformation path discovery;
[0219] Then, based on the reasoning results, unit conversion rules are automatically generated, and conversion formulas are optimized;
[0220] Next, the unit conversion calculation is performed using the conversion rules, and the results are formatted.
[0221] Then, monitor the conversion process, detect anomalies, and evaluate the conversion quality;
[0222] Finally, based on user feedback and conversion results, the rules are optimized and the ontology is updated through incremental learning.
[0223] The following further describes the structured data measurement unit ontology-driven conversion scheme of the preferred embodiment of this application.
[0224] Figure 3 A system architecture diagram according to an embodiment of this application is shown. Figure 3 As shown, the input is multi-source heterogeneous structured data (such as data tables in CSV, JSON, and XML formats).
[0225] Unit identification module: As the system entry point, it receives input data, analyzes field names, metadata, numerical features and context through multi-strategy identification technology (corresponding to the pseudocode in Implementation Example 1), and outputs data with identified or inferred unit information and confidence level.
[0226] Ontology reasoning engine and unit of measurement ontology library: these two modules constitute the "intelligent brain" of the system.
[0227] The unit of measurement ontology serves as the central knowledge base, providing a semantic foundation for reasoning.
[0228] The ontology reasoning engine receives the output from the recognition module, queries the ontology library, and performs core reasoning tasks such as unit type inference and conversion path discovery algorithms.
[0229] Transformation rule generator: Receives transformation paths discovered by the inference engine and automatically generates executable transformation rules, including combinations and optimizations of direct transformation formulas or multi-step transformation formulas.
[0230] Rule execution module: Receives generated rules and raw data, and acts like an efficient data processing factory. It applies the rules to perform actual numerical calculations and unit conversions, and outputs standardized data in a unified unit.
[0231] Rule learning module & conversion monitoring module: These two are the system's "optimization and protection loop".
[0232] The conversion monitoring module monitors the rule execution process throughout, records logs, detects anomalies, and evaluates conversion quality.
[0233] The rule learning module collects anomaly reports from the monitoring module and direct user feedback, optimizes the identification strategy and transformation rules through incremental learning algorithms, and updates the measurement unit ontology library to achieve the system's self-evolution.
[0234] Figure 4 A flowchart illustrating the process of physical quantity unit identification provided in one embodiment of this application is shown.
[0235] like Figure 4 As shown, input and preprocessing: The process begins by receiving structured data and performing necessary cleaning and standardization.
[0236] Multi-strategy parallel recognition: Four parallel recognition channels are activated:
[0237] Field name analysis: Matches unit keywords in field names using predefined regular expression patterns.
[0238] Metadata analysis: Extracting units from the descriptive information of a dataset using text analysis algorithms.
[0239] Numerical characteristic analysis: Inferring units by statistically analyzing the range, distribution, and magnitude of data values (e.g., a distribution of values around 293 may suggest that the unit is Kelvin).
[0240] Contextual analysis: Construct a field relationship graph and use the logical relationships between fields to infer units (for example, if a field is related to the "distance" and "time" fields, it is likely a speed unit).
[0241] Weighted voting and confidence calculation: Each identification strategy outputs one or more candidate units and their scores. The system combines these scores using a weighted formula to derive the final confidence score for each candidate unit.
[0242] Decision-making and output:
[0243] High confidence: If the confidence of a candidate unit is higher than the preset threshold (such as 0.7), it will be directly determined as the unit of that field.
[0244] Low Confidence / Manual Confirmation: If the confidence levels of all candidates are below the threshold, the system will record the uncertainty and trigger a manual confirmation process. The results of the manual confirmation will be sent as valuable feedback to the rule learning module.
[0245] Figure 5 A schematic diagram of the structure of a unit of measurement ontology provided in one embodiment of this application is shown.
[0246] like Figure 5 As shown, the core hierarchy (classes and subclasses) consists of: at the top level, physical quantities, which serve as abstractions for all units (such as length, mass, and velocity). Below these are specific unit classes, such as LengthUnit and TemperatureUnit, which form a clear classification tree through the rdfs:subClassOf relationship.
[0247] Instance layer (individuals): Each unit class contains specific unit instances, such as meter, celsius, and fahrenheit. Each instance defines its symbol (e.g., hasSymbol: "m") and whether it is a basic unit through attributes.
[0248] Relationship network (object attributes and data attributes):
[0249] Conversion relationship: Two unit instances are connected through properties such as hasConversionTo, and associated with a conversion entity. This conversion entity holds the specific conversion formula through its properties.
[0250] Composite units: Basic units are combined into derived units through attributes (such as hasNumerator, hasDenominator) (e.g., km_per_h is composed of kilometer and hour).
[0251] This structure not only stores facts but also supports reasoning. For example, because meter is a LengthUnit and kilometer is a LengthUnit, the inference engine can deduce that they belong to the same physical quantity and are convertible. Complex conversion paths (such as A->B->C) can be automatically discovered through property transitivity.
[0252] Figure 6 A schematic diagram illustrating the working principle of an ontology reasoning engine provided in an embodiment of this application is shown.
[0253] like Figure 6 As shown, this demonstrates how the inference engine utilizes the ontology library to solve the unit conversion problem.
[0254] Workflow Description:
[0255] Input and initialization: The engine receives a transformation request, such as "convert celsius to fahrenheit".
[0256] Query and Path Discovery: The engine searches on a unit relationship graph built from the ontology. It treats units as nodes and transformation relationships as edges. As shown in the pseudocode of Example 3, it uses a graph search algorithm, employing heuristics such as precision loss and cost, to find the optimal path from the source unit to the target unit.
[0257] Handling complex situations:
[0258] Compound unit decomposition: When encountering compound units (such as km / h), the engine will first decompose them into numerator (km) and denominator (h) units.
[0259] Find the paths separately: Find the corresponding parts of the conversion paths to the target composite unit for both the numerator and denominator units.
[0260] Path combination: Finally, the conversion paths of the numerator and denominator are combined to form a complete composite unit conversion scheme.
[0261] Output: The engine ultimately outputs one or more feasible transformation paths, such as celsius → kelvin → fahrenheit, and passes this path to the transformation rule generator.
[0262] Figure 7 A schematic diagram of the composition of a conversion rule generator provided in one embodiment of this application is shown.
[0263] like Figure 7 As shown, this reveals how the transformation rule generator transforms the "path" output by the inference engine into an executable "rule".
[0264] Input: Receive the transformation path from the ontology reasoning engine.
[0265] Rule Builder:
[0266] For single-step paths (such as celsius → fahrenheit), predefined transformation formulas are directly queried from the ontology and encapsulated.
[0267] For multi-step paths (such as A → B → C), the combineConversionFormulas function needs to be called to nest and combine the formulas of each step into the final formula and perform mathematical optimization.
[0268] Rule optimizer: Optimizes the generated rules, for example, by trying to find shorter paths to reduce accumulated error, or by merging constants and simplifying expressions in the combined formulas.
[0269] Rule validator: Performs rigorous testing on optimized rules, including: Formula validity check: Ensures formulas can be calculated correctly and do not produce NaN or infinity. Value range reasonableness check: Ensures that typical input values, after conversion, result within a reasonable physical range of the target unit.
[0270] Output: Generates a structured, machine-readable transformation rule object (usually in JSON format), containing key fields such as sourceUnit, targetUnit, conversionFormula, and precision, for use by the rule execution module.
[0271] Figure 8 The diagram illustrates an example of a data conversion process in a real-world application scenario provided by an embodiment of this application.
[0272] like Figure 8As shown, a specific industrial IoT case demonstrates the complete end-to-end working process of the system.
[0273] Multi-source data input: The system receives temperature data from three different data sources, with different field names and units: temp_c (Celsius), temperature_f (Fahrenheit), and sensor_temp (unit unknown, value approximately 293).
[0274] Unit identification:
[0275] temp_c and temperature_f are identified with high confidence based on their field names.
[0276] Because the field name "sensor_temp" was ambiguous, it was inferred to be "Kelvin" through numerical feature analysis, but the confidence level was low, triggering manual confirmation. After user confirmation, the system recorded this feedback for future learning.
[0277] Ontology reasoning and rule generation:
[0278] The system determines the target standard unit as "degrees Celsius".
[0279] The inference engine finds the transformation paths fahrenheit → celsius and kelvin → celsius from the ontology library.
[0280] The rule generator then generates two transformation rules based on this.
[0281] Rule execution and data output: The rule execution module applies rules to convert all temperature values into degrees Celsius and outputs a clean and consistent dataset.
[0282] Monitoring and learning (closed loop):
[0283] The monitoring module detected an abnormally low temperature (-50℃) after a certain conversion and marked it as abnormal.
[0284] After verification by the user, it was determined that the anomaly stemmed from a sensor malfunction, not a conversion error. This confirmation was then relayed to the system.
[0285] The rule learning module learned from this interaction, enhancing its knowledge that "field names in the 'sensor_temp' style may be related to Kelvin units," and may update the numerical feature recognition model, thereby improving the confidence level for recognizing similar fields in the future.
[0286] It should be understood that the modules or modules described in the intelligent conversion system 10 for data units are similar to those in the reference system. Figure 1The steps in the described method correspond accordingly. Therefore, the operations and features described above for the method are also applicable to the intelligent conversion system 10 for data units and the modules contained therein, and will not be repeated here. The intelligent conversion system 10 for data units can be pre-implemented in the browser or other secure applications of an electronic device, or it can be loaded into the browser or other secure applications of an electronic device through download or other means. The corresponding modules in the intelligent conversion system 10 for data units can cooperate with the modules in the electronic device to implement the solutions of the embodiments of this application.
[0287] The division of modules or units mentioned in the detailed description above is not mandatory. In fact, according to the embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0288] The following is for reference. Figure 9 , Figure 9 A schematic diagram of the structure of a computer system suitable for implementing the embodiments of this application is shown.
[0289] like Figure 9 As shown, the computer system 300 includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 302 or programs loaded from storage section 308 into random access memory (RAM) 303. The RAM 303 also stores various programs and data required for the system's operating instructions. The CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0290] The following components are connected to I / O interface 305: an input section 306 including a keyboard, mouse, etc.; an output section 307 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN card, modem, etc. The communication section 309 performs communication processing via a network such as the Internet. Drive 310 is also connected to I / O interface 305 as needed. Removable media 311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 310 as needed so that computer programs read from them can be installed into storage section 308 as needed.
[0291] Specifically, according to embodiments of this application, the flowchart above refers to... Figure 8The described process can be implemented as a computer software program. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program contains program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 309, and / or installed from removable medium 311. When the computer program is executed by central processing unit (CPU) 301, it performs the functions defined in the system of this application.
[0292] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0293] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operational instructions of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two connected blocks may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified functions or operational instructions, or using a combination of dedicated hardware and computer instructions.
[0294] In another aspect, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments, or may exist independently and not assembled into the electronic device. The aforementioned computer-readable storage medium stores one or more programs that, when used by one or more processors, execute the intelligent conversion method for data units described in this application.
[0295] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the foregoing disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A method for intelligent conversion of data units, characterized in that, include: Identify the target data to be converted from the data source text, perform context analysis on the target data, and obtain the data reference information corresponding to the target data; Based on the data reference information, a candidate unit list corresponding to the target data is determined using a prior knowledge graph of data units. The nodes in the prior knowledge graph of the data units are unit entities, and the edges are the transformation relationships between the unit entities. The data unit prior knowledge graph is built on OWL and includes a unit class hierarchy, object attributes, transformation individual instances and semantic rules, supporting consistency verification and semantic path reasoning. Based on the prior knowledge graph of the data unit, the target data is transformed from the original unit ontology corresponding to the target data into the target unit ontology, and the target unit ontology and the original unit ontology belong to the same unit dimension; Multiple known unit ontology are converted into unit feature vectors, which are composed of the seven base units of the International System of Units (SI), dimensional indices, and conversion factors. The unit feature vectors corresponding to the multiple known unit ontology are then used to construct the data unit prior knowledge graph according to the conversion relationships between the unit ontology. A unit eigenvector can be expressed as follows: in, For unit eigenvectors, It is the basic unit of length measurement. It is the basic unit of mass measurement. The basic unit of time measurement. It is the basic unit of electric current. Temperature is the basic unit of measurement. The basic unit of measurement for the amount of substance. It is the basic unit for measuring luminous intensity. Dimensional index for length. Dimensional index for mass. Dimensional index for time. Dimensional exponent is the unit of electric current. Dimensional exponent, which is a unit of measurement for temperature. Dimensional index is the unit of measurement of the amount of substance. Dimensional index, which measures luminous intensity; The step of converting the target data from the original unit ontology to the target unit ontology based on the data unit prior knowledge graph includes: obtaining at least one candidate path from the original unit ontology to the target unit ontology based on the data unit prior knowledge graph; calculating the conversion path cost corresponding to each candidate path; and converting the original unit ontology to the target unit ontology based on the candidate path with the lowest conversion path cost. The calculation of the conversion path cost corresponding to each candidate path includes: obtaining the conversion factor corresponding to each edge in the candidate path based on the prior knowledge graph of the data unit; determining the conversion weight corresponding to the edge based on the conversion factor for each edge; and determining the conversion path cost based on the sum of all the conversion weights in the candidate path. The conversion factor is determined as the conversion weight using the following formula: or Where w is the conversion weight corresponding to the conversion of Ui to Uj, and c is the conversion factor corresponding to the conversion of Ui to Uj; The total transformation factor from U1 to Un can be expressed as: in, The total conversion factor, The conversion factor from U1 to U2. Let U2 be the transformation factor for U2 to Un. The transformation factor from Un-1 to Un; Furthermore, a path discovery algorithm is used to calculate the conversion path cost corresponding to each candidate path. The path discovery algorithm includes: estimating the conversion path cost based on the complexity and accuracy loss of the conversion formula; supporting the decomposition of composite units and path construction; and providing semantic consistency verification to ensure the physical quantity compatibility of the conversion path.
2. The intelligent data unit conversion method according to claim 1, characterized in that, The contextual analysis of the target data includes automatically identifying physical quantity units from the input structured data using a multi-strategy recognition method, specifically including: Field naming pattern recognition is used to analyze unit indicators in field names; Metadata analysis is used to parse unit information in data descriptions; Data value feature identification is used to infer possible unit types based on numerical distribution characteristics; Contextual association analysis is used to assist in unit identification by leveraging relationships between fields; The integrated decision-making unit is used to integrate multiple identification results to form a final judgment.
3. The intelligent data unit conversion method according to claim 1, characterized in that, The step of determining the candidate unit list corresponding to the target data based on the data reference information and using a prior knowledge graph of data units includes: For at least one candidate unit in the prior knowledge graph of the data unit, determine the word frequency, inverse document frequency, length of the data reference information, and average length of the data source context of the candidate unit in the data reference information; Based on the word frequency and inverse document frequency of the candidate unit in the data reference information, the length of the data reference information, and the average length of the data source context, calculate the relevance score between each candidate unit and the data reference information; At least one of the candidate units is sorted according to the first relevance score to obtain the candidate unit list.
4. The intelligent data unit conversion method according to claim 1, characterized in that, Also includes: Obtain known units from the data source text, and calculate the confidence score of each candidate unit in the candidate unit list based on the known units and the prior knowledge graph of the data units. Specifically, this includes: Obtain at least one transformation relation related to the known unit from the prior map of the data units, the transformation relation including direct transformation relation and indirect transformation relation; Based on the known units and the conversion relationship, determine the reasoning unit corresponding to the known units; Based on the candidate unit and the inference unit, a second relevance score between the candidate unit and the known unit is determined; The confidence level of the candidate unit is determined based on the first relevance score between the candidate unit and the data reference information and the second relevance score between the candidate unit and the known unit.
5. The intelligent data unit conversion method according to claim 4, characterized in that, The step of determining a second relevance score between the candidate unit and the known unit based on the candidate unit and the inference unit includes: Calculate the similarity between the candidate unit and the inference unit; The second relevance score is determined based on the distance between the inference unit corresponding to the maximum similarity and the known unit.
6. The intelligent data unit conversion method according to claim 4, characterized in that, The step of determining the confidence level of the candidate unit based on the first relevance score between the candidate unit and the data reference information and the second relevance score between the candidate unit and the known unit includes: The weighted sum of the first relevance score and the second relevance score is used as the confidence level of the candidate unit.
7. An intelligent conversion system for data units, characterized in that, include: The identification module is used to identify the target data to be converted from the data source text, perform context analysis on the target data, and obtain the data reference information corresponding to the target data. The determination module is used to determine the candidate unit list corresponding to the target data based on the data reference information and by using a prior knowledge graph of data units; The nodes in the prior knowledge graph of the data units are unit entities, and the edges are the transformation relationships between the unit entities. The data unit prior knowledge graph is built based on OWL and includes a hierarchical structure of unit classes, object attributes, transformation individual instances and semantic rules, supporting consistency verification and semantic path reasoning; The conversion module is used to convert the target data from the original unit ontology corresponding to the target data into a target unit ontology based on the prior knowledge graph of the data unit, wherein the target unit ontology and the original unit ontology belong to the same unit dimension; A unit eigenvector can be expressed as follows: in, For unit eigenvectors, It is the basic unit of length measurement. It is the basic unit of mass measurement. The basic unit of time measurement. It is the basic unit of electric current. Temperature is the basic unit of measurement. The basic unit of measurement for the amount of substance. It is the basic unit for measuring luminous intensity. Dimensional index for length. Dimensional index for mass. Dimensional index for time. Dimensional exponent is the unit of electric current. Dimensional exponent, which is a unit of measurement for temperature. Dimensional index is the unit of measurement of the amount of substance. Dimensional index, which measures luminous intensity; The step of converting the target data from the original unit ontology to the target unit ontology based on the data unit prior knowledge graph includes: obtaining at least one candidate path from the original unit ontology to the target unit ontology based on the data unit prior knowledge graph; calculating the conversion path cost corresponding to each candidate path; and converting the original unit ontology to the target unit ontology based on the candidate path with the lowest conversion path cost. The calculation of the conversion path cost corresponding to each candidate path includes: obtaining the conversion factor corresponding to each edge in the candidate path based on the prior knowledge graph of the data unit; determining the conversion weight corresponding to the edge based on the conversion factor for each edge; and determining the conversion path cost based on the sum of all the conversion weights in the candidate path. The conversion factor is determined as the conversion weight using the following formula: or Where w is the conversion weight corresponding to the conversion of Ui to Uj, and c is the conversion factor corresponding to the conversion of Ui to Uj; The total transformation factor from U1 to Un can be expressed as: in, The total conversion factor, The conversion factor from U1 to U2. Let U2 be the transformation factor for U2 to Un. The transformation factor from Un-1 to Un; Furthermore, a path discovery algorithm is used to calculate the conversion path cost corresponding to each candidate path. The path discovery algorithm includes: estimating the conversion path cost based on the complexity and accuracy loss of the conversion formula; supporting the decomposition of composite units and path construction; and providing semantic consistency verification to ensure the physical quantity compatibility of the conversion path.
Citation Information
Patent Citations
Construction method of letter intelligent question-answering system based on adaptive mapping knowledge domain enhanced LLM
CN120910216A