Data classification method, device, equipment and storage medium based on character matching

Through the data classification method based on character matching, the character matching in the data model is used to classify business data, which solves the problem of difficulty in balancing efficiency and accuracy in the existing technology, and achieves efficient and accurate data classification.

CN113626671BActive Publication Date: 2024-10-01PINGAN INT SMART CITY TECH CO LTD

Patent Information

Application Number
CN202110924846.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-12
Publication Date
2024-10-01
Estimated Expiration
2041-08-12

AI Technical Summary

Technical Problem

Existing data classification methods are difficult to balance classification efficiency and accuracy, especially in complex data analysis processes, resulting in reduced efficiency.

Method used

Using a data classification method based on character matching, by obtaining the business data to be classified and matching the characters in the preset data model, the matching data is the same or similar data, and the business data is classified into the target data classification in the data model, reducing complexity analysis process.

Benefits of technology

While ensuring the accuracy of data classification, it improves the efficiency of data classification, simplifies the data analysis process, and improves the efficiency of data classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113626671B_ABST
    Figure CN113626671B_ABST
Patent Text Reader

Abstract

The present invention discloses a data classification method based on character matching, comprising: obtaining business data to be classified; performing character matching on the business data and each data in a preset data model to obtain matching data in the data model that matches the business data; and classifying the business data into the target data classification in the data model according to the target data classification corresponding to the matching data in the data model. It can be seen that the present invention can classify business data by a simple character matching method, reduce the complex data analysis process in data classification, and take into account the efficiency of data classification while ensuring the accuracy of data classification. The present invention also relates to the field of blockchain technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data modeling, and in particular to a data classification method, device, computer equipment and storage medium based on character matching. Background Art

[0002] With the advent of the information society, information technology has gradually penetrated into people's daily lives, bringing great convenience to people's daily lives. For example, current information technologies such as communication technology, artificial intelligence technology, Internet technology, and Internet of Things technology have created better living conditions for humans. As information technology is widely used, a large amount of data is generated. After being processed by big data technology, these data can provide users with various data services. In big data technology, data modeling of source data is a key link. In practical applications, source data is usually scattered (for example, data types are not unified, data content lacks unified standards, etc.). If these source data are directly used to provide data services, it is obviously impossible to achieve efficient use of data and provide high-quality data services. Therefore, before using big data technology to provide technical services to users, it is usually necessary to perform data modeling on the source data.

[0003] Data modeling is a relatively complex task. Usually, different industry applications have different modeling requirements. For example, in some industry applications, it is usually necessary to classify business data into various data categories of the data model when performing data modeling. In the process of classifying business data, in order to accurately classify business data into appropriate data categories, it is often necessary to perform more complex analysis of the business data (such as semantic understanding of characters in business data, clustering of business data, etc.). Generally, the more complex the analysis process of business data, the more accurate the classification result obtained. However, a more complex analysis process also means that a large amount of calculations need to be performed during the analysis process, which will lead to a decrease in data classification efficiency. At present, there is an urgent need in the prior art for a data classification method that can better balance classification efficiency and classification accuracy. Summary of the invention

[0004] The technical problem to be solved by the present invention is that the current data classification method fails to give good consideration to both the efficiency and accuracy of data classification.

[0005] In order to solve the above technical problems, the first aspect of the present invention discloses a data classification method based on character matching, the method comprising:

[0006] Obtaining business data to be classified;

[0007] Performing character matching between the business data and each data in a preset data model to obtain matching data in the data model that matches the business data, wherein the data model is preset with a plurality of data categories, and each data in the data model has been pre-divided into each data category;

[0008] Classifying the business data into the target data classification in the data model according to the target data classification corresponding to the matching data in the data model;

[0009] Among them, the matching data is the same data or approximate data, the same data refers to the data in the data model that is completely consistent with the characters of the business data, and the approximate data refers to the data in the data model that is not completely consistent with the characters of the business data and contains all the characters in the business data.

[0010] A second aspect of the present invention discloses a data classification device based on character matching, the device comprising:

[0011] An acquisition module, used to acquire business data to be classified;

[0012] A matching module, used for character matching the business data with each data in a preset data model to obtain matching data in the data model that matches the business data, wherein the data model is preset with multiple data categories, and each data in the data model has been pre-divided into each data category;

[0013] A classification module, configured to classify the business data into the target data classification in the data model according to the target data classification corresponding to the matching data in the data model;

