Data conversion method, device, electronic device and storage medium
By generating target identification and selecting data conversion rules, data conversion is performed on the reported data set, which solves the problem of low data conversion efficiency in the prior art and realizes a more efficient data conversion process.
Patent Information
- Application Number
- CN202111558658.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2041-12-20
AI Technical Summary
When performing data conversion, the prior art needs to convert and encode data in each field in the reported data set separately, resulting in cumbersome and time-consuming encoding operations, which reduces the efficiency of data conversion.
By receiving the data set to be reported and the data conversion request of the target terminal, the target identification of the data set to be reported is generated, and combined with the correspondence between the identification and the data conversion rules, the target data conversion rules are selected, and the data conversion rules are converted to the data set to be reported to obtain the target standard data set.
This avoids the technical defects in traditional methods that require data conversion and encoding for each field separately, and improves the efficiency of data conversion.
Smart Images

Figure CN114328681B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data conversion method, device, electronic device and storage medium. Background Art
[0002] In recent years, with the rapid development of Internet technology, more and more data are transmitted or stored through the Internet. In this context, with the growth of data volume on the Internet, various data management services have emerged; further, data conversion services based on data formats have also gradually increased.
[0003] For example, in daily life, in order to obtain data information in the same data format, it is necessary to treat the data in various data formats in the reported data set, perform data conversion encoding, and complete the mapping conversion of the data format to meet the data format requirements of the standard data set.
[0004] Specifically, in actual scenarios, based on the data format of the standard data set, each field in the reported data set is treated separately and data conversion encoding is performed to obtain the physical position and physical value of the corresponding field in the data set to be reported, thereby realizing data mapping and conversion operations between the data set to be reported and the standard data set, and completing the data format conversion.
[0005] However, the data conversion using the above method requires that each field in the reported data set be treated separately and data conversion encoding be performed, which is cumbersome due to the encoding operation and takes a lot of time when the data volume is large. Therefore, the above method will reduce the efficiency of data conversion. Summary of the invention
[0006] The present application provides a data conversion method, device, electronic device and storage medium to improve the efficiency of data conversion.
[0007] In a first aspect, an embodiment of the present application provides a data conversion method, the method comprising:
[0008] Receive the data set to be reported and the data conversion request of the target terminal, and obtain the target data conversion information of the data set to be reported from the data conversion request; wherein the target data conversion information at least includes: the data source information and the set name of the data set to be reported, and the data source information and the set name of the corresponding standard data set.
[0009] Based on the target data conversion information, a target identifier of the data set to be reported is generated.
[0010] Based on the target identifier and the corresponding relationship between the identifier and the data conversion rule, the target data conversion rule is selected.
[0011] Based on the target data conversion rules, the reported data set is converted to obtain the target standard data set.
[0012] In a second aspect, an embodiment of the present application further provides a data conversion device, the device comprising:
[0013] The acquisition module is used to receive the data set to be reported and the data conversion request of the target terminal, and obtain the target data conversion information of the data set to be reported from the data conversion request; wherein the target data conversion information at least includes: the data source information and the set name of the data set to be reported, and the data source information and the set name of the corresponding standard data set.
[0014] The generation module is used to generate a target identifier of the data set to be reported based on the target data conversion information.
[0015] The selection module is used to select the target data conversion rule based on the target identifier and the corresponding relationship between the identifier and the data conversion rule.
[0016] The conversion module is used to perform data conversion on the reported data set based on the target data conversion rules to obtain the target standard data set.
[0017] In an optional embodiment, before receiving the data set to be reported and the data conversion request from the target terminal, the generating module is further configured to:
[0018] Obtain the mapping relationship between each historical reporting data set and each standard data set.
[0019] At least one correction method corresponding to each of the obtained mapping relationships is determined respectively.
[0020] Based on each mapping relationship and its corresponding at least one correction method, corresponding candidate data conversion rules are generated respectively.
[0021] In an optional embodiment, when obtaining the mapping relationship between each historical reporting data set and each standard data set, the generating module is specifically used to:
[0022] Get the data name corresponding to each historical data resource in each historical reporting data set, and the data name corresponding to each standard data resource in each standard data set.
[0023] For each data name corresponding to each historical data resource obtained, perform the following operations respectively:
[0024] Semantic similarities between data names corresponding to each standard data resource and a data name of a historical data resource are determined respectively.
[0025] When it is determined that each of the obtained semantic similarities is greater than the set similarity threshold, a mapping relationship between a historically reported data set and a corresponding standard data set is established.
[0026] In an optional embodiment, when it is determined that each of the obtained semantic similarities is greater than a set similarity threshold, after respectively establishing a mapping relationship between a historical reported data set and a corresponding standard data set, the selection module is further used to:
[0027] Obtain a historical reporting data set and the corresponding standard data set, and the number of nodes in the storage path where each of them is located.
[0028] When it is determined that the number of nodes of a storage path where a historical reported data set is located is equal to the number of nodes of a storage path where a corresponding standard data set is located, a mapping relationship between a historical reported data set and a corresponding standard data set is retained.
[0029] When it is determined that the number of nodes of a storage path where a historical reported data set is located is not equal to the number of nodes of a storage path where a corresponding standard data set is located, a mapping relationship between a historical reported data set and the corresponding standard data set is deleted.
[0030] In an optional embodiment, when respectively determining at least one correction method corresponding to each of the obtained mapping relationships, the selection module is specifically used to:
[0031] Get the mapping type corresponding to each mapping relationship.
[0032] Based on the obtained mapping types and the corresponding relationships between the mapping types and the correction types, the correction types corresponding to the corresponding mapping relationships are determined respectively.
[0033] Based on each correction type obtained, at least one correction method corresponding to the corresponding mapping relationship is determined respectively.
[0034] In an optional embodiment, after generating corresponding candidate data conversion rules based on each mapping relationship and at least one correction method corresponding to each mapping relationship, the acquisition module is further used to:
[0035] For each historical reporting data set, perform the following operations:
[0036] Get a historical reporting dataset and its candidate data transformation rules.
[0037] Based on the candidate data conversion rules, a historical reported data set is converted to obtain the corresponding standard data set.
[0038] When it is determined that the corresponding standard data set is consistent with the expected data transformation result of a historical reported data set, the candidate data transformation rules are stored in the database.
[0039] In an optional embodiment, before receiving the data set to be reported and the data conversion request from the target terminal, the acquisition module is further used to:
[0040] Obtain the historical data source information corresponding to each historical reporting data set.
[0041] Based on the obtained information of each historical data source, the identifiers of the corresponding historical reporting data sets are generated respectively.
[0042] In a third aspect, an electronic device is provided, comprising: a processor and a memory; the memory stores computer instructions; and the processor is used to read the computer instructions and execute the data conversion method as described in the first aspect.
[0043] According to a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the data conversion method as described in the first aspect.
[0044] According to a fifth aspect, a computer program product is provided. When the computer program product is called by a computer, the computer executes the data conversion method as described in the first aspect.
[0045] In the embodiment of the present application, based on the target data conversion information of the target terminal's data set to be reported, a corresponding target identifier is generated, and then the target data conversion rule is selected in combination with the correspondence between the identifier and the data conversion rule, so as to perform data conversion on the data set to be reported, and then obtain the corresponding target standard data set. In this way, based on the correspondence between the identifier and the data conversion rule, the target standard data set is obtained, avoiding the technical defect of the traditional method that each field in the reported data set needs to be treated separately and data conversion encoding is performed. Therefore, the data conversion method of the present application improves the efficiency of data conversion. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A data conversion system applicable to the embodiments of the present application is exemplified;
[0047] Figure 2 A schematic flow chart of a method for generating candidate data conversion rules provided in an embodiment of the present application is exemplified;
[0048] Figure 3 A schematic flow chart of a method for obtaining a mapping relationship between each historical reported data set and each standard data set provided in an embodiment of the present application is exemplified;
[0049] Figure 4A logical schematic diagram for obtaining a data name provided by an embodiment of the present application is exemplified;
[0050] Figure 5 The present application embodiment provides a method based on Figure 3 A logical diagram of obtaining mapping relationships;
[0051] Figure 6 The present application embodiment provides a method based on Figure 5 Whether to keep the logical diagram of the mapping relationship;
[0052] Figure 7 A schematic diagram of a method flow for determining at least one correction method corresponding to each mapping relationship provided in an embodiment of the present application is exemplified;
[0053] Figure 8 A logic diagram of a data conversion rule for generating a corresponding historical reporting data set provided by an embodiment of the present application is exemplified;
[0054] Fig. 9 A schematic flow chart of a method for obtaining identifiers corresponding to each historical reporting data set provided in an embodiment of the present application is exemplified;
[0055] Fig.10 A flowchart of a data conversion method for a data set to be reported provided by an embodiment of the present application is exemplified;
[0056] Fig.11 The following is a schematic diagram of the structure of a data conversion device provided by an embodiment of the present application;
[0057] Fig.12 The schematic diagram of the structure of an electronic device provided in an embodiment of the present application is exemplified. DETAILED DESCRIPTION
[0058] In order to improve the efficiency of data conversion, in an embodiment of the present application, based on the target identifier of the data set to be reported and the correspondence between the preset identifier and the data conversion rule, the target data conversion rule is determined to complete the data conversion of the data set to be reported, and then obtain the target standard data set.
[0059] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The specific operating methods in the method embodiments can also be applied to device embodiments or system embodiments. It should be noted that in the description of the present application, "multiple" is understood as "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A is connected to B, which can represent: A is directly connected to B and A is connected to B through C. In addition, in the description of the present application, words such as "first" and "second" are only used to distinguish the purpose of description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
[0060] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are first explained below.
[0061] (1) Standard data set: refers to a data set composed of standard data in the industry data standard definition specification formulated by the superior unit, which contains the general data structure and content field requirements (at least the value type and default value).
[0062] (2) Dataset to be reported: refers to the collection of data (including value types) collected by subordinate units from the data source system through channels such as Kafka, API, and Syslog. It is the original data set converted into a standard data set.
[0063] (3) Data conversion: refers to the process of merging, cleaning and integrating data, changing it from one form of representation to another through data conversion, and achieving semantic consistency among different source data.
[0064] For example, common data conversion includes: data type conversion, data semantic conversion, data value range conversion, data granularity conversion, table / data splitting, row-column conversion, data discretization, extracting new fields, attribute construction, data compression, etc. It should be noted that in this article, data conversion refers to the process of converting the data set to be reported into a standard data set.
[0065] (4) Data mapping: Given two data models, a correspondence between data elements is established between the models. This process is called data mapping. Data mapping is the first step in the data integration task. In this article, the data integration task specifically refers to data conversion.
[0066] Exemplarily, there are two ways of data mapping: hand-coded and graphical manual. Hand-coded refers to defining the data correspondence using programming languages such as Java, Python, and C++; graphical manual allows users to draw a line between data items to define the correspondence between data items. It should be noted that in this article, data mapping refers to establishing a relationship between data in a standard data set and data in a data set to be reported.
[0067] (5) Rule model: A model constructed by analyzing the given data to extract some useful data or combining the data to achieve the final data analysis goal is a rule model. In this article, rules refer to the extraction and combination of strong features (features that are highly relevant to the target), while rule models are different from high-end machine learning models. They use some simple data processing methods to reflect the characteristics of the target data and ultimately meet the requirements of the business scenario.
[0068] (6) JavaScript Object Notation (JSON): It is a lightweight data exchange format. It is based on a subset of ECMAScript (the JS specification developed by the European Computer Association) and uses a text format that is completely independent of the programming language to store and represent data.
[0069] Exemplarily, JSON consists of keys and values, and values can be strings, numbers, objects, arrays, true, false, or null.
[0070] (7) Universally Unique Identifier (UUID): It is a 128-bit identifier used to identify information in a computer system and is unique.
[0071] (8) WordNet: It is an English dictionary that is different from the usual dictionary because it contains semantic information. It groups entries according to their meanings. Each group of entries with the same meaning is called a Synset. It also provides a brief definition for each Synset and records the semantic relationships between different Synsets.
[0072] (9) Sematch: An integrated framework for the development, evaluation, and application of semantic similarity in knowledge graphs (KGs). It is easy to calculate the semantic similarity scores of concepts, words, and entities. In this paper, Sematch is used to calculate the semantic similarity of words and normalize the results to between 0 and 1.
[0073] (10) JsonPath: JsonPath is an information extraction library that is used to parse multi-layer nested JSON data and extract specified information from JSON documents.
[0074] It should be noted that the above-mentioned naming method of technical terms is only an example, and the embodiments of the present application do not limit the naming method of the above-mentioned technical terms.
[0075] Figure 1 A data conversion system applicable to the embodiment of the present application is exemplified. Figure 1 As shown, the data conversion system includes: a data mapping module 101, a data correction module 102, a data verification module 103 and a data conversion execution module 104. The data mapping module 101 sends the mapping relationship corresponding to the data set to be reported to the data correction module 102; the data correction module 102 sends the correction method corresponding to the mapping relationship of the data to be reported to the data verification module 103; the data verification module 103 sends the data conversion rule that meets the expected result of the data conversion of the data set to be reported to the data conversion execution module 104. Among them, the data conversion rule includes the mapping relationship and the correction method corresponding to the data set to be reported.
[0076] The functions of each component module in the above data conversion system are first briefly described below.
[0077] The data mapping module 101 is used to generate data mapping rules automatically and manually by using the data characteristics of the data set to be reported and the standard data set. For the convenience of description, the data mapping rules are also referred to as mapping relationships in this document.
[0078] The data correction module 102 is used to correct each mapping data in the mapping result by using a corresponding correction rule to generate a data correction rule. For the convenience of description, the data mapping rule is also referred to as a correction method in this document.
[0079] The data verification module 103 is used to verify the conversion result at the terminal. If the verification is passed, the data conversion rule is proved to be valid and the data conversion rule is saved; if the verification fails, an exception is returned and the data conversion rule is generated again.
[0080] The data conversion execution module 104 is used to call corresponding rules based on the rule model to convert the data set to be reported into a standard data set.
[0081] Further, based on the above system architecture, obtain each candidate data conversion rule, see Figure 2 As shown, in the embodiment of the present application, the generation process of each candidate data conversion rule has the following specific steps:
[0082] S201: Obtaining a mapping relationship between each historical reported data set and each standard data set.
[0083] In a possible implementation, when executing step S201, the server converts each historical reporting data set and each standard data set into data in JSON format, and then respectively establishes a mapping relationship between each historical reporting data set and each standard data set, see Figure 3 As shown, the specific steps are as follows:
[0084] S2011: Obtain the data name corresponding to each historical data resource in each historical reporting data set, and the data name corresponding to each standard data resource in each standard data set.
[0085] Specifically, when executing step S2011, the server may extract the data names corresponding to the respective historical data resources from the original database based on the feature extraction algorithm of the data names.
[0086] For example, see Figure 4 As shown, the server extracts features from each historical data resource in each historical reporting data set in the original database, and each standard data resource in each standard data set; then, it performs feature matching of data names on all extracted features; and finally, it selects the data name corresponding to each data resource. The data name can be a key in the data set.
[0087] Exemplarily, the original database contains multiple data resources. For ease of understanding, in the embodiment of the present application, two data sets, namely, one historical reported data set and one standard data set are taken as examples. The server uses a feature extraction algorithm of data names to detect the above historical reported data set and the standard data set respectively, and obtains the data names corresponding to each data resource in each data set. Each reported data set includes at least one data resource. Taking the example that each reported data set includes three data resources, the data names corresponding to each data resource are shown in Table 1:
[0088] Table 1
[0089] Data resources Data Resources 1.L Data Resources 2.B Data Resources 3.L Data Resources 4.B Data Resources 5.L Data Resources 6.B Data name Alex.Sat Brshu.Ver Alex.Oxy Brshu.Num Alex.Wei Brshu.Zai
[0090] As can be seen from the above table, the server can perform feature extraction on each data resource according to the feature extraction algorithm of the data name to obtain the corresponding data name. Taking data resource 1.L as an example, data resource 1.L is a historical data resource of the historical reporting data set. The server performs feature extraction on data resource 1.L according to the feature extraction algorithm of the data name, and extracts the data name Alex.Sat of data resource 1.L; taking data resource 2.B as an example, data resource 2.B is a standard data resource of the standard data set. The server performs feature extraction on data resource 2.B according to the feature extraction algorithm of the data name, and extracts the data name Brshu.Ver of data resource 2.B.
[0091] S2012: After obtaining the data names corresponding to the respective historical data resources, respectively determine the semantic similarity between the data names corresponding to the respective standard data resources and the data name of a historical data resource.
[0092] Specifically, when executing step S2012, after the server obtains the data names corresponding to each historical data resource and each standard data set, it uses regular expressions to separate each data name and obtain the semantic feature values of the corresponding data names, where the semantic feature values are used to characterize the types of data resources.
[0093] Exemplarily, still taking the above six data resources as an example, the server obtains the semantic feature value of the corresponding data name according to the data name corresponding to each data resource in combination with the set semantic feature value calculation method. For example, still taking data resource 1.L as an example, the server obtains the semantic feature value of Alex.Sat as semantic feature value 1.L according to the data name Alex.Sat of data resource 1.L in combination with the set semantic feature value calculation method; taking data resource 2.B as an example, the server obtains the semantic feature value of Brshu.Ver as semantic feature value 2.B according to the data name Brshu.Ver of data resource 2.B in combination with the set semantic feature value calculation method, and so on.
[0094] Furthermore, after obtaining the semantic feature values of the data names corresponding to each historical reported data set and the semantic feature values of the data names corresponding to each standard data resource based on the above steps, a semantic similarity comparison is performed based on the obtained semantic similarities to determine the semantic similarities between the data names corresponding to each standard data resource and the data name of a historical data resource in turn.
[0095] For example, still taking the data resource 1.L of the historical data set and the data resource 2.B, resource data 4.B and resource data 6.B of the standard data set in Table 1 as an example, the semantic similarity between the data name of data resource 1.L and the corresponding data names of data resource 2.B, resource data 4.B and resource data 6.B is shown in Table 2:
[0096] Table 2
[0097]
[0098]
[0099] As can be seen from the above table, the server can determine the semantic similarity between the data name corresponding to each standard data resource and the data name of a historical data resource based on the data name and its semantic feature value of each standard data resource of the standard data set, and the data name and its semantic feature value of a historical data resource of the historical standard data set. For example, taking the data name Brshu.Ver as an example, the server compares the semantic similarity based on the semantic feature value 1.L of the data name Alex.Sat of the data resource 1.L and the semantic feature value 2.B of the data name Brshu.Ver of the data resource 2.B, so it can be obtained that the semantic similarity between the data name Alex.Sat and the data name Brshu.Ver is 72%.
[0100] Optionally, in an embodiment of the present application, the server may select the Sematch framework based on the structural knowledge (depth, path length) and statistical information content (corpus) in the machine learning field classification method, and calculate the similarity score of the data name according to the similarity of the WordNet concept, wherein the higher the similarity score, the higher the similarity between the two data names, and the value range of the similarity score is [0, 100].
[0101] S2013: After respectively determining the semantic similarities between the data names corresponding to each standard data resource and the data name of a historical data resource, when it is determined that each obtained semantic similarity is greater than a set similarity threshold, a mapping relationship between a historical reported data set and a corresponding standard data set is established.
[0102] For details, see Figure 5 As shown, when executing step S2013, the server can determine whether to establish a corresponding relationship between the corresponding standard data resource and the historical data resource based on the semantic similarity between the data name corresponding to each standard data resource and the data name of a historical data resource, combined with the corresponding relationship between each semantic similarity and a preset similarity threshold, thereby establishing a mapping relationship between the historical reported data set and the corresponding standard data set.
[0103] Optionally, if the semantic similarity is greater than a set semantic similarity threshold, a mapping relationship between the historically reported data set and the corresponding standard data set is established; if the semantic similarity is less than or equal to the set semantic similarity threshold, a mapping relationship between the historically reported data set and the corresponding standard data set is not established.
[0104] Exemplarily, as shown in Table 2, assuming that the similarity threshold of the historical reported data set is 85%, it can be seen that the semantic similarity between the data name Alex.Sat and the data name Brshu.Ver is 72%, which is less than the similarity threshold of 85%, so a mapping relationship cannot be established between the data name Alex.Sat and the data name Brshu.Ver; the semantic similarity between the data name Alex.Sat and the data name Brshu.Num is 49%, which is less than the similarity threshold of 85%, so a mapping relationship cannot be established between the data name Alex.Sat and the data name Brshu.Zai; the semantic similarity between the data name Alex.Sat and the data name Brshu.Zai is 91%, which is greater than the similarity threshold of 85%, so a mapping relationship can be established between the data name Alex.Sat and the data name Brshu.Zai; it can be further seen that a mapping relationship between the data name Alex.Sat and the data name Brshu.Zai can be established between the historical reported data set and the standard data set.
[0105] Furthermore, if a historical reporting data set has multiple historical data resources, a mapping relationship between a historical reporting data set and a corresponding standard data set can only be established when the semantic similarity between the data names corresponding to the various historical data resources of the historical reporting data set and the data names corresponding to the standard data resources corresponding to the corresponding standard data set are both greater than the corresponding similarity threshold.
[0106] Optionally, in an embodiment of the present application, the semantic similarity threshold is calculated in advance by manually selecting multiple groups of words with the same meaning as input, and the results calculated by Sematch are added together to obtain an average value as the semantic similarity threshold.
[0107] In a preferred possible implementation, based on the above method steps, after establishing the mapping relationship between each historical reporting data set and each standard data set, refer to Figure 6 As shown, the server determines whether the mapping relationship needs to be deleted according to the number of nodes in the storage paths where the historically reported data set and the corresponding standard data set are located in each mapping relationship.
[0108] Specifically, the server obtains a historical reporting data set and a corresponding standard data set corresponding to a mapping relationship, and then determines the number of nodes of the storage paths where the historical reporting data set and the corresponding standard data set are located. If the number of nodes of the storage path where the historical reporting data set is located is equal to the number of nodes of the storage path where the corresponding standard data set is located, the mapping relationship between the historical reporting data set and the corresponding standard data set is retained; if the number of nodes of the storage path where the historical reporting data set is located is not equal to the number of nodes of the storage path where the corresponding standard data set is located, the mapping relationship between the historical reporting data set and the corresponding standard data set is deleted.
[0109] For example, in a mapping relationship between a historical reported data set and a standard data set, if the number of nodes of the storage path where the historical reported data set is located is 5, and the number of nodes of the storage path where the corresponding standard data set is located is 4, it can be seen that the number of nodes of the storage path where the historical reported data set is located is not equal to the number of nodes of the storage path where the corresponding standard data set is located, and the mapping relationship is deleted; if the number of nodes of the storage path where the historical reported data set is located is 5, and the number of nodes of the storage path where the corresponding standard data set is located is 5, it can be seen that the number of nodes of the storage path where the historical reported data set is located is equal to the number of nodes of the storage path where the corresponding standard data set is located, and the mapping relationship is retained.
[0110] It should be noted that the above-mentioned historical reporting data set may establish a mapping relationship with one standard data set, or may establish a mapping relationship with multiple standard data sets.
[0111] S202: After acquiring each mapping relationship, respectively determine at least one correction method corresponding to each acquired mapping relationship.
[0112] In a possible implementation, when executing step S202, the server obtains the correction type of the corresponding mapping relationship based on the mapping type of the mapping relationship and the corresponding relationship between the mapping type and the correction type, and corrects the corresponding mapping relationship based on at least one correction method corresponding to the correction type, see Figure 7 As shown, at least one correction method corresponding to each of the obtained mapping relationships is determined, and the specific steps are as follows:
[0113] S2021: Obtain the mapping type corresponding to each mapping relationship.
[0114] Specifically, when executing step S2021, the server can obtain the mapping type corresponding to each mapping relationship based on the mapping type discrimination method. Among them, the mapping type can be divided into the following types according to the number of mapping relationships of the historically reported data sets in the corresponding mapping relationship and the number of correction methods required, from small to large: the first type of mapping type, the second type of mapping type, and the third type of mapping type. The first type of mapping type is that in this mapping relationship, the historically reported data set has only one mapping relationship, and only one correction method is required; the second type of mapping type is that in this mapping relationship, the historically reported data set has only one mapping relationship, but multiple correction methods are required; the third type of mapping type is that in this mapping relationship, the historically reported data set has other mapping relationships, and multiple correction methods are required.
[0115] Exemplarily, taking 6 mapping relationships as an example, the server detects the above 6 mapping relationships respectively based on the mapping type identification method, and obtains the mapping type corresponding to each mapping relationship. The mapping type corresponding to each mapping relationship is shown in Table 3:
[0116] Table 3
[0117]
[0118] It can be seen from the above table that the server can obtain the mapping types corresponding to the corresponding mapping relationships according to the mapping type identification method. For example, taking the mapping relationship MapRe.1 as an example, the server can determine that the mapping type corresponding to the mapping relationship MapRe.1 is the first type of mapping type based on the mapping type identification method; taking the mapping relationship MapRe.2 as an example, the server can determine that the mapping type corresponding to the mapping relationship MapRe.2 is the third type of mapping type based on the mapping type identification method, and so on.
[0119] S2022: After obtaining each mapping type, based on each obtained mapping type and the correspondence between the mapping type and the correction type, respectively determine the correction type corresponding to the corresponding mapping relationship.
[0120] Specifically, when executing step S2022, after obtaining each mapping type, the server determines the correction type of the corresponding mapping relationship in combination with the preset correspondence between the mapping type and the correction type. Among them, the correction type can be divided into the following types: the first correction type, the second correction type, and the third correction type according to the number of mapping relationships of the historically reported data set in the corresponding mapping relationship and the number of correction methods required, from small to large. The first correction type is that in the mapping relationship, the historically reported data set has only one mapping relationship and only one correction method is required; the second mapping type is that in the mapping relationship, the historically reported data set has only one mapping relationship, but multiple correction methods are required; the third correction type is that in the mapping relationship, the historically reported data set has other mapping relationships and multiple correction methods are required.
[0121] Exemplarily, still taking the above 6 mapping relationships as an example, the server determines the correction types corresponding to the 6 mapping relationships based on the preset correspondence between the mapping types and the correction types. The correction types corresponding to the respective mapping relationships are shown in Table 4:
[0122] Table 4
[0123]
[0124]
[0125] It can be seen from the above table that the server can obtain the correction type corresponding to each corresponding mapping relationship according to the correspondence between the mapping type and the correction type. For example, taking the mapping relationship MapRe.1 as an example, the server knows that the mapping type of the mapping relationship MapRe.1 is the first type of mapping type. According to the correspondence between the mapping type and the correction type, it can be known that the correction type of the mapping relationship MapRe.1 is the first type of correction type. Taking the mapping relationship MapRe.2 as an example, the server knows that the mapping type of the mapping relationship MapRe.2 is the third type of mapping type. According to the correspondence between the mapping type and the correction type, it can be known that the correction type of the mapping relationship MapRe.2 is the third type of correction type, and so on.
[0126] It should be noted that when the server adopts the first type of correction type, one correction method is used to correct the mapping relationship between a historically reported data set and a standard reported data set; when the server adopts the second type of correction type, multiple correction methods are used to correct the mapping relationship between a historically reported data set and a standard reported data set; when the server adopts the second type of correction type, the mapping relationship between a historically reported data set and multiple standard reported data sets is first split into multiple mapping relationships between a historically reported data set and a standard reported data set, and then the first type of correction type or the second type of correction type is used according to each mapping relationship to correct the mapping relationship between a historically reported data set and multiple standard reported data sets.
[0127] S2023: After respectively determining the correction types corresponding to the corresponding mapping relationships, based on the obtained correction types, respectively determine at least one correction method corresponding to the corresponding mapping relationships.
[0128] Specifically, when executing step S2023, the server determines the correction methods corresponding to the corresponding mapping relationships based on the obtained correction types, and further obtains the correction methods corresponding to the respective historical reported data sets.
[0129] Optionally, the server provides a variety of built-in correction methods that support data conversion, such as time conversion, unit conversion, operation conversion, character conversion, etc., and the corresponding number of correction methods can be selected in the terminal to obtain the correction result. Furthermore, when the built-in correction method does not meet the correction logic, the terminal provides a manual coding function. By writing the correction method for data conversion and clicking "Confirm Correction", the correction method can be sent to the server so that the server can complete the correction of the mapping relationship.
[0130] S203: After obtaining at least one correction method corresponding to each mapping relationship, respectively generate corresponding candidate data conversion rules based on each mapping relationship and its at least one correction method corresponding to each mapping relationship.
[0131] For details, see Figure 8 As shown, when executing step S203, the server can generate data conversion rules for corresponding historical reported data sets based on the mapping relationships in the data mapping modules and the correction methods in the data correction modules corresponding to the historical reported data sets.
[0132] Exemplarily, the server can generate corresponding data conversion rules based on the data conversion rule generation module, combined with the mapping relationships and correction methods corresponding to each historically reported data set. For example, taking the historically reported data set Data.Set.1.L as an example, if the mapping relationships corresponding to the historically reported data set Data.Set.1.L are: MapRe.DS1.1, MapRe.DS1.2 and MapRe.DS1.3, and the corresponding correction methods are: CorMeh.1 and CorMeh.2, then the corresponding data conversion rule Data.Rule.1 is obtained through the data conversion rule generation module.
[0133] In a preferred possible implementation, based on the above method steps, after obtaining each candidate data conversion rule, the following operations are performed for each historical reported data set: a historical reported data set and its candidate data conversion rule are obtained, and then based on the candidate data conversion rule, data conversion is performed on the historical reported data set to obtain a corresponding standard data set, and finally, based on the relationship between the obtained standard data set and the expected result, it is determined whether to retain the data conversion rule.
[0134] Optionally, if the obtained standard data set is consistent with the expected data conversion result of the historically reported data set, the candidate data conversion rule is stored in the database; if the obtained standard data set is inconsistent with the expected data conversion result of the historically reported data set, the candidate data conversion rule is not stored in the database. For example, the expected data conversion result of the historically reported data set Data.Set.1.L is Data.Set.1.Y. If the data conversion result obtained after data conversion according to the corresponding data conversion rule Data.Rule.1 is the standard data set Data.Set.1.L, it can be seen that the obtained standard data set is inconsistent with the expected data conversion result of the historically reported data set, and the data conversion rule needs to be deleted.
[0135] Furthermore, based on the above system architecture, the data conversion rules corresponding to each historical reporting data set are obtained, see Fig. 9 As shown, in the embodiment of the present application, the identification corresponding to each historical reported data set is obtained, and the specific steps are as follows:
[0136] S901: Obtain historical data conversion information corresponding to each historical reporting data set.
[0137] Specifically, when executing step S901, the server can filter out the historical data conversion information corresponding to each historical reported data set from the original database based on the feature extraction algorithm of the historical data conversion information, wherein each historical data conversion information includes at least: the data source information and the collection name of the corresponding historical reported data set, and the data source information and the collection name of the corresponding standard data set.
[0138] Exemplarily, the original database contains multiple historical reporting data sets. For ease of understanding, in the embodiment of the present application, taking 6 historical reporting data sets as an example, the server uses a feature extraction algorithm of historical data conversion information to detect the above 6 historical reporting data sets respectively, and obtains the historical data conversion information corresponding to each historical reporting data set. Each historical reporting data set and its corresponding historical data conversion information are shown in Table 5:
[0139] Table 5
[0140]
[0141] As can be seen from the above table, the server can perform feature extraction on the relevant data of each historical reporting data set according to the feature extraction algorithm of the historical data conversion information to obtain the corresponding historical data conversion information. Taking the historical reporting data set Data.Set.1.L as an example, the server can perform feature extraction on the relevant data of the historical reporting data set Data.Set.1.L according to the feature extraction algorithm of the historical data conversion information to extract the corresponding historical data conversion information Data.Sou.1.L; taking the historical reporting data set Data.Set.2.L as an example, the server can perform feature extraction on the relevant data of the historical reporting data set Data.Set.2.L according to the feature extraction algorithm of the historical data conversion information to extract the corresponding historical data conversion information Data.Sou.2.L.
[0142] S902: After obtaining the historical data conversion information corresponding to each historical reporting data set, based on the obtained historical data conversion information, generate the identifier of the corresponding historical reporting data set.
[0143] Specifically, when executing step S902, after obtaining the data conversion information corresponding to each historical reporting data set, the server allocates a UUID to each historical reporting data set.
[0144] For example, still taking the six historical reporting data sets in Table 4 as an example, the UUIDs corresponding to the various historical reporting data sets are shown in Table 6:
[0145] Table 6
[0146]
[0147] As can be seen from the above table, the server can assign a UUID to each reported data set from the UUID library according to the data conversion information of each historical reported data set. Taking the historical reported data set Data.Set.1.L as an example, the server selects an identifier UUID.1.L from the UUID library and assigns it to the historical reported data set Data.Set.1.L.
[0148] Furthermore, based on the above pre-operation processing, the data conversion rules and identifiers corresponding to each historical reporting data set are obtained, see Fig.10 As shown, in the embodiment of the present application, for a data set to be reported, the specific steps are as follows:
[0149] S1001: receiving a data set to be reported and a data conversion request of a target terminal, and acquiring target data conversion information of the data set to be reported from the data conversion request.
[0150] Specifically, when executing step S1001, after the server receives the data set to be reported and the data conversion request of the target terminal, it parses the data conversion request, and then obtains the target data conversion information of the data set to be reported; wherein the target data conversion information at least includes: the data source information and the set name of the data set to be reported, and the data source information and the set name of the corresponding standard data set.
[0151] Optionally, after receiving the data set to be reported from the target terminal, the server needs to preprocess the data, convert the data set to be reported into JSON format data, parse the JSON data through JsonPath, obtain the path of each field value relative to the original JSON data, and save the result to the database.
[0152] S1002: After obtaining data source information of the data set to be reported, a target identifier of the data set to be reported is generated based on target data conversion information.
[0153] Specifically, when executing step S1002, after obtaining the target data conversion information of the data set to be reported, the server allocates the UUID corresponding to the historical reported data set having the same data conversion information to the data set to be reported.
[0154] Exemplarily, if the server knows that the data conversion information of the data set to be reported is the same as the historically reported data set Data.Set.3.L, then UUID.3.L in the identification database is assigned to the data set to be reported, and UUID.3.L is used as the target identification.
[0155] S1003: After obtaining the target identifier of the data set to be reported, a target data conversion rule is selected based on the target identifier and the corresponding relationship between the identifier and the data conversion rule.
[0156] Specifically, when executing step S1003, the server may select a target data conversion rule from various data conversion rules based on the data conversion rules and identifiers corresponding to each historical reported data set and in combination with the target identifier.
[0157] For example, if the server knows that the target identifier of the data set to be reported is UUID.3.L, the server may use the data conversion rule Data.Rule.3 corresponding to UUID.3.L in the historical reported data as the data conversion rule for the data set to be reported.
[0158] S1004: After selecting the target data conversion rule, perform data conversion on the data set to be reported based on the target data conversion rule to obtain a target standard data set.
[0159] Specifically, when executing step S1004, after obtaining the target data conversion rules, the server obtains the target standard data set corresponding to the data set to be reported according to the mapping relationship and correction method between the data conversion rules, and directly uses the target standard data set as the data conversion result of the data set to be reported.
[0160] For example, if the server knows that the target identifier of the data set to be reported is UUID.3.L and obtains the corresponding target data conversion rule Data.Rule.3, then after passing the data conversion rule Data.Rule.3, the corresponding target standard data set Data.Set.3.B is obtained, and the target standard data set Data.Set.3.B is directly used as the data conversion result of the data set to be reported.
[0161] In the embodiment of the present application, based on the target data conversion information of the target terminal's data set to be reported, a corresponding target identifier is generated, and then the target data conversion rule is selected in combination with the correspondence between the identifier and the data conversion rule, so as to perform data conversion on the data set to be reported, and then obtain the corresponding target standard data set. In this way, based on the correspondence between the identifier and the data conversion rule, the target standard data set is obtained, which avoids the technical defect of the traditional method that each field in the reported data set needs to be treated separately and data conversion encoding is performed, thereby improving the efficiency of data conversion.
[0162] Based on the same technical concept, an embodiment of the present application also provides a data conversion device, which can implement the above method flow of the embodiment of the present application.
[0163] Fig.11The following is a schematic diagram showing the structure of a data conversion device provided by an embodiment of the present application. Fig.11 As shown, the data conversion device includes: an acquisition module 1101, a generation module 1102, a selection module 1103 and a conversion module 1104, wherein:
[0164] The acquisition module 1101 is used to receive the data set to be reported and the data conversion request of the target terminal, and obtain the target data conversion information of the data set to be reported from the data conversion request; wherein the target data conversion information at least includes: the data source information and the set name of the data set to be reported, and the data source information and the set name of the corresponding standard data set.
[0165] The generating module 1102 is used to generate a target identifier of the data set to be reported based on the target data conversion information.
[0166] The selection module 1103 is used to select the target data conversion rule based on the target identifier and the corresponding relationship between the identifier and the data conversion rule.
[0167] The conversion module 1104 is used to perform data conversion on the data set to be reported based on the target data conversion rule to obtain a target standard data set.
[0168] In an optional embodiment, before receiving the data set to be reported and the data conversion request from the target terminal, the generating module 1102 is further configured to:
[0169] Obtain the mapping relationship between each historical reporting data set and each standard data set.
[0170] At least one correction method corresponding to each of the obtained mapping relationships is determined respectively.
[0171] Based on each mapping relationship and its corresponding at least one correction method, corresponding candidate data conversion rules are generated respectively.
[0172] In an optional embodiment, when obtaining the mapping relationship between each historical reporting data set and each standard data set, the generating module 1102 is specifically used to:
[0173] Get the data name corresponding to each historical data resource in each historical reporting data set, and the data name corresponding to each standard data resource in each standard data set.
[0174] For each data name corresponding to each historical data resource obtained, perform the following operations respectively:
[0175] Semantic similarities between data names corresponding to each standard data resource and a data name of a historical data resource are determined respectively.
[0176] When it is determined that each of the obtained semantic similarities is greater than the set similarity threshold, a mapping relationship between a historically reported data set and a corresponding standard data set is established.
[0177] In an optional embodiment, when it is determined that each of the obtained semantic similarities is greater than a set similarity threshold, after respectively establishing a mapping relationship between a historical reported data set and a corresponding standard data set, the selection module 1103 is further used to:
[0178] Obtain a historical reporting data set and the corresponding standard data set, and the number of nodes in the storage path where each of them is located.
[0179] When it is determined that the number of nodes of a storage path where a historical reported data set is located is equal to the number of nodes of a storage path where a corresponding standard data set is located, a mapping relationship between a historical reported data set and a corresponding standard data set is retained.
[0180] When it is determined that the number of nodes of a storage path where a historical reported data set is located is not equal to the number of nodes of a storage path where a corresponding standard data set is located, a mapping relationship between a historical reported data set and the corresponding standard data set is deleted.
[0181] In an optional embodiment, when respectively determining at least one correction method corresponding to each of the obtained mapping relationships, the selection module 1103 is specifically used to:
[0182] Get the mapping type corresponding to each mapping relationship.
[0183] Based on the obtained mapping types and the corresponding relationships between the mapping types and the correction types, the correction types corresponding to the corresponding mapping relationships are determined respectively.
[0184] Based on each correction type obtained, at least one correction method corresponding to the corresponding mapping relationship is determined respectively.
[0185] In an optional embodiment, after generating corresponding candidate data conversion rules based on each mapping relationship and at least one correction method corresponding to each mapping relationship, the acquisition module 1101 is further used to:
[0186] For each historical reporting data set, perform the following operations:
[0187] Get a historical reporting dataset and its candidate data transformation rules.
[0188] Based on the candidate data conversion rules, a historical reported data set is converted to obtain the corresponding standard data set.
[0189] When it is determined that the corresponding standard data set is consistent with the expected data transformation result of a historical reported data set, the candidate data transformation rules are stored in the database.
[0190] In an optional embodiment, before receiving the data set to be reported and the data conversion request of the target terminal, the acquisition module 1101 is further used to:
[0191] Obtain the historical data source information corresponding to each historical reporting data set.
[0192] Based on the obtained information of each historical data source, the identifiers of the corresponding historical reporting data sets are generated respectively.
[0193] Based on the same technical concept, the embodiment of the present application also provides an electronic device, which can implement the method flow provided in the above embodiment of the present application. In one embodiment, the electronic device can be a server, or a terminal device or other electronic device.
[0194] Fig.12 The following is a schematic diagram showing the structure of an electronic device provided by an embodiment of the present application. Fig.12 As shown, the electronic device may include:
[0195] At least one processor 1201, and a memory 1202 connected to the at least one processor 1201. The specific connection medium between the processor 1201 and the memory 1202 is not limited in the embodiment of the present application. Fig.12 In the example, the processor 1201 and the memory 1202 are connected via the bus 1200. Fig.12 The connections between other components are shown in bold lines, and are not intended to be limiting. The bus 1200 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 1201 can also be called a controller, and there is no limitation on the name.
[0196] In the embodiment of the present application, the memory 1202 stores instructions that can be executed by at least one processor 1201. The at least one processor 1201 can execute a data conversion method discussed above by executing the instructions stored in the memory 1202. The processor 1201 can implement Fig.11 The functions of each module in the device shown.
[0197] Among them, the processor 1201 is the control center of the device, which can use various interfaces and lines to connect the various parts of the entire control device, and monitor the device as a whole by running or executing instructions stored in the memory 1202 and calling the data stored in the memory 1202, the various functions of the device and processing data.
[0198] In one possible design, the processor 1201 may include one or more processing units, and the processor 1201 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 1201. In some embodiments, the processor 1201 and the memory 1202 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
[0199] Processor 1201 can be a general-purpose processor, such as a CPU (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of a data conversion method disclosed in the embodiments of the present application can be directly embodied as a hardware processor to be executed, or a combination of hardware and software modules in the processor can be executed.
[0200] Memory 1202, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. Memory 1202 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic memory, disk, optical disk, etc. Memory 1202 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 1202 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0201] By designing and programming the processor 1201, the code corresponding to the data conversion method described in the above embodiment can be fixed into the chip, so that the chip can execute the code when running. Fig.10 The steps of a data conversion method in the embodiment shown are as follows: How to design and program the processor 1201 is a technique known to those skilled in the art and will not be described in detail here.
[0202] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes a data conversion method discussed above.
[0203] In some possible implementations, various aspects of a data conversion method provided by the present application may also be implemented in the form of a program product, which includes program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of a data conversion method according to various exemplary implementations of the present application described above in this specification.
[0204] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0205] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0206] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0207] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
Claims
1. A data conversion method, characterized in that: include: Obtain the mapping relationship between each historical reporting data set and each standard data set; Determine at least one correction method corresponding to each of the obtained mapping relationships; Based on the respective mapping relationships and at least one correction method corresponding to each of them, corresponding candidate data conversion rules are generated respectively; Receive a data set to be reported and a data conversion request of a target terminal, and obtain target data conversion information of the data set to be reported from the data conversion request; wherein the target data conversion information at least includes: data source information and a set name of the data set to be reported, and data source information and a set name of a corresponding standard data set; Based on the target data conversion information, generating a target identifier of the data set to be reported; Based on the target identifier and the corresponding relationship between the identifier and the data conversion rule, selecting the target data conversion rule; Based on the target data conversion rule, the data set to be reported is converted to obtain a target standard data set.
2. The method according to claim 1, characterized in that The obtaining of the mapping relationship between each historical reported data set and each standard data set includes: Obtaining the data name corresponding to each historical data resource in each historical reporting data set, and the data name corresponding to each standard data resource in each standard data set; For each data name corresponding to each historical data resource obtained, perform the following operations respectively: Determining the semantic similarity between the data name corresponding to each of the standard data resources and the data name of a historical data resource respectively; When it is determined that all the obtained semantic similarities are greater than the set similarity threshold, a mapping relationship between a historical reporting data set corresponding to the one historical data resource and a corresponding standard data set is established.
3. The method according to claim 2, characterized in that After establishing a mapping relationship between a historical reporting data set corresponding to the historical data resource and a corresponding standard data set when it is determined that each of the obtained semantic similarities is greater than a set similarity threshold, the method further includes: Obtain the number of nodes in the storage path where the historical reporting data set and the corresponding standard data set are located; When it is determined that the number of nodes of the storage path where the one historical reported data set is located is equal to the number of nodes of the storage path where the corresponding standard data set is located, retaining the mapping relationship between the one historical reported data set and the corresponding standard data set; When it is determined that the number of nodes in the storage path where the historical reported data set is located is not equal to the number of nodes in the storage path where the corresponding standard data set is located, the mapping relationship between the historical reported data set and the corresponding standard data set is deleted.
4. The method according to claim 1, characterized in that The respectively determining at least one correction method corresponding to each of the obtained mapping relationships comprises: Obtaining the mapping type corresponding to each of the mapping relationships; Based on the obtained mapping types and the corresponding relationships between the mapping types and the correction types, respectively determine the correction types corresponding to the corresponding mapping relationships; Based on each correction type obtained, at least one correction method corresponding to the corresponding mapping relationship is determined respectively.
5. The method according to claim 1, characterized in that After generating corresponding candidate data conversion rules based on the mapping relationships and the at least one correction method corresponding to each of them, the method further includes: For each historical reporting data set, perform the following operations respectively: Obtain a historical reporting data set and its candidate data transformation rules; Based on the candidate data conversion rule, performing data conversion on the one historical reported data set to obtain a corresponding standard data set; When it is determined that the corresponding standard data set is consistent with the expected data conversion result of the one historical reported data set, the candidate data conversion rule is stored in a database.
6. The method according to any one of claims 1 to 5, characterized in that Before receiving the data set to be reported and the data conversion request of the target terminal, the method further includes: Obtaining historical data conversion information corresponding to each of the historical reported data sets; wherein each historical data conversion information at least includes: data source information and a set name of the corresponding historical reported data set, and data source information and a set name of the corresponding standard data set; Based on the obtained historical data conversion information, the identifiers of the corresponding historical reporting data sets are generated respectively.
7. A data conversion device, characterized in that: include: A generation module is used to obtain the mapping relationship between each historical reporting data set and each standard data set; Determine at least one correction method corresponding to each of the obtained mapping relationships; Based on the respective mapping relationships and at least one correction method corresponding to each of them, corresponding candidate data conversion rules are generated respectively; an acquisition module, configured to receive a data set to be reported and a data conversion request of a target terminal, and to acquire target data conversion information of the data set to be reported from the data conversion request; wherein the target data conversion information at least includes: data source information and a set name of the data set to be reported, and data source information and a set name of a corresponding standard data set; The generating module is further used to generate a target identifier of the data set to be reported based on the target data conversion information; A selection module, configured to select a target data conversion rule based on the target identifier and the corresponding relationship between the identifier and the data conversion rule; The conversion module is used to perform data conversion on the data set to be reported based on the target data conversion rule to obtain a target standard data set.
8. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Data conversion method, device and equipment of different data models and storage medium
CN108563768A