Data storage method and device, medium and computing equipment
By performing word segmentation processing and attribute parameter construction on the target data, the automatic establishment of data standards is realized, which solves the problem of low efficiency in establishing data standards in the existing technology and improves efficiency and applicability.
Patent Information
- Application Number
- CN202410744641.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-09-06
AI Technical Summary
The establishment of existing data standards is inefficient and requires a lot of manpower investment. Moreover, existing methods rely on manual judgment and familiarity with data standards, and have limited scope of application.
By segmenting the fields in the target data, determining the subfields, and constructing data elements based on the number and attribute parameters of the subfields, automatic establishment of data standards is achieved and manual participation is reduced.
It improves the efficiency of establishing data standards, reduces manpower investment, has a wider scope of application, can pick up data standards from users' existing metadata, and can be personalized to adapt to different environments.
Smart Images

Figure CN118606471A
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the technical field of data storage, and more specifically, embodiments of the present disclosure relate to a data storage method, apparatus, medium, and computing device. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the present disclosure. No description herein is admitted to be prior art by virtue of its inclusion in this section.
[0003] Data standard management is a very important part of data governance. Since business objects exist in the form of data in information systems, data standard management needs to be based on business and standardize the unified definition and application of business objects in various information systems in the form of standards to enhance the company's capabilities in business collaboration, regulatory compliance, data sharing and openness, data analysis and application, etc.
[0004] Data standard management includes the establishment of data standards. Currently, there are several ways to establish data standards, such as creating new data elements, importing data elements in batches, citing industry templates, and establishing data standards based on metadata. However, creating new data elements, importing data elements in batches, and citing industry templates all require manpower, resulting in low efficiency in establishing data standards. Summary of the invention
[0005] The present disclosure provides a data storage method, apparatus, medium and computing device to solve the problem of low efficiency in establishing data standards.
[0006] In a first aspect of an embodiment of the present disclosure, a data storage method is provided, including: acquiring multiple first fields in target data, and performing word segmentation processing on preset type fields in each of the first fields to obtain multiple subfields corresponding to the preset type fields; determining each first field corresponding to the same subfield as a second field; in response to the number of the second fields being greater than a first preset number, acquiring a first attribute parameter corresponding to the second field; constructing a first data element of the second field according to each of the first attribute parameters, and storing the second field in association with the corresponding first data element.
[0007] In an embodiment of the present disclosure, the acquiring the first attribute parameter corresponding to the second field includes:
[0008] Deduplication is performed on each of the second fields to obtain a plurality of third fields;
[0009] In response to the number of the third fields being greater than a first preset number, a first attribute parameter corresponding to the second field is acquired.
[0010] In another embodiment of the present disclosure, the method further includes:
[0011] In response to the number of the second fields being less than or equal to the first preset number, or the number of the third fields being less than or equal to the first preset number, determining a target distance between every two of the first fields according to a similarity between every two of the first fields;
[0012] Clustering the first fields according to the target distances to obtain multiple clusters of fields, each cluster of fields including multiple first fields;
[0013] Determine a target field in each of the first fields of the plurality of cluster fields, and obtain a second attribute parameter corresponding to the target field;
[0014] According to the second attribute parameter corresponding to the target field, a second data element of the target field is constructed, and the target field and the corresponding second data element are associated and stored.
[0015] In another embodiment of the present disclosure, the process of determining the target distance between two first fields is specifically as follows:
[0016] Determine a word in a preset type field in two of the first fields as a first word;
[0017] Determine a first similarity between the two first fields according to a numerical value corresponding to each first word in the two first fields;
[0018] A target distance between two of the first fields is determined according to a first difference between an upper similarity limit and the first similarity.
[0019] In another embodiment of the present disclosure, determining the target distance between two first fields according to a first difference between a similarity upper limit value and the first similarity includes:
[0020] The first difference is increased by a preset multiple to obtain a target distance between two of the first fields.
[0021] In another embodiment of the present disclosure, the process of determining the target distance between two first fields is specifically as follows:
[0022] In response to the first field including a plurality of types of preset type fields, determining words in two preset type fields of the same type in the first field as second words;
[0023] Determine, according to the numerical value corresponding to each of the second words, a second similarity between two of the first fields in each preset type of field;
[0024] Determining a first distance corresponding to a preset type field of each of the categories according to a second difference between a similarity threshold corresponding to the category and a second similarity;
[0025] A target distance between two first fields is determined according to each of the first distances.
[0026] In another embodiment of the present disclosure, clustering the first fields according to the target distances includes:
[0027] Constructing a distance matrix according to each of the target distances;
[0028] According to the distance matrix, convert each of the first fields into an element point on the target image;
[0029] Determine a reachable distance between the element points, where the reachable distance is used to indicate the distance from one element point to another element point;
[0030] Each element point in the target image is clustered according to each of the reachable distances to obtain multiple cluster fields.
[0031] In another embodiment of the present disclosure, determining the reachable distance between the element points includes:
[0032] In response to one of the two element points being a core point, determining a second distance between the one element point and the other element point being the core point;
[0033] Among the second distance and the preset radius, a larger value is determined as the reachable distance between the element point and the corresponding core point.
[0034] In another embodiment of the present disclosure, the process of determining the core point is as follows:
[0035] Constructing a first circle corresponding to the element point based on a preset radius;
[0036] In response to the number of element points located within the first circle being greater than a second preset number, the element points constructing the first circle are determined as core points.
[0037] In another embodiment of the present disclosure, clustering each element point in the target image according to each reachable distance to obtain multiple cluster fields includes:
[0038] Determine the maximum reachable distance among the reachable distances;
[0039] Determining a distance threshold according to a maximum achievable distance and a similarity threshold of the first field;
[0040] In response to the reachable distance between the two element points being less than the distance threshold, the two element points are determined to be the same cluster field.
[0041] In another embodiment of the present disclosure, determining a target field in each of the first fields of multiple cluster fields includes:
[0042] determining a target number of first fields in each cluster of fields;
[0043] Using a cluster of fields corresponding to a target number greater than a third preset number as a target cluster field;
[0044] A target field is extracted from each first field of the target cluster field.
[0045] In another embodiment of the present disclosure, extracting the target field from each first field of the target cluster field includes:
[0046] Obtain each reachable distance of the element point corresponding to the first field, and construct a second circle corresponding to each reachable distance, where the center of each second circle is the element point corresponding to the first field, and the radius of the second circle is the reachable distance;
[0047] Determining a density corresponding to each of the reachable distances according to the number of element points within the second circle and the area of the second circle;
[0048] Determine a target density corresponding to the first field according to a minimum density, a maximum density and a similarity threshold among the densities;
[0049] The target field is determined in each first field of the target cluster field according to the target density of each first field in the target cluster field.
[0050] In another embodiment of the present disclosure, determining the target field in each first field of the target cluster field according to the target density of each first field in the target cluster field includes:
[0051] The first field corresponding to the target density greater than the preset threshold is determined as the target field.
[0052] In another embodiment of the present disclosure, determining the target field in each first field of the target cluster field according to the target density of each first field in the target cluster field includes:
[0053] According to the target density of each first field in the target cluster field, sorting the first fields in the target cluster field from large to small to obtain a target sorting position of each first field in the target cluster field;
[0054] The first field corresponding to the target sort position before the preset sort position is determined as the target field.
[0055] In another embodiment of the present disclosure, the acquiring of multiple first fields in the target data includes:
[0056] The fields in the target data are converted into a preset format to obtain a plurality of first fields.
[0057] In another embodiment of the present disclosure, before acquiring the plurality of first fields in the target data, the method further includes:
[0058] Determine the target database for the data to be pulled;
[0059] Acquire data from the target database as target data.
[0060] In a second aspect of the embodiments of the present disclosure, there is provided a data storage device, comprising:
[0061] A first acquisition module is used to acquire multiple first fields in the target data, and perform word segmentation processing on a preset type field in each of the first fields to obtain multiple subfields corresponding to the preset type field;
[0062] A determination module, used for determining each first field corresponding to the same subfield as a second field;
[0063] A second acquisition module, configured to acquire a first attribute parameter corresponding to the second field in response to the number of the second fields being greater than a first preset number;
[0064] A construction module is used to construct the first data element of the second field according to each of the first attribute parameters, and associate the second field with the corresponding first data element for storage.
[0065] In a third aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method described above is implemented.
[0066] In a fourth aspect of the embodiments of the present disclosure, a computing device is provided, including:
[0067] at least one processor;
[0068] and a memory communicatively coupled to the at least one processor;
[0069] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the computing device to perform the method as described above.
[0070] According to the data storage method, apparatus, medium and computing device of the embodiment of the present disclosure, by performing word segmentation processing on the preset type fields in each first field in the target data, subfields are obtained, and then each first field with the same subfield is determined as the second field. If the number of second fields is greater than the preset number, data elements are constructed through the attribute parameters of the second field to realize automatic establishment of data standards, without the need for manual participation in the establishment of data standards, thereby improving the efficiency of establishing data standards. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:
[0072] Figure 1 The following schematically shows an application scenario of the data storage method according to an embodiment of the present disclosure;
[0073] Figure 2 The flowchart according to an embodiment of the present disclosure is schematically shown;
[0074] Figure 3 The flowchart according to another embodiment of the present disclosure is schematically shown;
[0075] Figure 4 Schematically shows a flow chart according to another embodiment of the present disclosure;
[0076] Figure 5 The flowchart according to another embodiment of the present disclosure is schematically shown;
[0077] Figure 6 Schematically shows a flow chart according to another embodiment of the present disclosure;
[0078] Figure 7 The flowchart according to an embodiment of the present disclosure is schematically shown;
[0079] Figure 8 An illustrative schematic diagram of density direct, density reachable, and density adjacent is shown exemplarily;
[0080] Fig. 9 A schematic diagram of element points in a target image is exemplarily shown;
[0081] Fig.10 The schematic diagram of clustering of element points in the target remainder is shown as an example;
[0082] Fig.11 The flowchart according to another embodiment of the present disclosure is schematically shown;
[0083] Fig.12 Schematically shows a flow chart according to another embodiment of the present disclosure;
[0084] Fig.13 A schematic diagram schematically shows a program product provided according to an embodiment of the present disclosure;
[0085] Fig.14 The structure diagram of the data storage device provided according to the embodiment of the present disclosure is schematically shown;
[0086] Fig.15 The schematic diagram shows the structure of a computing device provided according to an embodiment of the present disclosure.
[0087] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0088] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0089] Those skilled in the art will appreciate that the embodiments of the present disclosure may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0090] According to an embodiment of the present disclosure, a data storage method, apparatus, medium and computing device are proposed.
[0091] In addition, any number of elements in the drawings is for illustration and not limitation, and any naming is only for distinction and does not have any limiting meaning.
[0092] In addition, the data involved in the present disclosure may be data authorized by the user or fully authorized by all parties, and the collection, dissemination, and use of the data shall comply with the requirements of relevant laws and regulations. The implementation methods / examples of the present disclosure may be combined with each other.
[0093] The principle and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure. SUMMARY OF THE INVENTION
[0095] Data standard management is a very important part of data governance. Since business objects exist in the form of data in information systems, data standard management needs to be based on business and standardize the unified definition and application of business objects in various information systems in the form of standards to enhance the company's capabilities in business collaboration, regulatory compliance, data sharing and openness, data analysis and application, etc.
[0096] Data standard management includes the establishment of data standards. Currently, there are several ways to establish data standards: creating new data elements, importing data elements in batches, citing industry templates, and establishing data standards based on metadata. The following describes each establishment method.
[0097] 1. Create a new data element
[0098] Creating a new data element refers to manually creating a data element. Manually creating a new data element means filling in the basic information of the data element on the new data element page of data standard management. The basic information includes name, definition, representation class attributes, association class attributes, management class attributes and additional class attributes. In addition, the basic information also includes the verification rules and security level attached to the data element. Manually creating a new data element requires a lot of manpower.
[0099] 2. Import data elements in batches
[0100] Importing data elements in batches is more suitable for migrating data standards in different environments. While supporting the batch import function, there is also a batch export function. Data elements exported from one environment can be imported into other environments to achieve cross-environment migration of data standards. The only difference between importing data elements in batches and manually creating new data elements is that the operation objects are different. The batch import method operates the data software and then executes the import, while the manual creation of new data elements is directly created on the page.
[0101] If the creator of the batch-imported data element is familiar with the data standards of the industry in which the data is located, and understands the overall function and usage path of data standard management, then the data standards established by the batch-imported data element will be very accurate; on the contrary, if the creator is not familiar with the industry data standards, then it is impossible to extract the appropriate data standards. Therefore, the batch-imported data element is more dependent on the creator's familiarity with and research on the industry data standards.
[0102] In addition, even if the builder is familiar with the industry's data standards and has sufficient understanding of data standards management, it will still be a lot of work for the builder to establish a complete set of data standards, which will consume a lot of time and energy.
[0103] 3. Reference industry templates
[0104] In order to make up for the low efficiency and long cycle faced by establishing standards by manually creating new data elements and importing data elements in batches, industry templates are used to help users quickly implement the process of establishing data standards.
[0105] The key to importing standards with one click through industry templates is to identify and filter standards. Usually, multiple industry templates are provided, involving different industries. At this time, you need to find the template of the industry for which you need to establish data standards, and determine whether the template is applicable. If applicable, you can reference the industry template. The display form of an industry template is usually also a collection of data elements, but the data elements still exist in the template, rather than being used directly.
[0106] Industry templates may not be applicable as a whole, so after referencing, additional processing is required, such as deleting unnecessary data elements, adding necessary data elements, and modifying some data elements, so that the entire set of data standards is more adaptable to the current situation.
[0107] Data standards can be quickly established by importing industry templates, but this method relies heavily on the industry templates built into the data standard management, which means that the range of selectable industries may not be comprehensive, and many industries may not have relevant industry standards. Even if there are, the data standard management may not provide the corresponding industry templates.
[0108] In addition, even if there are corresponding industry templates, different individuals in the same industry will have different understandings of data standards. Therefore, certain personalized adjustments are required, such as deleting, supplementing, modifying and adapting the data elements imported by the template, which requires a lot of manpower.
[0109] 4. Establish data standards based on metadata for duplicate checks
[0110] Picking up data standards from metadata is a relatively new way to establish data standards. Compared with manually creating new data elements and batch importing data elements, it does not need to create data elements one by one, shortening the cycle of establishing data standards and saving manpower for establishing standards; compared with importing industry templates, it supports a wider range and does not need to select specific industry information. At the same time, it outputs personalized data standards, which can become formal data standards after a small amount of adjustment and information supplementation.
[0111] The method of establishing standards from metadata based on duplicate checking will summarize and count the field information in the data table in the metadata, and if the number of repetitions of certain data reaches a threshold, the data will be mapped into standard information. Based on the obtained output, certain adjustments and supplements can be made to complete the establishment of standards.
[0112] Although the method based on repeated inspection can greatly reduce the cost of establishing standards for users and summarize the standards in accordance with the actual situation of users, there are still some problems:
[0113] First, the standard established through repeated checks is sensitive to the set parameters, such as the duplicate threshold, etc. If the setting is high, the overall output standard completeness is low (i.e., the number of data elements picked up is insufficient); if the setting is low, in extreme cases, there will be duplicate picking, which may expand the scope of the standard and increase the difficulty of manual screening.
[0114] Secondly, duplicate checking cannot completely pick up the standard. Duplicate checking has its limitations. In theory, there will be complete duplications, but in most cases, they are similar but not duplicated. The duplicate checking method cannot identify this situation, and therefore will miss a lot of potential data elements, that is, the scope of the established standard may be too small. In many cases, users are still required to make a lot of supplements.
[0115] Based on the above technical solutions, the inventors of the present disclosure discovered that the above data standard establishment methods all require a large amount of manpower, resulting in low efficiency in establishing data standards.
[0116] The inventors of the present disclosure therefore came up with the idea of performing word segmentation processing on the preset type fields in each first field in the target data to obtain subfields, and then determining each first field with the same subfield as the second field. If the number of second fields is greater than the preset number, the data element is constructed through the attribute parameters of the second field to realize the automatic establishment of data standards, without the need for manual participation in the establishment of data standards, thereby improving the efficiency of establishing data standards.
[0117] It should be noted that data standard management refers to the platform or product that associates data standards. Data standards refer to: normative constraints that ensure the consistency and accuracy of internal and external use and exchange of data. Specifically, when annotating data, a set of unified specifications are defined for the naming, data type, length, business meaning, calculation caliber, and department of affiliation of the data to ensure the unified understanding of the data and the consistency of data definition and use by various business systems. A data element is a data unit that describes the definition, identification, representation, and allowed values of a set of attributes. A data element is a component of a data standard, and a set of data elements is an important part of a data standard.
[0118] Application Scenario Overview
[0119] First reference Figure 1 , Figure 1Schematic diagram of an application scenario of the data storage method of the embodiment of the present disclosure. The data storage device 100 obtains target data, which may be metadata, and the target data may be obtained from a database 200. The data storage device 100 determines each first field in the target data, and performs word segmentation processing on the preset type field in each first field to obtain a plurality of subfields corresponding to the preset type field. The data storage device 100 then uses each first field where the same subfield is located as a second field. If the number of second fields is greater than the preset number, a data element of the second field is constructed based on the attribute parameters of each second field, and then the data element is associated with the second field and stored, thereby realizing the establishment of a data standard.
[0120] Exemplary Methods
[0121] Combine the following Figure 1 For application scenarios, refer to Figure 2-Figure 12 To describe the data storage method according to the exemplary embodiment of the present disclosure. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principle of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0122] Reference Figure 2 , Figure 2 The following is a flow chart showing an exemplary embodiment of a data storage method according to an embodiment of the present disclosure. The data storage method includes:
[0123] Step S201, obtaining multiple first fields in the target data, and performing word segmentation processing on a preset type field in each first field to obtain multiple subfields corresponding to the preset type field.
[0124] In this embodiment, the execution subject is a data storage device. For the convenience of description, the device is used to refer to the data storage device. The device can be any device with data processing capabilities, such as a database, a computer or a server.
[0125] The device obtains target data, the target data may be metadata, and the metadata may be obtained from a database.
[0126] Metadata includes metadata of data sources, metadata of data processing, metadata of data warehouses or data subject libraries, metadata of data application layers, and metadata of data interface services. Metadata can also be divided into three categories according to their use: technical metadata, business metadata, and management metadata.
[0127] Technical metadata includes: library table structure, field constraints, data model, ETL (Extract-Transform-Load, which means the process of data extraction, data transformation and data loading) program, SQL program, data quality monitoring and other metadata.
[0128] Business metadata includes: business indicators, business codes, business terms and other metadata.
[0129] Management metadata includes: data owner metadata, data governance responsibility metadata, and data security level metadata.
[0130] The metadata may be any one of the above three types of metadata. This embodiment takes technical metadata as an example to illustrate the solution. Technical metadata includes information such as data source, database, data, and field.
[0131] The data source refers to the source of the data, the path used to connect to the database server, and authentication.
[0132] Database refers to the relational database used in daily life to store data.
[0133] A data table refers to a table in a relational database, which consists of a table name, a character set, and multiple fields.
[0134] Fields belong to the data table and include field name, field notes, whether it is required, and field type.
[0135] After obtaining the target data, the device extracts each field in the target data as the first field. Specifically, the device extracts a data table from the target data, and then obtains each first field from the data table. Further, in order to facilitate the calculation of the device, the device converts the fields in the target data into a preset format to obtain multiple first fields, that is, converts each field in the data table into a unified format. The preset format can be any format.
[0136] In addition, the user can select a pickup range, which is based on the database granularity, that is, the selected pickup range is a certain database. The device obtains the pickup range input by the user, and determines the database from which data needs to be pulled based on the pickup range. The database is defined as the target database, that is, the device determines the target database from which data is to be pulled, and then obtains data from the target database as the target data.
[0137] The first field contains more information, such as physical attributes such as name, remarks, encoding format, and label, that is, the first field includes at least one of the name, remarks, encoding format, and label. The device performs word segmentation on the preset type field in the first field, and the preset type field is at least one of the name field, remarks field, encoding format field, and label field. Word segmentation refers to segmenting the sentence represented by the field to obtain multiple phrases, and the phrase can be a word or a term. When the preset type field is non-text, the preset type field is segmented by underscore or camel case.
[0138] After the preset type field is segmented, multiple phrases corresponding to the preset type field are obtained, and each phrase is used as a subfield, that is, the device can obtain multiple subfields corresponding to the preset type field. For example, if the preset type field is a name field, the name field in each first field is segmented to obtain all subfields under the name field.
[0139] Step S202: determine each first field corresponding to the same subfield as a second field.
[0140] After obtaining each subfield, the device determines the same subfield. Since the subfield is a partial field in the preset type field, and the preset type field is a partial field in the first field, the subfield is also a partial field in the first field. After determining the same subfield, the device determines each first field to which the same subfield belongs as the second field. For example, if the subfield is A, and each first field containing A includes the first field a, the first field b, and the first field c, then the first field a, the first field b, and the first field c are all determined as the second field.
[0141] It should be noted that there will be multiple groups of identical subfields, and the device needs to determine the first field with a high degree of subfield repetition as the second field. Exemplarily, assuming that the first field includes 4 sub-subfields, the first field is the first field with a high degree of subfield repetition, and the first field can be used as the second field. It can be understood that if the ratio of the number of repeated subfields in the first field to the total number of subfields in the first field is greater than the first preset ratio, the first field is determined to be the second field. A repeated subfield refers to a field that is included in other fields. For example, the first field 1 includes subfield 1, and the first field 2 also includes subfield 1. Subfield 1 is a repeated subfield in the first field 1 and the second field 2.
[0142] Step S203: in response to the number of the second fields being greater than the first preset number, obtaining a first attribute parameter corresponding to the second field.
[0143] After determining each second field, the device counts the number of the second fields and determines whether the number of the second fields is greater than a first preset number. The first preset number is a repetition threshold, which can be any composite value, and the repetition threshold is determined by the number of the first fields. The larger the number of the first fields, the larger the repetition threshold.
[0144] When the number of second fields is greater than the first preset number, a data element can be established through the second field, and the device obtains the attribute parameter of the second field, which is defined as the first attribute parameter. The first attribute parameter is the above-mentioned physical attribute. It should be noted that since there are multiple second fields, the second field for which the attribute parameter needs to be obtained can be any one of the second fields, or it can be a second field with a high degree of subfield repetition. The second field with a high degree of subfield repetition means that the ratio of the number of repeated subfields in the second field to the total number of subfields in the second field is greater than the second preset ratio.
[0145] Step S204: construct the first data element of the second field according to each first attribute parameter, and associate the second field with the corresponding first data element and store them.
[0146] After obtaining each first attribute parameter, each first attribute parameter is converted into a data element, so that the data element converted by each first attribute parameter constitutes a first data element, and then the first data element is associated with the second field and stored, that is, the first data element is persistently stored.
[0147] It should be noted that in this embodiment, by segmenting the fields, data elements are established based on the smaller granularity of subfields, that is, data elements are constructed from a smaller granularity to avoid missing potential data elements, thereby avoiding users from supplementing the missed data elements. In addition, the repetition threshold is determined based on the number of the first field, so that the repetition threshold setting is more reasonable.
[0148] In this embodiment, the preset type fields in each first field in the target data are segmented to obtain subfields, and then the first fields with the same subfields are determined as second fields. If the number of second fields is greater than the preset number, data elements are constructed through the attribute parameters of the second fields to realize automatic establishment of data standards. There is no need for manual participation in the establishment of data standards, which improves the efficiency of establishing data standards.
[0149] Reference Figure 3 , Figure 3 The schematic diagram of another embodiment of the data storage method according to the present disclosure is shown as an example. Figure 2 In the illustrated embodiment, step S203 includes:
[0150] Step S301, deduplicate each second field to obtain multiple third fields.
[0151] In this embodiment, after obtaining multiple second fields, it is necessary to perform full duplication detection on each second field in turn to remove the repeated second fields, that is, to deduplicate each second field. For example, each second field includes: "transaction type", "transaction category", "transaction commodity" and "transaction category". "Transaction category" is repeated, so one "transaction category" needs to be removed. Each second field after deduplication is determined as the third field.
[0152] Step S302: in response to the number of the third fields being greater than the first preset number, obtaining a first attribute parameter corresponding to the second field.
[0153] After determining each third field, the device determines the number of each third field and determines whether the number of the third fields is greater than the first preset number. If the number of the third fields is greater than the first preset number, the first attribute parameter corresponding to the second field is obtained.
[0154] In this embodiment, the device deduplicates each second field to avoid repeated fields increasing the number of second fields, thereby accurately determining whether the second dictionary can construct a data element.
[0155] Reference Figure 4 , Figure 4 A schematic diagram of a process flow of another embodiment of a data storage method provided according to an embodiment of the present disclosure is exemplarily shown. Figure 2 or Figure 3 In the illustrated embodiment, after step 202 or 301, the following further includes:
[0156] Step S401 , in response to the number of second fields being less than or equal to the first preset number, or the number of third fields being less than or equal to the first preset number, determining a target distance between every two first fields according to a similarity between every two first fields.
[0157] In this embodiment, when the number of second fields is less than or equal to the first preset number, it can be determined that each first field does not have a second field with a high degree of field repetition. Alternatively, when the number of second fields is greater than the first preset number, but the number of third fields is less than or equal to the first preset number, it can be determined that each first field does not have a second field with a high degree of field repetition.
[0158] In order to successfully establish the data standard, it is necessary to adopt other methods to construct the data element. In this regard, the device calculates the similarity between every two first fields, and thus determines the distance between the two first fields based on the similarity between the two first fields.
[0159] Exemplarily, a feature vector corresponding to each first field is established, and based on the feature vector between two first fields, the cosine similarity between the two first fields is calculated. The distance between the two first fields can be obtained by subtracting the cosine similarity from 1, which is used as the target distance.
[0160] Step S402: clustering the first fields according to the target distances to obtain multiple cluster fields, each cluster field including multiple first fields.
[0161] Every two first fields have a target distance, and the number of first fields is more than 2, so there will be multiple target distances. The device performs distance calculation on each first field by the target distance, thereby obtaining multiple clusters of fields, and each cluster of fields includes multiple similar first fields.
[0162] Exemplarily, determine whether a target distance is less than a preset distance. If the target distance is less than the preset distance, both first fields corresponding to the target distance are determined as target fields. The device then obtains the target distance between the target field and other first fields. If the target distance is less than the preset distance, the other first fields are determined as target fields again. Repeat the above steps to find all target fields, and all target fields constitute a cluster. For example, the first field 1, the first field 2, the first field 3, the first field 4 and the first field 5, the target distance between the first field 1 and the second field 1, and the target distance between the first field 1 and the first field 4 are all less than the preset distance. The first field 1, the first field 2 and the first field 4 are divided into a cluster, and the target distance between the first field 2 and the first field 3 is less than the target distance, then the first field 1, the first field 2, the first field 3 and the first field 4 are divided into a cluster.
[0163] Step S403: determine a target field in each first field of the multiple cluster fields, and obtain a second attribute parameter corresponding to the target field.
[0164] After the device determines multiple clusters of fields, it determines the target field in each first field in each cluster of fields, that is, each cluster of fields has a target field. The device obtains the second attribute parameter corresponding to the target field, and the second attribute parameter is the physical attribute of the field. The target field can be any field in each first field of a cluster of fields, or it can be the first field with the highest field repetition in each first field of a cluster of fields.
[0165] Step S404: construct a second data element of the target field according to the second attribute parameter corresponding to the target field, and associate the target field with the corresponding second data element and store them.
[0166] After obtaining the target field, the device constructs a second data element of the target field based on a second attribute parameter corresponding to the target field, thereby associating and storing the target field with the corresponding second data element to complete the construction of the data standard.
[0167] It should be noted that, for the convenience of description, Figure 4 The flowchart shown in FIG. 4 places step S401 after step S202 , but step S401 may also occur after step S301 .
[0168] In this embodiment, when the number of second fields is less than the first preset number or the number of third fields is less than the first preset number, a data element is constructed by the target distance between every two first fields to ensure that the data standard is established.
[0169] Reference Figure 5 , Figure 5 A schematic diagram of a process flow of another embodiment of a data storage method provided according to an embodiment of the present disclosure is shown exemplarily. Figure 4 In the embodiment shown in , step S401 includes:
[0170] Step S501, determining a word in a preset type field in two first fields as a first word.
[0171] In this embodiment, the preset type field may be a remark field or a name field, and the following description is based on the remark field. The remark field may be text or non-text, and the preset type field may be divided into multiple words regardless of whether it is non-text or text.
[0172] The device determines the words in the preset type fields in the two first fields as the first words. For example, the preset type field is a remark field, and the remark field A in one first field is: Today's weather is really good, and the remark field B in the other first field is: Today's weather is good, then "today", "day", "air", "real", "good", "no" and "wrong" are all used as the first words.
[0173] Step S502: determining a first similarity between two first fields according to a numerical value corresponding to each first word in the two first fields.
[0174] After determining each first word, the device needs to determine the numerical value corresponding to each first word in the first field, and the numerical value can be the number of times each first word appears in the first field. For example, the remark field A is: "The weather is really good today", and the remark field B is: "The weather is good today", then the number of times each first word appears in the remark field A is [today = 1, day = 2, weather = 1, true = 1, good = 1, no = 0, wrong = 0], and the number of times each first word appears in the remark field B is [today = 1, day = 2, weather = 1, true = 0, good = 1, no = 1, wrong = 1]. Substitute the number of times each first word appears in the two remark fields into the following formula:
[0175]
[0176] Among them, X i is the number of times the first word i appears in the remark field A, Y i is the number of times the first word i appears in the remark field B, and cos(θ) is the first similarity.
[0177] Step S503: determining a target distance between two first fields according to a first difference between an upper similarity limit value and the first similarity.
[0178] After determining the first similarity, a target distance between the two first fields is determined based on a first difference between the similarity upper limit value and the first similarity. Exemplarily, if the similarity upper limit value is 1, the target distance is 1 minus the first similarity.
[0179] It should be noted that the above description is based on text. If the remark field is non-text, for example, the remark field is: original-transactionType, then the first words are original, -transaction, and Type. It can be understood that no matter whether the remark field is text or non-text, the scheme provided in this embodiment can be used to calculate the similarity between two first fields.
[0180] Furthermore, in order to make the calculated target distance more significant and facilitate subsequent calculations, the distance may be amplified. For example, the first difference is increased by a preset multiple to obtain the target distance between the two first fields. The preset multiple may be any composite value, for example, the preset multiple is 100.
[0181] Reference Figure 6 , Figure 6 The schematic diagram of the process of another embodiment of the data storage method provided in the embodiment of the present disclosure is exemplarily shown. Figure 4 In the embodiment shown in , step S401 includes:
[0182] Step S601, in response to the first field including multiple types of preset type fields, determining words in the same type of preset type fields of two first fields as second words.
[0183] In this embodiment, the first field includes multiple types of preset type fields, for example, the first field includes a remark field and a name field. If the first field includes multiple preset type fields, it can be determined that the target distance between two first fields is calculated by distances in multiple dimensions, and the distance in each dimension corresponds to a field corresponding to a preset type field.
[0184] To this end, the device needs to calculate the distance corresponding to each preset type field. Specifically, the device determines the words in the same type of preset type fields of the two first fields as the second word, and the determination process of the second word is the same as the determination process of the first word, which will not be repeated here.
[0185] Step S602: determining the second similarity between the two first fields in each preset type of field according to the numerical value corresponding to each second word.
[0186] Each second word corresponds to a numerical value, which refers to the number of times the second word appears in the preset type field. The device determines the second similarity of the two first fields on each preset type field based on the numerical value corresponding to each second word. For example, if the preset type field is a remark field, the second similarity between the two first fields is determined based on the number of times the second word appears in the remark field. The process of determining the second similarity is the same as the process of determining the first similarity mentioned above, and will not be repeated here. The process of determining the second similarity on other preset type fields (non-remark fields) is the same as the process of determining the first similarity.
[0187] Step S603: determining a first distance corresponding to the preset type field of each category according to a second difference between the similarity threshold corresponding to the category and the second similarity.
[0188] Different types of preset type fields have corresponding similarity thresholds, and the device calculates the second difference between the similarity threshold of a type and the second similarity of the type, and can determine the first distance corresponding to the preset type field of the type based on the second difference. In one example, the second difference is used as the first distance; in another example, the second difference is increased by a preset multiple to obtain the first distance. In this way, the device can obtain multiple first distances.
[0189] Step S604: determining a target distance between two first fields according to each first distance.
[0190] After obtaining each first distance, the device can determine the target distance between the two first fields based on each first distance.
[0191] Exemplarily, the square of each first distance is determined first, and the squares of the first distances are added together to obtain a square sum, and the square root of the square sum can be used to obtain the target distance.
[0192] In this embodiment, when the first field includes multiple types of preset type fields, the target distance between the two first fields is accurately determined based on the first distance between the two first fields on each type of preset type field. In addition, the types of preset type fields can be adaptively expanded, and the similarity between the two first fields can be accurately determined through more types of preset type fields.
[0193] Reference Figure 7 , Figure 7 The schematic diagram of the process of an embodiment of the data storage method provided by the present disclosure is exemplarily shown. Figures 4 to 6 In any of the embodiments shown in , step S402 includes:
[0194] Step S701, constructing a distance matrix according to each target distance.
[0195] In this embodiment, clustering calculation is a kind of unsupervised learning, which is essentially to classify elements close to each other in space into the same cluster. In actual operation, there is no need to place the elements in space, and only a distance matrix between the elements is needed to perform distance calculation. In this regard, each first field can be regarded as an element, and the device constructs each target distance as a distance matrix to facilitate clustering of each first field.
[0196] Step S702: convert each first field into an element point on the target image according to the distance matrix.
[0197] After obtaining the distance matrix, the device inputs the distance matrix into the point sorting model, and the point sorting model outputs the reachable distance of each element (first field) and the element sequence. The element sequence can be the sequence number of the element. The reachable distance is explained below. The point sorting model can be obtained by the OPTICS (point sorting) clustering algorithm.
[0198] Sorting points is a type of clustering that involves:
[0199] ∈-neighborhood: for x i ∈D, whose ∈-domain contains the sample set D and x i The distance between the subsamples is not greater than ∈. That is, N∈={(x j )∈D|distance(x i , x j )≦∈}, the number of this sub-sample set is marked as |N ∈ =(x j)|. ∈-neighborhood is a set.
[0200] Core object: For any sample x j ∈D, if ∈-neighborhood corresponds to N ∈ =(x j ) contains at least MinPts samples, that is, |N ∈ =(x j )|≧MinPts, then x j Is the core object.
[0201] Density direct access: If x i Located at x j ∈-neighborhood, and x j is a core object, then x i By x j Density direct.
[0202] Density reachable: For all points in the same neighborhood, two points can be connected through the center, which is density reachable. Therefore, it can be understood that the two points in this circle except the center are density reachable.
[0203] Density connected: for x i and x j , if there is a core object sample x k , so that x i and x j All by x k is reachable, then x i and x j Density connected.
[0204] Reference Figure 8 , density direct, density reachable, and density adjacent are explained. Assuming X1 is the core object, then X1 and X2 are density direct, X1 and X3 are density reachable, and X3 and X4 are density reachable. Density connected means that two edge nodes are far apart, and the distances of density direct and density reachable are relatively close.
[0205] After obtaining the reachable distance and element sequence of the first field, the device uses the reachable distance as the ordinate and the element sequence as the abscissa to convert the first field into a point on the target image, which is the element point. Fig. 9 , Fig. 9 is a schematic diagram of the target image. Each point on the target image is an element point.
[0206] Step S703: determine the reachable distance between element points, where the reachable distance is used to indicate the distance from one element point to another element point.
[0207] After converting each first field into an element point, the device obtains the reachable distance between the element points. The reachable distance is the reachable distance output by the above-mentioned point sorting model, which refers to the distance from one element point to another element point.
[0208] Furthermore, when one of the two element points corresponding to the reachable distance is a core point, which is the core object mentioned above, the reachable distance needs to be obtained by other calculation methods.
[0209] Specifically, the core distance and reachable distance are introduced in the clustering algorithm. Core distance: For a sample x∈X, for a given ∈ and MinPts, the minimum neighborhood radius that makes x a core point is called the core distance of x, which is expressed as: Represents the set N ∈ The node in (x) that is the i-th neighbor of node x, such as N ∈ The core distance of the node closest to x in (x) is expressed as: cd(x) is the core distance.
[0210] Reachable distance: Let x, y∈X. For a given ∈ and MinPts, the reachable distance of y with respect to x is defined as:
[0211] Among them, rd(y,x) is the reachable distance.
[0212] In particular, when x is the core point, the corresponding parameters are ∈ and MinPts, which can be understood as follows: rd(y,x)=min{η:y∈N ∈ (x) and |N ∈ (x)|≧MinPts}. That is, rd(y,x) represents the minimum neighborhood radius that makes x a core point and y can be directly density-reachable from x and form a body. It can be understood that each element point has two attributes, one is the reachable distance and the other is the core distance.
[0213] Specifically, the device determines the distance between an element point and another element point as a core point, and the distance is defined as a second distance. The second distance can be obtained by the coordinates of the two element points in the target image. The element point is a core point, and |N∈(x)|≧MinPts indicates that the element point is a core point. A circle with a preset radius will be constructed with the core point as the center. The preset radius is the core distance of the element point. For details, refer to Figure 8The device compares the second distance with the preset radius and uses the larger value as the reachable distance, that is, the larger value between the second radius and the preset radius is determined as the reachable distance between the element point and the core point. The preset radius is d(x, y) above, and the second distance is cd(x) in the above reachable distance formula.
[0214] It should be noted that each element point needs to determine whether it can be used as a core point. In this regard, the device constructs a first circle corresponding to the element point based on a preset radius, and the element point is used as the center of the first circle. The device obtains the number of element points in the first circle. If the number is greater than a second preset number, the element point that constructs the first circle is used as a core point. The second preset number can be the above-mentioned MinPts.
[0215] Step S704: clustering each element point in the target image according to each reachable distance to obtain multiple cluster fields.
[0216] After obtaining each reachable distance, each element point in each target image is clustered to obtain a multi-cluster field.
[0217] For example, in each reachable distance, the distance less than the distance threshold is determined as the target reachable distance. The two element points corresponding to the target reachable distance are first used as an initial cluster. If there are the same element points in the two initial clusters, one cluster is merged. In this way, a multi-cluster field can be obtained.
[0218] It should be noted that the distance threshold can be a default value, and can also be calculated based on the reachable distance. Specifically, the device determines the maximum reachable distance among various reachable distances, and determines the distance threshold based on the maximum reachable distance and the similarity threshold of the first field. When the reachable distance between two element points is less than the distance threshold, the two element points are determined to be the same cluster field. For example, the distance threshold R = (1-s) * MaxR, s is the similarity threshold, MaxR is the maximum reachable distance, and the similarity threshold is a set value. Refer to Fig.10 , Fig.10 1010 is a cluster of fields, 1020 is a cluster of fields, and 1030 is a cluster of fields.
[0219] In this embodiment, the device constructs a distance matrix based on each target distance, thereby converting each first field into an element point on the target image based on the distance matrix, and accurately clustering each element point based on the reachable distance of the element point to obtain multiple cluster fields.
[0220] Reference Fig.11 , Fig.11 The schematic diagram of another embodiment of the data storage method according to the present disclosure is shown as an example. Figures 4 to 8 In any of the embodiments shown in , step S403 includes:
[0221] Step S1101, determining a target number of first fields in each cluster of fields.
[0222] In this embodiment, the device will obtain multiple cluster fields, each cluster field includes multiple first fields. If the number of first fields included in a cluster field is small, this cluster field is a noise cluster and needs to be removed, that is, there is no need to construct data elements in the first field of the noise cluster.
[0223] To this end, the device determines the number of first fields contained in each cluster of fields, which is defined as the target number.
[0224] Step S1102: taking a cluster field corresponding to a target number greater than a third preset number as a target cluster field.
[0225] Step S1103: extracting a target field from each first field of the target cluster field.
[0226] The device uses a cluster field corresponding to target data greater than the third preset number as the target cluster field, and then extracts the target field from each first field of the target cluster field. Exemplarily, the device can use any first field in the target cluster field as the target field.
[0227] In this embodiment, the device removes a cluster of fields with a smaller number as noise fields to ensure that the constructed data standard is accurate.
[0228] Reference Fig.12 , Fig.12 A schematic diagram of a process flow of another embodiment of a data storage method provided according to an embodiment of the present disclosure is exemplarily shown. Figures 4 to 8 In any of the embodiments shown in , step S1103 includes:
[0229] Step S1201, obtain each reachable distance of the element point corresponding to the first field, and construct a second circle corresponding to each reachable distance, the center of each second circle is the element point corresponding to the first field, and the radius of the second circle is the reachable distance.
[0230] In this embodiment, the device needs to select a target field based on the density of the first fields in each first field of the target cluster.
[0231] In this regard, the device obtains each reachable distance of the element point corresponding to the first field. An element point has a reachable distance with different element points, and thus, an element point has multiple reachable distances. The device constructs a circle with each reachable distance as a radius, that is, constructs a circle corresponding to each reachable distance, and the circle is defined as a second circle. In addition, the center of the second circle is the element point.
[0232] Step S1202: Determine the density corresponding to each reachable distance according to the number of element points in the second circle and the area of the second circle.
[0233] The device determines the density corresponding to the corresponding reachable distance based on the second circle. Specifically, the device determines the number of element points in each second circle, and determines the area of each second circle, and calculates the ratio between the number of element points in the second circle and the area of the second circle, and the ratio is used as the density of the reachable distance corresponding to the second circle.
[0234] Step S1203: Determine the target density corresponding to the first field according to the minimum density, the maximum density and the similarity threshold among the densities.
[0235] The device determines the maximum density and the minimum density among various densities, and determines the target density corresponding to the first field through the maximum density, the minimum density and the similarity threshold.
[0236] Exemplarily, target density D=(maxD-minD)*s+minD, wherein maxD is the maximum density, minD is the minimum density, and s is the similarity threshold.
[0237] Step S1204: determining a target field in each first field of the target cluster field according to the target density of each first field in the target cluster field.
[0238] After determining the target density of each first field, the device determines the target field in each first field of the target cluster field based on the target density of each first field in the target cluster field.
[0239] In one example, the device determines a first field corresponding to a target density greater than a preset threshold as a target field.
[0240] In another example, the device sorts the first fields in the target cluster field from large to small according to the target density of each first field in the target cluster field, obtains the target sort position of each first field in the target cluster field, and the device determines the first fields corresponding to the target sort positions before the preset sort position as the target fields. The preset sort position can be any suitable sort position.
[0241] In this embodiment, the density of the first field is determined by the reachable distances of the first field, and then the field with higher density (target field) is automatically picked out by the density to establish the data standard. In addition, the target field selection + clustering method reduces the sensitivity of the parameters, making the constructed data standard relatively more stable.
[0242] Based on the above embodiments, it can be seen that compared with the solution of manually creating data elements or importing data elements in batches, the present technical solution does not require much user participation and saves a lot of manpower.
[0243] Compared with the solution of importing industry templates, this technical solution has a wider scope of application. Even if there are more industry templates, they still have their limitations. However, this technical solution can pick up data standards from the user's existing metadata, which can achieve more personalized standard formulation, and is more in line with the user's usage habits, without the need for users to mechanically use standards.
[0244] Compared with the standard picking scheme based on repeated checks, this technical scheme is not sensitive to parameters, that is, the user does not need to adjust the parameters too much to get the optimal solution. At the same time, the range of picking results is relatively wider, and the characteristics of the metadata itself can also be adapted. For example, for dense metadata, the results of preliminary density detection will be used, so that the quantity and quality of the picked data standards can be controlled; for sparse metadata, clustering is used for picking, so that data standard information that is not easy to discover can be obtained. In other words, whether it is dense metadata or sparse metadata, data standards can be established with quality and quantity guaranteed.
[0245] Exemplary Media
[0246] After introducing the method of the exemplary embodiment of the present disclosure, next, refer to Fig.13 A storage medium according to an exemplary embodiment of the present disclosure is described.
[0247] refer to Fig.13 As shown, the storage medium 130 stores a program product for implementing the above method according to an embodiment of the present disclosure, which may adopt a portable compact disk read-only memory (CD-ROM) and include computer execution instructions, which are used to enable a computing device to execute the data storage method provided by the present disclosure. However, the program product of the present disclosure is not limited thereto.
[0248] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium, and the readable storage medium may be a computer-readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0249] The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-executable instructions. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium.
[0250] Computer-executable instructions for performing the disclosed operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The computer-executable instructions may be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN).
[0251] Exemplary Devices
[0252] After introducing the medium of the exemplary embodiment of the present disclosure, next, reference is made to Fig.14 A data storage device of an exemplary embodiment is disclosed for illustration, and the data storage device is used to implement a method in any of the above data storage method embodiments, and its implementation principle and technical effect are similar.
[0253] refer to Fig.14 , Fig.14 A schematic diagram of the structure of a data storage device provided according to an embodiment of the present disclosure is schematically shown.
[0254] like Fig.14As shown, the data storage device includes: a first acquisition module 1410, used to acquire multiple first fields in the target data, and perform word segmentation processing on the preset type field in each first field to obtain multiple sub-fields corresponding to the preset type field; a determination module 1420, used to determine each first field corresponding to the same sub-field as a second field; a second acquisition module 1430, used to obtain the first attribute parameter corresponding to the second field in response to the number of second fields being greater than the first preset number; a construction module 1440, used to construct the first data element of the second field according to each first attribute parameter, and associate the second field with the corresponding first data element for storage.
[0255] In one embodiment, the data storage device is specifically used for:
[0256] De-duplicate each second field to obtain multiple third fields;
[0257] In response to the number of the third fields being greater than the first preset number, a first attribute parameter corresponding to the second field is obtained.
[0258] In one embodiment, the data storage device is specifically used for:
[0259] In response to the number of the second fields being less than or equal to the first preset number, or the number of the third fields being less than or equal to the first preset number, determining a target distance between every two first fields according to a similarity between every two first fields;
[0260] Clustering each first field according to each target distance to obtain multiple cluster fields, each cluster field including multiple first fields;
[0261] Determine a target field in each first field of the multiple cluster fields, and obtain a second attribute parameter corresponding to the target field;
[0262] According to the second attribute parameter corresponding to the target field, a second data element of the target field is constructed, and the target field and the corresponding second data element are associated and stored.
[0263] In one embodiment, the data storage device is specifically used for:
[0264] Determine a word in a preset type field in the two first fields as a first word;
[0265] Determine a first similarity between the two first fields according to a numerical value corresponding to each first word in the two first fields;
[0266] A target distance between the two first fields is determined according to a first difference between the similarity upper limit value and the first similarity.
[0267] In one embodiment, the data storage device is specifically used for:
[0268] The first difference is increased by a preset multiple to obtain a target distance between the two first fields.
[0269] In one embodiment, the data storage device is specifically used for:
[0270] In response to the first field including a plurality of types of preset type fields, determining words in the same type of preset type fields of two first fields as second words;
[0271] Determine, according to the numerical value corresponding to each second word, a second similarity between the two first fields on each preset type of field;
[0272] Determining a first distance corresponding to a preset type field of each category according to a second difference between a similarity threshold corresponding to the category and a second similarity;
[0273] According to the respective first distances, a target distance between two first fields is determined.
[0274] In one embodiment, the data storage device is specifically used for:
[0275] Construct a distance matrix based on the distances of each target;
[0276] According to the distance matrix, each first field is converted into an element point on the target image;
[0277] Determine the reachable distance between element points. The reachable distance is used to indicate the distance from one element point to another element point.
[0278] According to each reachable distance, each element point in the target image is clustered to obtain a multi-cluster field.
[0279] In one embodiment, the data storage device is specifically used for:
[0280] In response to one of the two element points being a core point, determining a second distance between the one element point and the other element point being the core point;
[0281] Among the second distance and the preset radius, a larger value is determined as the reachable distance between the element point and the corresponding core point.
[0282] In one embodiment, the data storage device is specifically used for:
[0283] Constructing a first circle corresponding to the element point based on a preset radius;
[0284] In response to the number of element points located within the first circle being greater than a second preset number, the element points constructing the first circle are determined as core points.
[0285] In one embodiment, the data storage device is specifically used for:
[0286] Among various reachable distances, determine the maximum reachable distance;
[0287] Determining a distance threshold according to the maximum achievable distance and a similarity threshold of the first field;
[0288] In response to the reachable distance between the two element points being less than a distance threshold, the two element points are determined to be the same cluster field.
[0289] In one embodiment, the data storage device is specifically used for:
[0290] determining a target number of first fields in each cluster of fields;
[0291] Using a cluster of fields corresponding to a target number greater than a third preset number as a target cluster field;
[0292] The target field is extracted from each first field of the target cluster field.
[0293] In one embodiment, the data storage device is specifically used for:
[0294] Obtain each reachable distance of the element point corresponding to the first field, and construct a second circle corresponding to each reachable distance, where the center of each second circle is the element point corresponding to the first field, and the radius of the second circle is the reachable distance;
[0295] Determine the density corresponding to each reachable distance according to the number of element points in the second circle and the area of the second circle;
[0296] Determine the target density corresponding to the first field according to the minimum density, the maximum density and the similarity threshold among the densities;
[0297] According to the target density of each first field in the target cluster field, a target field is determined in each first field of the target cluster field.
[0298] In one embodiment, the data storage device is specifically used for:
[0299] The first field corresponding to the target density greater than the preset threshold is determined as the target field.
[0300] In one embodiment, the data storage device is specifically used for:
[0301] According to the target density of each first field in the target cluster field, sort the first fields in the target cluster field from large to small to obtain the target sorting position of each first field in the target cluster field;
[0302] The first field corresponding to the target sort position before the preset sort position is determined as the target field.
[0303] In one embodiment, the data storage device is specifically used for:
[0304] The fields in the target data are converted into a preset format to obtain a plurality of first fields.
[0305] In one embodiment, the data storage device is specifically used for:
[0306] Determine the target database for the data to be pulled;
[0307] Get data from the target database as target data.
[0308] Exemplary Computing Devices
[0309] After introducing the method, medium and apparatus of the exemplary embodiments of the present disclosure, next, reference is made to Fig.15 A computing device according to an exemplary embodiment of the present disclosure is described.
[0310] Fig.15 The computing device 150 shown is only an example and should not limit the functionality and scope of use of the embodiments of the present disclosure. Fig.15 As shown, the computing device 150 is in the form of a general computing device. The components of the computing device 150 may include, but are not limited to: at least one processing unit (processor) 1501, at least one storage unit (processor) 1502, and a bus 1503 connecting different system components (including the processing unit 1501 and the storage unit 1502). Among them, at least one storage unit 1502 stores computer-executable instructions; at least one processing unit 1501 includes a processor, and the processor executes the computer-executable instructions to implement the method described above.
[0311] The bus 1503 includes a data bus, a control bus, and an address bus.
[0312] The storage unit 1502 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 15021 and / or a cache memory 15022 , and may further include a readable medium in the form of a non-volatile memory, such as a read-only memory (ROM) 15023 .
[0313] The storage unit 1502 may also include a program / utility 15025 having a set (at least one) of program modules 15024, such program modules 15024 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0314] The computing device 150 may also communicate with one or more external devices 1504 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 1505. In addition, the computing device 150 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1506. Fig.15 As shown, the network adapter 1506 communicates with other modules of the computing device 150 via the bus 1503. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the computing device 150, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0315] It should be noted that although several units / modules or sub-units / modules of the terminal device / server are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules for embodiment.
[0316] In addition, although the operations of the disclosed method are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0317] Although the spirit and principle of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.
Claims
1. A data storage method, It is characterized in that include: Acquire multiple first fields in the target data, and perform word segmentation processing on a preset type field in each of the first fields to obtain multiple subfields corresponding to the preset type field; Determine each first field corresponding to the same subfield as a second field; In response to the number of the second fields being greater than the first preset number, obtaining a first attribute parameter corresponding to the second field; The first data element of the second field is constructed according to each of the first attribute parameters, and the second field is associated with the corresponding first data element and stored.
2. The data storage method according to claim 1, It is characterized in that The obtaining the first attribute parameter corresponding to the second field includes: Deduplication is performed on each of the second fields to obtain a plurality of third fields; In response to the number of the third fields being greater than a first preset number, a first attribute parameter corresponding to the second field is acquired.
3. The data storage method according to claim 1 or 2, It is characterized in that The method further comprises: In response to the number of the second fields being less than or equal to the first preset number, or the number of the third fields being less than or equal to the first preset number, determining a target distance between every two of the first fields according to a similarity between every two of the first fields; Clustering the first fields according to the target distances to obtain multiple clusters of fields, each cluster of fields including multiple first fields; Determine a target field in each of the first fields of the plurality of cluster fields, and obtain a second attribute parameter corresponding to the target field; According to the second attribute parameter corresponding to the target field, a second data element of the target field is constructed, and the target field and the corresponding second data element are associated and stored.
4. The data storage method according to claim 3, It is characterized in that The process of determining the target distance between the two first fields is as follows: Determine a word in a preset type field in two of the first fields as a first word; Determine a first similarity between the two first fields according to a numerical value corresponding to each first word in the two first fields; A target distance between two of the first fields is determined according to a first difference between an upper similarity limit and the first similarity.
5. The data storage method according to claim 4, It is characterized in that The determining, according to a first difference between an upper similarity limit value and the first similarity, a target distance between two first fields includes: The first difference is increased by a preset multiple to obtain a target distance between two of the first fields.
6. The data storage method according to claim 3, It is characterized in that The process of determining the target distance between the two first fields is as follows: In response to the first field including a plurality of types of preset type fields, determining words in two preset type fields of the same type in the first field as second words; Determine, according to the numerical value corresponding to each of the second words, a second similarity between two of the first fields in each preset type of field; Determining a first distance corresponding to a preset type field of each of the categories according to a second difference between a similarity threshold corresponding to the category and a second similarity; A target distance between two first fields is determined according to each of the first distances.
7. The data storage method according to claim 3, It is characterized in that The clustering of the first fields according to the target distances includes: Constructing a distance matrix according to each of the target distances; According to the distance matrix, convert each of the first fields into an element point on the target image; Determine a reachable distance between the element points, where the reachable distance is used to indicate the distance from one element point to another element point; Each element point in the target image is clustered according to each of the reachable distances to obtain multiple cluster fields.
8. A data storage device, It is characterized in that include: A first acquisition module is used to acquire multiple first fields in the target data, and perform word segmentation processing on a preset type field in each of the first fields to obtain multiple subfields corresponding to the preset type field; A determination module, used for determining each first field corresponding to the same subfield as a second field; A second acquisition module, configured to acquire a first attribute parameter corresponding to the second field in response to the number of the second fields being greater than a first preset number; A construction module is used to construct the first data element of the second field according to each of the first attribute parameters, and associate the second field with the corresponding first data element for storage.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 7 is implemented.
10. A computing device, It is characterized in that include: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the computing device to perform the method as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
User community evaluation method, device and equipment
CN111782813A
Data element analysis method and device, electronic device and storage medium
CN112464640A
Data standard generation method and system based on similar clustering and data exploration, and storage medium
CN115238071A