[0014] Among them, the matching data is the same data or approximate data, the same data refers to the data in the data model that is completely consistent with the characters of the business data, and the approximate data refers to the data in the data model that is not completely consistent with the characters of the business data and contains all the characters in the business data.

[0015] A third aspect of the present invention discloses a computer device, the computer device comprising:

[0016] A memory storing executable program code;

[0017] a processor connected to the memory;

[0018] The processor calls the executable program code stored in the memory to execute part or all of the steps in the data classification method based on character matching disclosed in the first aspect of the present invention.

[0019] The fourth aspect of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute part or all of the steps in the data classification method based on character matching disclosed in the first aspect of the present invention.

[0020] In an embodiment of the present invention, business data to be classified is first obtained, and then characters in the business data are matched with characters in each data in an existing data model to obtain matching data corresponding to the business data, and finally the business data is classified into a data classification of the data model according to the data classification of the matching data in the data model. Thus, when classifying the business data, the matching data corresponding to the business data can be first matched from the data model by character matching, and then the business data to be classified can be classified with reference to the data classification of the matching data in the data model. Thus, the classification of the business data can be achieved by simple character matching, thereby reducing the complex data analysis process in the data classification, and taking into account the efficiency of the data classification while ensuring the accuracy of the data classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 It is a flowchart of a data classification method based on character matching disclosed in an embodiment of the present invention;

[0023] Figure 2 It is a structural schematic diagram of a data classification device based on character matching disclosed in an embodiment of the present invention;

[0024] Figure 3 It is a structural schematic diagram of a computer device disclosed in an embodiment of the present invention;

[0025] Figure 4 It is a structural schematic diagram of a computer storage medium disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or end including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or ends.

[0028] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0029] The present invention discloses a data classification method, device, computer equipment and storage medium based on character matching, firstly obtaining business data to be classified, then matching characters in the business data with characters in each data in an existing data model to obtain matching data corresponding to the business data, and finally classifying the business data into the data classification of the data model according to the data classification of the matching data in the data model, so that when classifying the business data, firstly matching the matching data corresponding to the business data from the data model by character matching, and then classifying the business data to be classified with reference to the data classification of the matching data in the data model, so that the classification of the business data can be realized by a simple character matching method, reducing the complex data analysis process in the data classification, while ensuring the accuracy of the data classification, taking into account the efficiency of the data classification. The following are detailed descriptions.

[0030] Embodiment 1

[0031] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a data classification method based on character matching disclosed in an embodiment of the present invention. Figure 1As shown, the data classification method based on character matching may include the following operations:

[0032] 101. Obtain business data to be classified.

[0033] In the above step 101, the business data to be classified can be relevant data crawled from the Internet or data obtained from a specified system. For example, in data modeling for certain industry applications, case materials can be crawled from websites such as China Judgment Documents Network and Peking University Law Treasure as business data, or business data can be obtained from the internal management system of the industry application.

[0034] 102. Perform character matching on the business data and each data in a preset data model to obtain matching data in the data model that matches the business data, wherein the data model is preset with multiple data categories, and each data in the data model has been pre-divided into each data category, and the matching data is identical data or approximate data, wherein the identical data refers to data in the data model that is completely consistent with the characters of the business data, and the approximate data refers to data in the data model that is not completely consistent with the characters of the business data and contains all the characters in the business data.

[0035] In the above step 102, an existing data model usually includes multiple data layers, and each data layer is used to store data of a corresponding level of classification.

[0036] Preferably, this embodiment can be applied to the data model of certain industry applications, and specifically can include three data layers, wherein the first layer is the first-level business classification, which is used to store the data of the first-level business classification, the second layer is the second-level business classification, which is used to store the data of the second-level business classification, and the third layer is the third-level business classification, which is used to store the data of the third-level business classification. The first-level business classification may include A, B, C, D, E, F, G, H, I, etc. The second-level business classification is the classification continued under the first-level business classification, such as the second-level business classification corresponding to the first-level business classification A may include 19 second-level business classifications such as AA, AB, AC, etc. The third-level business classification is the classification continued under the second-level business classification, such as the third-level business classification corresponding to the second-level business classification AA may include 16 third-level business classifications such as AAA, AAB, AAC, etc. Assuming that the first-level business classification of data a is classified as A, the second-level business classification is AA, and the third-level business classification is AAA during the data modeling process, then the data a is stored in the A classification of the first-level data layer, the AA classification of the second-level data layer, and the AAA classification of the third-level data layer of the data model. The process of performing a matching operation on business data based on a data model can be a process of searching for existing data that is identical to the business data in the data model, which can be achieved through character matching or value matching. For example, the matching operation can be achieved by matching the characters in the business data with the characters in the data that already exists in the data model. If the characters in the data that already exists in the data model are exactly the same as the characters in the business data, it is determined that the business data has matching identical data in the data model. If the characters in the data that already exists in the data model contain all the characters in the business data, and the characters in the data that already exists in the data model have redundant characters relative to all the characters in the business data, it is determined that the business data has matching approximate data in the data model. For example, the data a that already exists in the data model is the field name "Make XX Suggestions Department type_code", if the business data is also named "Propose XX suggestion department type_code", the characters of the business data and data a are exactly the same, then it can be determined that the business data has matching identical data in the data model; if the business data is named "Propose XX suggestion department type", then data a contains business data, and data a has extra characters "_code" relative to the business data, then it can be determined that the business data has matching approximate data in the data model; if the business data is named "Propose XX suggestion department type_name", then data a fails to contain all the characters in the business data, then it can be determined that the business data has no matching data in the data model.

[0037] 103. Classify the business data into the target data classification in the data model according to the target data classification corresponding to the matching data in the data model.

[0038] Optionally, classifying the business data into the target data classification in the data model according to the target data classification corresponding to the matching data in the data model includes:

[0039] When the matching data is the same data, determining the data classification of the same data in the data model as the target data classification, and classifying the business data into the target data classification;

[0040] When the matching data is the approximate data, similar data corresponding to the business data is searched in the data model according to a preset search method, the target data classification is determined based on the data classification of the similar data in the data model, and the business data is classified into the target data classification.

[0041] In the above step 103, continue to take the XX industry application as an example, assuming that data a is the field name "propose XX suggestion department type_code", if the business data is also the field name "propose XX suggestion department type_code", it can be determined that the business data matches the data a in the data model (that is, the same data that matches the business data is data a), and the business data is classified into the same classification as data a (that is, the first-level business classification is A, the second-level business classification is AA, and the third-level business classification is AAA), that is, the classification of the business data in the data model can be completed, and the classification of the business data can be realized. If the business data is the field name "propose XX suggestion department type_name", and the field name "propose XX suggestion department type_name" does not exist in the data model, the business data can be deleted and not added to the data model. If the business data is the field name "propose XX suggestion department type", the business data is not exactly the same as data a, but partially similar, that is, data a is approximate data that matches the business data. At this time, similar data corresponding to the business data can be found from the data model. Assuming that the similar data of the business data found include the field name "Propose XX Suggestion Department Type_Name" and the field name "Propose XX Suggestion Department Type_Code", the business data and similar data can be pushed to the preset terminal (i.e., similar processing operation), and the business data can be manually classified according to the business data and similar data to achieve modeling of the business data. For example, after receiving the business data and similar data, the operator checks the business data and confirms that the business data is more matched with the field name "Propose XX Suggestion Department Type_Code", then the business data can be classified into the same category as the field name "Propose XX Suggestion Department Type_Code", thereby achieving classification of the business data.

[0042] It can be seen that the implementation Figure 1The described data classification method based on character matching first obtains the business data to be classified, then matches the characters in the business data with the characters in each data in the existing data model to obtain the matching data corresponding to the business data, and finally classifies the business data into the data classification of the data model according to the data classification of the matching data in the data model. In this way, when classifying the business data, the matching data corresponding to the business data can be matched from the data model by character matching, and then the business data to be classified can be classified with reference to the data classification of the matching data in the data model. In this way, the classification of business data can be realized by simple character matching, and the complex data analysis process in data classification can be reduced, while ensuring the accuracy of data classification and taking into account the efficiency of data classification.

[0043] In an optional embodiment, searching the data model for similar data corresponding to the business data in a preset search manner includes:

[0044] Mapping the business data and the data in the data model into data vectors in a data vector space respectively;

[0045] Based on the data vectors respectively corresponding to the business data and the data in the data model, similar data corresponding to the business data is filtered out from the data in the data model.

[0046] In this optional embodiment, the forms of business data and data in the data model are usually not directly comparable, so the business data and data in the data model can be mapped to data vectors in the data vector space, so that the business data and data in the data model can be compared, so that similar data can be screened out from the data in the data model. For example, the data vector mapped to the data "Propose XX suggestion department" is (3,2), and the data vectors mapped to the data "Propose XX suggestion department type_name", "Propose XX suggestion department code" and "Propose XX suggestion department type_code" are (3,2.1), (3,2.2), (3,2.22) respectively. Among them, the data can be mapped to the data vector in the data vector space by word embedding.

[0047] It can be seen that by implementing this optional embodiment, both the business data and the data in the data model are mapped to data vectors in the data vector space, so that similar data corresponding to the business data can be screened out based on the data vectors corresponding to the business data and the data in the data model.

[0048] In an optional embodiment, the filtering out similar data corresponding to the business data from the data in the data model based on the data vectors corresponding to the business data and the data in the data model respectively includes:

[0049] Determine a current radius according to a historical radius, wherein the historical radius is a radius determined in the process of screening similar data last time, and the current radius is greater than the historical radius;

[0050] Determine a data vector range according to the service data vector and the current radius, wherein the service data vector is a vector corresponding to the service data in the data vector space, and the data vector range is a circular range in the data vector space with the service data vector as the center and the current radius as the radius;

[0051] Determine whether the number of data vectors within the data vector range is greater than the number of data vectors within a historical data vector range, wherein the historical data vector range is a circular range in the data vector space with the business data vector as the center and the historical radius as the radius;

[0052] When the number of data vectors within the data vector range is not greater than the number of data vectors within the historical data vector range, data corresponding to the data vectors within the data vector range in the data model are determined as similar data corresponding to the business data.

[0053] In this optional embodiment, after mapping the business data and the data in the data model into data vectors in the data vector space, similar data can be filtered out from the data in the data model through the following process: first, an initial radius can be preset, and then the radius can be continuously increased, and each time the radius increases, it is determined whether the number of data vectors within the data vector range corresponding to the secondary radius is greater than the number of data vectors within the data vector range corresponding to the previous radius (that is, the historical data vector range), that is, it is determined whether there are new data vectors within the data vector range corresponding to the secondary radius relative to the data vector range corresponding to the previous radius. If the number of data vectors within the data vector range corresponding to the secondary radius is not greater than the number of data vectors within the data vector range corresponding to the previous radius, then the data vectors are filtered out. The number of data vectors within the vector range (i.e., the data vectors within the data vector range corresponding to this radius have no newly added data vectors relative to the data vectors within the data vector range corresponding to the previous radius), that is, the data corresponding to the data vectors within the data vector range corresponding to this radius can be determined as similar data to the business data. If the number of data vectors within the data vector range corresponding to this radius is greater than the number of data vectors within the data vector range corresponding to the previous radius (i.e., the data vectors within the data vector range corresponding to this radius have newly added data vectors relative to the data vectors within the data vector range corresponding to the previous radius), the radius is continued to be increased to enter the next round of screening, so that similar data corresponding to the business data can be screened out from the data of the data model. The calculation of the distance between data vectors can be achieved by calculating the Euclidean distance between data vectors.

[0054] It can be seen that by implementing this optional embodiment, the radius of the data vector range is continuously increased, and each time the radius increases, it is determined whether the number of data vectors in the data vector range corresponding to this radius is greater than the number of data vectors in the data vector range corresponding to the previous radius. If not, the data corresponding to the data vectors in the data vector range corresponding to this radius are determined as similar data to the business data, thereby being able to filter out similar data corresponding to the business data from the data in the data model based on the data vectors corresponding to the business data and the data in the data model.

[0055] In an optional embodiment, determining the current radius according to the historical radius includes:

[0056] The current radius is calculated from the historical radius in an exponentially growing manner using the following formula:

[0057] y=log a x;

[0058] z=a y+1 ;

[0059] Among them, y is the exponential value corresponding to the historical radius, a is a preset base, x is the historical radius, and z is the current radius.

[0060] In this optional embodiment, the radius of the data vector range may be continuously increased in the form of exponential growth, so that the characteristic of exponential growth can be used to quickly complete the screening of similar data. For example, the value of the radius is 2 for the first time, 4 for the second time, and 8 for the third time. Alternatively, the value of the radius may also be gradually increased with a fixed value, such as 2 for the first time, 4 for the second time, and 6 for the third time, and the radius increases by 2 each time.

[0061] It can be seen that by implementing this optional embodiment, the current radius is calculated based on the historical radius in an exponential growth manner, so that the screening of similar data can be quickly completed by utilizing the characteristics of exponential growth.

[0062] In an optional embodiment, after obtaining the business data to be classified, the method further includes:

[0063] A preset data standardization process is performed on the business data to complete the standardization of the business data.

[0064] In this optional embodiment, in actual applications, the data forms of the acquired business data are usually various and lack a unified standard, which is not conducive to serving different application systems according to the unified standard and easily reduces the efficiency of data use. Therefore, when performing data modeling on the business data, the business data can also be processed by data standardization (details will be described later), so that the business data can serve different application systems according to the unified standard and improve the efficiency of data use.

[0065] It can be seen that by implementing this optional embodiment, when data modeling is performed on business data, data standardization is also performed on the business data, so that the business data can serve different application systems according to unified standards, thereby improving the efficiency of using business data.

[0066] In an optional embodiment, performing preset data standardization processing on the business data includes:

[0067] Determine whether there is a Chinese field name in the table structure in the business data;

[0068] When it is determined that the business data contains the Chinese field name of the table structure, the Chinese field name of the table structure in the business data is converted into the English field name of the table structure according to a preset Chinese-English conversion method;

[0069] Determine whether the English field name of the table structure of the business data is in a preset special conversion table, wherein the special conversion table records a plurality of target table structure English field names and a special conversion method corresponding to each target table structure English field name, and the target table structure English field name refers to the table structure English field name that needs to perform special conversion;

[0070] When it is determined that the English field names of the table structure of the business data are in the special conversion table, the English field names of the table structure of the business data are converted into special table structure English field names according to the target special conversion method. The target special conversion method refers to the special conversion method corresponding to the English field names of the table structure of the business data in the special conversion table.

[0071] In this optional embodiment, the Chinese field names of the table structure in the business data can be converted into English field names of the table structure through the open source python package pypinyin. Specifically, the pinyin initials of each Chinese in the Chinese field name of the table structure can be used as the English corresponding to the Chinese to form the English field name of the table structure corresponding to the Chinese field name of the table structure (i.e., the Chinese-English conversion method), such as the table structure Chinese field name "Propose XX suggestion department type_code" is converted into the table structure English field name "TCJCJYBMLX_DM". For some unique English field names of the table structure, special customized conversions can also be continued. The content of the special conversion table can be shown in the following table:

[0072]

[0073]

[0074] From the content of the special conversion table, it can be seen that after the Chinese field name "Stop" in the table structure is converted into the English field name "ZZ" in the table structure, the English field name "ZZ" in the table structure also needs to be converted into the special English field name "ZZM" in the table structure.

[0075] It can be seen that by implementing this optional embodiment, the Chinese field names in the table structure of the business data are converted into English field names in the table structure, and the English field names in the table structure are further converted according to a preset special conversion table, thereby realizing data standardization processing of the business data, enabling the business data to serve different application systems according to unified standards, thereby improving the efficiency of using the business data.

[0076] In an optional embodiment, performing preset data standardization processing on the business data includes:

[0077] Determining whether there is merged data in the business data;

[0078] When it is determined that the merged data exists in the business data, resetting the data type of the merged data according to the data type of the source data corresponding to the merged data;

[0079] The source data refers to the original data in the upstream system, and the merged data refers to the data obtained by merging the source data.

[0080] In this optional embodiment, a merged data is usually obtained by merging the original data (i.e., source data) in multiple upstream systems. If the merged data is character data, the data type corresponding to the source data with the largest character length among all the source data corresponding to the merged data can be selected as the data type of the merged data. If the merged data is timestamp data, the data type corresponding to the source data with the smallest time precision among all the source data corresponding to the merged data can be selected as the data type of the merged data. For example, the source data corresponding to the merged data includes a date data type and a timestamp data type, wherein the time precision of the timestamp data type can be accurate to nanoseconds, and the time precision of the date data type can be accurate to seconds, so the timestamp data type is selected as the data type of the merged data. If the merged data is digital data, the data type corresponding to the source data with the smallest data precision among all the source data corresponding to the merged data can be selected as the data type of the merged data.

[0081] It can be seen that by implementing this optional embodiment, the data type of the merged data is reset according to the data type of the source data corresponding to the merged data in the business data, thereby realizing data standardization processing of the business data, enabling the business data to serve different application systems according to unified standards, and improving the efficiency of using the business data.

[0082] Optionally, it is also possible to: upload the character matching-based data classification information of the character matching-based data classification method to the blockchain.

[0083] Specifically, the data classification information based on character matching is obtained by running the data classification method based on character matching, and is used to record the data classification based on character matching, for example, the acquisition time of business data, the data source of business data, the data classification in the data model, etc. Uploading the data classification information based on character matching to the blockchain can ensure its security and fairness and transparency to users. Users can download the data classification information based on character matching from the blockchain to verify whether the data classification information based on character matching of the data classification method based on character matching has been tampered with. The blockchain referred to in this example is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods, each of which contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. The blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer.

[0084] Embodiment 2

[0085] See also Figure 2 , Figure 2 Schematic diagram of a data classification device based on character matching disclosed in an embodiment of the present invention. Figure 2 As shown, the data classification device based on character matching may include:

[0086] An acquisition module 201 is used to acquire business data to be classified;

[0087] A matching module 202, configured to perform character matching between the business data and each data in a preset data model, and obtain matching data in the data model that matches the business data, wherein the data model is preset with multiple data categories, and each data in the data model has been pre-divided into each data category;

[0088] A classification module 203, configured to classify the business data into the target data classification in the data model according to the target data classification corresponding to the matching data in the data model;

[0089] Among them, the matching data is the same data or approximate data, the same data refers to the data in the data model that is completely consistent with the characters of the business data, and the approximate data refers to the data in the data model that is not completely consistent with the characters of the business data and contains all the characters in the business data.

[0090] In an optional embodiment, the classification module 203 classifies the business data into the target data category in the data model according to the target data category corresponding to the matching data in the data model in a specific manner as follows:

[0091] When the matching data is the same data, determining the data classification of the same data in the data model as the target data classification, and classifying the business data into the target data classification;

[0092] When the matching data is the approximate data, similar data corresponding to the business data is searched in the data model according to a preset search method, the target data classification is determined based on the data classification of the similar data in the data model, and the business data is classified into the target data classification.

[0093] In an optional embodiment, the classification module 203 searches the data model for similar data corresponding to the business data in a preset search manner in the following specific manner:

[0094] Mapping the business data and the data in the data model into data vectors in a data vector space respectively;

[0095] Based on the data vectors respectively corresponding to the business data and the data in the data model, similar data corresponding to the business data is filtered out from the data in the data model.

[0096] In an optional embodiment, the classification module 203 selects similar data corresponding to the business data from the data in the data model based on the data vectors corresponding to the business data and the data in the data model respectively in the following specific manner:

[0097] Determine a current radius according to a historical radius, wherein the historical radius is a radius determined in the process of screening similar data last time, and the current radius is greater than the historical radius;

[0098] Determine a data vector range according to the service data vector and the current radius, wherein the service data vector is a vector corresponding to the service data in the data vector space, and the data vector range is a circular range in the data vector space with the service data vector as the center and the current radius as the radius;

[0099] Determine whether the number of data vectors within the data vector range is greater than the number of data vectors within a historical data vector range, wherein the historical data vector range is a circular range in the data vector space with the business data vector as the center and the historical radius as the radius;

[0100] When the number of data vectors within the data vector range is not greater than the number of data vectors within the historical data vector range, data corresponding to the data vectors within the data vector range in the data model are determined as similar data corresponding to the business data.

[0101] In an optional embodiment, the classification module 203 determines the current radius according to the historical radius in the following specific manner:

[0102] The current radius is calculated from the historical radius in an exponentially growing manner using the following formula:

[0103] y=log a x;

[0104] z=a y+1 ;

[0105] Among them, y is the exponential value corresponding to the historical radius, a is a preset base, x is the historical radius, and z is the current radius.

[0106] In an optional embodiment, the device further comprises:

[0107] The data standardization processing module is used to perform preset data standardization processing on the business data to complete the standardization of the business data.

[0108] In an optional embodiment, the specific manner in which the data standardization processing module performs preset data standardization processing on the business data is:

[0109] Determine whether there is a Chinese field name in the table structure in the business data;

[0110] When it is determined that the business data contains the Chinese field name of the table structure, the Chinese field name of the table structure in the business data is converted into the English field name of the table structure according to a preset Chinese-English conversion method;

[0111] Determine whether the English field name of the table structure of the business data is in a preset special conversion table, wherein the special conversion table records a plurality of target table structure English field names and a special conversion method corresponding to each target table structure English field name, and the target table structure English field name refers to the table structure English field name that needs to perform special conversion;

[0112] When it is determined that the English field names of the table structure of the business data are in the special conversion table, the English field names of the table structure of the business data are converted into special table structure English field names according to the target special conversion method. The target special conversion method refers to the special conversion method corresponding to the English field names of the table structure of the business data in the special conversion table.

[0113] In an optional embodiment, the specific manner in which the data standardization processing module performs preset data standardization processing on the business data is:

[0114] Determining whether there is merged data in the business data;

[0115] When it is determined that the merged data exists in the business data, resetting the data type of the merged data according to the data type of the source data corresponding to the merged data;

[0116] The source data refers to the original data in the upstream system, and the merged data is the data obtained by merging the source data. The specific description of the data classification device based on character matching can refer to the specific description of the data classification method based on character matching. To avoid repetition, it will not be repeated here.

[0117] Embodiment 3

[0118] See also Figure 3 , Figure 3 Schematic diagram of the structure of a computer device disclosed in an embodiment of the present invention. Figure 3 As shown, the computer device may include:

[0119] A memory 301 storing executable program codes;

[0120] A processor 302 connected to the memory 301;

[0121] The processor 302 calls the executable program code stored in the memory 301 to execute the steps in the data classification method based on character matching disclosed in the first embodiment of the present invention.

[0122] Embodiment 4

[0123] See also Figure 4 The embodiment of the present invention discloses a computer storage medium 401, which stores computer instructions. When the computer instructions are called, they are used to execute the steps in the data classification method based on character matching disclosed in the first embodiment of the present invention.

[0124] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.

[0125] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0126] Finally, it should be noted that the data classification method, device, computer equipment and storage medium based on character matching disclosed in the embodiments of the present invention are only preferred embodiments of the present invention, which are only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data classification method based on character matching, characterized in that: The method comprises: Obtaining business data to be classified; Performing character matching between the business data and each data in a preset data model to obtain matching data in the data model that matches the business data, wherein the data model is preset with a plurality of data categories, and each data in the data model has been pre-divided into each data category; Classifying the business data into the target data classification in the data model according to the target data classification corresponding to the matching data in the data model; The matching data is the same data or approximate data. The same data refers to data in the data model that is completely consistent with the characters of the business data. The approximate data refers to data in the data model that is not completely consistent with the characters of the business data and contains all the characters in the business data. Wherein, classifying the business data into the target data classification in the data model according to the target data classification corresponding to the matching data in the data model includes: when the matching data is the same data, determining the data classification of the same data in the data model as the target data classification, and classifying the business data into the target data classification; when the matching data is the approximate data, searching the data model for similar data corresponding to the business data according to a preset search method, determining the target data classification based on the data classification of the similar data in the data model, and classifying the business data into the target data classification; Wherein, searching the data model for similar data corresponding to the business data according to a preset search method includes: mapping the business data and the data in the data model to data vectors in a data vector space respectively; based on the data vectors corresponding to the business data and the data in the data model respectively, filtering out similar data corresponding to the business data from the data in the data model; Among them, based on the data vectors corresponding to the business data and the data in the data model, respectively, screening out similar data corresponding to the business data from the data in the data model, includes: determining the current radius according to the historical radius, wherein the historical radius is the radius determined in the process of screening similar data last time, and the current radius is larger than the historical radius; determining the data vector range according to the business data vector and the current radius, wherein the business data vector is the vector corresponding to the business data in the data vector space, and the data vector range is a circular range in the data vector space with the business data vector as the center and the current radius as the radius; judging whether the number of data vectors in the data vector range is greater than the number of data vectors in the historical data vector range, wherein the historical data vector range is a circular range in the data vector space with the business data vector as the center and the historical radius as the radius; when the number of data vectors in the data vector range is not greater than the number of data vectors in the historical data vector range, determining the data corresponding to the data vectors in the data vector range in the data model as similar data corresponding to the business data.

2. The data classification method based on character matching according to claim 1 is characterized in that: Determining the current radius according to the historical radius includes: The current radius is calculated from the historical radius in an exponentially growing manner using the following formula: y=log a x; from=a y+1 ; Among them, y is the exponential value corresponding to the historical radius, a is a preset base, x is the historical radius, and z is the current radius.

3. The data classification method based on character matching according to any one of claims 1 to 2, characterized in that: After obtaining the business data to be classified, the method further includes: Determine whether there is a Chinese field name in the table structure in the business data; When it is determined that the business data contains the Chinese field name of the table structure, the Chinese field name of the table structure in the business data is converted into the English field name of the table structure according to a preset Chinese-English conversion method; Determine whether the English field name of the table structure of the business data is in a preset special conversion table, wherein the special conversion table records a plurality of target table structure English field names and a special conversion method corresponding to each target table structure English field name, and the target table structure English field name refers to the table structure English field name that needs to perform special conversion; When it is determined that the English field names of the table structure of the business data are in the special conversion table, the English field names of the table structure of the business data are converted into special table structure English field names according to the target special conversion method. The target special conversion method refers to the special conversion method corresponding to the English field names of the table structure of the business data in the special conversion table.

4. The data classification method based on character matching according to any one of claims 1 to 2, characterized in that: After obtaining the business data to be classified, the method further includes: determining whether there is merged data in the business data; When it is determined that the merged data exists in the business data, resetting the data type of the merged data according to the data type of the source data corresponding to the merged data; The source data refers to the original data in the upstream system, and the merged data refers to the data obtained by merging the source data.

5. A data classification device based on character matching, characterized in that: The device comprises: An acquisition module, used to acquire business data to be classified; A matching module, used for character matching the business data with each data in a preset data model to obtain matching data in the data model that matches the business data, wherein the data model is preset with multiple data categories, and each data in the data model has been pre-divided into each data category; A classification module, configured to classify the business data into the target data classification in the data model according to the target data classification corresponding to the matching data in the data model; The matching data is the same data or approximate data. The same data refers to data in the data model that is completely consistent with the characters of the business data. The approximate data refers to data in the data model that is not completely consistent with the characters of the business data and contains all the characters in the business data. The specific manner in which the classification module classifies the business data into the target data classification in the data model according to the target data classification corresponding to the matching data in the data model is as follows: when the matching data is the same data, the data classification of the same data in the data model is determined as the target data classification, and the business data is classified into the target data classification; when the matching data is the approximate data, similar data corresponding to the business data is searched in the data model according to a preset search method, the target data classification is determined based on the data classification of the similar data in the data model, and the business data is classified into the target data classification; The specific method in which the classification module searches for similar data corresponding to the business data in the data model according to a preset search method is: mapping the business data and the data in the data model to data vectors in a data vector space respectively; based on the data vectors corresponding to the business data and the data in the data model respectively, filtering out similar data corresponding to the business data from the data in the data model; Among them, the classification module screens out similar data corresponding to the business data from the data in the data model based on the data vectors corresponding to the business data and the data in the data model respectively. The specific method is as follows: determine the current radius according to the historical radius, wherein the historical radius is the radius determined in the process of screening similar data last time, and the current radius is larger than the historical radius; determine the data vector range according to the business data vector and the current radius, wherein the business data vector is the vector corresponding to the business data in the data vector space, and the data vector range is a circular range in the data vector space with the business data vector as the center and the current radius as the radius; determine whether the number of data vectors in the data vector range is greater than the number of data vectors in the historical data vector range, wherein the historical data vector range is a circular range in the data vector space with the business data vector as the center and the historical radius as the radius; when the number of data vectors in the data vector range is not greater than the number of data vectors in the historical data vector range, determine the data corresponding to the data vectors in the data vector range in the data model as similar data corresponding to the business data.

6. A computer device, characterized in that: The computer device comprises: A memory storing executable program code; a processor connected to the memory; The processor calls the executable program code stored in the memory to execute the data classification method based on character matching as described in any one of claims 1-4.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the data classification method based on character matching as described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Medicine instruction processing method and device

    CN107783950A

  • Service name matching method and device

    CN109408561A

  • Text processing method and device and related equipment

    CN110069631A

  • Data entry method and device, electronic equipment and computer readable storage medium

    CN111522902A

  • Text classification method and device and electronic equipment

    CN111708884A

Cited By

  • Data classification method and device and storage medium

    CN116089679A