Field-based multidimensional mapping association method, device and storage medium
By establishing multi-dimensional structure tables and metadata association mappings between heterogeneous systems, the problem of inflexible data mapping templates in the prior art is solved, and the flexibility and scalability of data mapping are achieved.
Patent Information
- Application Number
- CN202111649728.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2041-12-30
AI Technical Summary
When establishing data mapping association relationships between heterogeneous systems, the input data mapping template is not flexible enough, resulting in the corresponding mapping fields being changed or added, requiring the synchronous modification of Excel templates and program codes, which are limited in scalability.
By extracting all fields of each basic data, assembling a multi-dimensional structure table, generating calculation results include assignment information, determining the second field to generate metadata, and establishing an association map between the metadata and the basic data, dynamically adding or deleting the mapping fields.
It realizes the flexibility and scalability of data mapping. Users can dynamically add or delete mapping fields according to actual needs, which is more applicable to a wider range of scenarios.
Smart Images

Figure CN114328534B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a field-based multidimensional mapping association method, device and storage medium. Background Art
[0002] As enterprises develop, more and more enterprises have more than one corresponding system, and the data "islands" between systems are becoming increasingly prominent. In order to open up the data flow and intercommunication between systems, EAI Pro (Enterprise Application IngegrationEAI Pro) was born. When our heterogeneous systems are already operating normally or there are relatively independent data systems between the two systems, we will establish a mapping relationship between the two heterogeneous systems.
[0003] The prior art includes the following mapping establishment methods, such as Figure 1 As shown, including:
[0004] 1. Define the corresponding mapping template in Excel by agreeing on fixed fields, and then parse the Excel template in the program to perform fixed logical operations to clean out the corresponding mapping data;
[0005] 2. Design an Excel-like form in the program interface. Users can directly fill in the corresponding data form on the interface and parse and map the data according to the corresponding fixed business fields. The solution logic is similar to the Excel parsing logic, and the corresponding parsing fields can be defined for parsing.
[0006] Through the above technical solution, the existing technology can realize data mapping synchronization between two running systems, but the input data mapping template is not flexible enough. If there are changes or additions to the corresponding mapping fields, the Excel template and program code need to be modified synchronously, and the scalability is limited. Summary of the invention
[0007] The embodiment of the present invention provides a field-based multi-dimensional mapping association method, device and storage medium. The corresponding mapping fields can be dynamically added and deleted according to actual needs, and assembled according to the assignment of dimensions. It has strong scalability and is applicable to many scenarios.
[0008] A first aspect of an embodiment of the present invention provides a field-based multi-dimensional mapping association method, comprising:
[0009] Extract all the first fields included in each basic data, and assemble a multi-dimensional structure according to all the first fields included in all the basic data to form a multi-dimensional structure table;
[0010] Generate a calculation result based on the multi-dimensional structure table and all first fields included in each basic data, wherein the calculation result at least includes assignment information;
[0011] Determine at least one second field based on the assignment information in the calculation result, and generate metadata according to all second fields in one calculation result;
[0012] An association mapping is performed between the corresponding metadata and the basic data so that a dependency relationship is established between the metadata and the basic data.
[0013] Optionally, in a possible implementation manner of the first aspect, extracting all first fields included in each basic data, and assembling a multi-dimensional structure according to all first fields included in all basic data to form a multi-dimensional structure table includes:
[0014] Pre-setting a plurality of field templates, and marking the corresponding field template when determining that a first field corresponding to the field template exists in the basic data;
[0015] All marked field templates are counted, and a multi-dimensional structure table is generated according to the dimensions of all counted field templates, wherein each field template has a dimension pre-set corresponding to it.
[0016] Optionally, in a possible implementation of the first aspect, the method further includes:
[0017] Receive dimension configuration data input by a user, and extract dimension information newly added in the dimension configuration data;
[0018] The dimensions in the multi-dimensional structure table at the current moment are updated according to the newly added dimension information in the dimension configuration data.
[0019] Optionally, in a possible implementation manner of the first aspect, a calculation result is generated based on the multidimensional structure table and all first fields included in each basic data, and the calculation result at least includes the assignment information including:
[0020] Extract all the marked field templates corresponding to any basic data, and calculate all the dimension results corresponding to all the marked field templates;
[0021] Generate the assignment information of the corresponding basic data based on the results of all dimensions.
[0022] Optionally, in a possible implementation manner of the first aspect, determining at least one second field based on the assignment information in the calculation result, and generating metadata according to all second fields in one calculation result includes:
[0023] Extracting assignment information corresponding to a basic data, and retrieving at least one second field based on the assignment information;
[0024] All second fields corresponding to one assignment information are counted to generate metadata.
[0025] Optionally, in a possible implementation manner of the first aspect, performing association mapping between corresponding metadata and basic data so as to establish a dependency relationship between the metadata and the basic data includes:
[0026] The metadata and basic data respectively corresponding to the value assignment information are acquired, and the metadata and basic data respectively corresponding to the value assignment information are associated and mapped.
[0027] Optionally, in a possible implementation manner of the first aspect, dimension assignment data of a user is received, where the dimension assignment data adds a corresponding weight value to any dimension;
[0028] The weight values of the dimensions in the multi-dimensional structure table are updated based on the dimension assignment data.
[0029] Optionally, in a possible implementation manner of the first aspect, updating the weight values of the dimensions in the multi-dimensional structure table based on the dimension assignment data includes:
[0030] Extracting a dimension corresponding to the dimension assignment data as a target dimension, wherein the target dimension corresponds to a first weight;
[0031] A dimension corresponding to the target dimension in the multi-dimensional structure table is obtained as a second weight, and the second weight is updated to the first weight.
[0032] A second aspect of an embodiment of the present invention provides a field-based multi-dimensional mapping association device, comprising:
[0033] An extraction module, used for extracting all first fields included in each basic data, and assembling a multi-dimensional structure according to all first fields included in all basic data to form a multi-dimensional structure table;
[0034] A calculation module, used to generate a calculation result based on the multi-dimensional structure table and all first fields included in each basic data, wherein the calculation result at least includes assignment information;
[0035] A determination module, configured to determine at least one second field based on the value assignment information in the calculation result, and generate metadata according to all second fields in a calculation result;
[0036] The mapping module is used to perform association mapping between corresponding metadata and basic data so as to establish a dependency relationship between the metadata and the basic data.
[0037] According to a third aspect of an embodiment of the present invention, a readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, it is used to implement the method of the first aspect of the present invention and various possible designs of the first aspect.
[0038] The present invention provides a field-based multidimensional mapping association method, device and storage medium. During the data mapping process, multidimensional mapping is performed through multiple fields, so there is no correlation between the multiple fields. The corresponding fields can be dynamically added and deleted according to actual needs, and assembled according to the assignment of dimensions, so that the data mapping is more in line with the scenarios required by the user, thereby improving the applicability of the technical solution provided by the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A flow chart of the prior art;
[0040] Figure 2 A flowchart of a first implementation of a field-based multi-dimensional mapping association method;
[0041] Figure 3 A flowchart of a second implementation of a field-based multi-dimensional mapping association method;
[0042] Figure 4 This is a structural diagram of a first implementation of a field-based multi-dimensional mapping association device. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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.
[0044] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein.
[0045] It should be understood that in various embodiments of the present invention, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0046] It should be understood that in the present invention, "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products or apparatuses.
[0047] It should be understood that in the present invention, "plurality" refers to two or more than two. "And / or" is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "Contains A, B and C", "Contains A, B, C" means that A, B, and C are all included, "Contains A, B or C" means that one of A, B, and C is included, and "Contains A, B and / or C" means that any one, any two, or any three of A, B, and C are included.
[0048] It should be understood that in the present invention, "B corresponding to A", "B corresponding to A", "A corresponds to B" or "B corresponds to A" means that B is associated with A and B can be determined based on A. Determining B based on A does not mean determining B based only on A, but B can also be determined based on A and / or other information. A and B match when the similarity between A and B is greater than or equal to a preset threshold.
[0049] Depending on the context, "if" as used herein may be interpreted as "when" or "when" or "in response to determining" or "in response to detecting."
[0050] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0051] Explanation of terms in this invention
[0052] Metadata: used to define the set of fields that need to be mapped, that is, the target fields. In the metadata, you can define multiple target fields that need to be assigned values, or you can set multi-dimensional fields to assign values to the target fields;
[0053] Dependency: Define source data attributes for multi-dimensional fields through dependency. For example, if the metadata is personnel, but personnel have department attributes, then if multi-dimensional definitions are required, it is necessary to rely on department numbers and define and set multi-dimensional dependent attributes. At this time, the required references can be clearly set;
[0054] Reference: Define the field reference data / field in the basic data, that is, refer to the source field that needs to be mapped;
[0055] Multi-dimensional structure table: Assign values to the target data or import them, or reference the data in a pre-defined table structure. As long as the metadata field and the reference table field value are consistent, the value can be automatically assigned.
[0056] The present invention provides a field-based multidimensional mapping association method, combined with Figure 2 and Figure 3 As shown, including:
[0057] Step S110, extract all the first fields included in each basic data, and assemble a multi-dimensional structure according to all the first fields included in all the basic data to form a multi-dimensional structure table. The basic data in the present invention can be regarded as all the data in a database, such as video data, voice data, document data, encoding data, etc. The present invention will extract all the first fields included in each basic data, and a basic data may have multiple first fields. The first field can be the content in the basic data, for example, the basic data is a list table, in which case it will have corresponding names, departments, etc.
[0058] The present invention assembles a multi-dimensional structure according to all the first fields to form a multi-dimensional structure table. When the first field includes a person's name, a department, etc., the corresponding multi-dimensional structure table may have a name dimension, a department dimension, etc.
[0059] Step S120: Generate calculation results based on the multi-dimensional structure table and all first fields included in each basic data, wherein the calculation results at least include assignment information. The technical solution provided by the present invention generates corresponding calculation results for each basic data, wherein the calculation results include corresponding assignment information, and the assignment information can be the assignment dimension required for the corresponding basic data.
[0060] Step S130: determine at least one second field based on the assignment information in the calculation result, and generate metadata according to all second fields in the calculation result. The assignment information corresponds to at least one second field, and the present invention generates metadata according to at least one second field under the guidance of the assignment information.
[0061] Step S140: perform association mapping between the corresponding metadata and the basic data, so that the metadata and the basic data establish a dependency relationship. After obtaining the corresponding metadata, the present invention associates the metadata with the basic data to achieve mapping between the data.
[0062] Through the above technical solution, the present invention adds metadata to each basic data in the form of fields. At this time, the corresponding second field can be increased or decreased. This method effectively breaks the second field into zeros, and the second field can be added or decreased according to the needs of the actual scenario.
[0063] The technical solution provided by the present invention extracts all the first fields included in each basic data, and assembles a multi-dimensional structure according to all the first fields included in all the basic data to form a multi-dimensional structure table, including:
[0064] A plurality of field templates are pre-set, and when it is determined that there is a first field corresponding to the field template in the basic data, the corresponding field template is marked. When determining the dimension, the present invention will first match and mark the first field, and then determine the corresponding dimension. When matching, it can be based on a natural language processing method, that is, calculating the similarity between sentences, and marking when the similarity is greater than a preset value.
[0065] All marked field templates are counted, and a multi-dimensional structure table is generated according to the dimensions of all the counted field templates, wherein each field template has a dimension pre-set corresponding to it. The present invention counts all field templates to obtain corresponding dimensions, and at this time the multi-dimensional structure table has all the dimensions required in the scenario.
[0066] The technical solution provided by the present invention also includes:
[0067] Receive dimension configuration data input by the user, and extract the newly added dimension information in the dimension configuration data. During the data mapping and association process, the user can actively input dimension configuration data according to actual needs, and the dimension configuration data includes the newly added dimension information.
[0068] The dimension in the multi-dimensional structure table at the current moment is updated according to the newly added dimension information in the dimension configuration data. The present invention updates the newly added dimension information in the multi-dimensional structure table.
[0069] In another possible implementation, the dimension configuration data may be to delete a certain dimension information. When the user needs to delete a certain dimension information, he can input the corresponding deletion instruction and the dimension information to be deleted. At this time, the corresponding dimension information will be deleted from the multi-dimensional structure table.
[0070] The technical solution provided by the present invention generates calculation results based on the multi-dimensional structure table and all first fields included in each basic data, and the calculation results at least include assignment information including:
[0071] Extract all the marked field templates corresponding to any basic data, and calculate all the dimension results corresponding to all the marked field templates. The present invention will calculate all the marked field templates to obtain the corresponding dimension results.
[0072] During the calculation process, matching can be performed through a matrix model algorithm. The matrix model algorithm will output corresponding dimensions for the corresponding basic data according to the weight values of each dimension. The dimension results obtained through the matrix model algorithm can be obtained by using an existing matrix model algorithm, whose input can be the first field of the basic data, and the output can be multiple dimensions. The dimensions in the matrix model algorithm have different weights.
[0073] Generate the assignment information of the corresponding basic data based on the results of all dimensions.
[0074] The technical solution provided by the present invention determines at least one second field based on the assignment information in the calculation result, and generates metadata according to all second fields in a calculation result, including:
[0075] Extract the assignment information corresponding to a basic data, and retrieve at least one second field based on the assignment information. The present invention obtains the corresponding second field according to the assignment information.
[0076] All second fields corresponding to one assignment information are counted to generate metadata.
[0077] The technical solution provided by the present invention performs association mapping between corresponding metadata and basic data so as to establish a dependency relationship between the metadata and the basic data, including:
[0078] The metadata and basic data respectively corresponding to the value assignment information are acquired, and the metadata and basic data respectively corresponding to the value assignment information are associated and mapped.
[0079] The technical solution provided by the present invention receives dimension assignment data from a user, and the dimension assignment data adds a corresponding weight value to any dimension. The user can add different weight values to different dimensions according to the actual scenario, so that the dimensions output by the matrix model algorithm during the calculation process have a tendency and conform to the current scenario.
[0080] The weight values of the dimensions in the multi-dimensional structure table are updated based on the dimension assignment data.
[0081] The technical solution provided by the present invention includes updating the weight values of the dimensions in the multi-dimensional structure table based on the dimension assignment data:
[0082] Extracting a dimension corresponding to the dimension assignment data as a target dimension, wherein the target dimension corresponds to a first weight;
[0083] The dimension corresponding to the target dimension in the multi-dimensional structure table is obtained as a second weight, and the second weight is updated to the first weight. Through the above solution, the weights of all dimensions in the multi-dimensional structure table can be updated.
[0084] In order to better implement the field-based multi-dimensional mapping association method provided by the present invention, the technical solution of the present invention also provides a field-based multi-dimensional mapping association device.
[0085] The present invention provides a field-based multi-dimensional mapping association device, such as Figure 4 As shown, including:
[0086] An extraction module, used for extracting all first fields included in each basic data, and assembling a multi-dimensional structure according to all first fields included in all basic data to form a multi-dimensional structure table;
[0087] A calculation module, used to generate a calculation result based on the multi-dimensional structure table and all first fields included in each basic data, wherein the calculation result at least includes assignment information;
[0088] A determination module, configured to determine at least one second field based on the value assignment information in the calculation result, and generate metadata according to all second fields in a calculation result;
[0089] The mapping module is used to perform association mapping between corresponding metadata and basic data so as to establish a dependency relationship between the metadata and the basic data.
[0090] Among them, the readable storage medium can be a computer storage medium or a communication medium. The communication medium includes any medium that facilitates the transmission of a computer program from one place to another. The computer storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer. For example, a readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application-specific integrated circuit (Application Specific Integrated Circuits, abbreviated as: ASIC). In addition, the ASIC can be located in a user device. Of course, the processor and the readable storage medium can also exist in a communication device as discrete components. The readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0091] The present invention also provides a program product, which includes an execution instruction, which is stored in a readable storage medium. At least one processor of a device can read the execution instruction from the readable storage medium, and at least one processor executes the execution instruction so that the device implements the methods provided in the above various embodiments.
[0092] In the above-mentioned terminal or server embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-dimensional mapping association method based on fields, characterized in that: include: Extract all the first fields included in each basic data, and assemble a multi-dimensional structure according to all the first fields included in all the basic data to form a multi-dimensional structure table; Generate calculation results based on the multi-dimensional structure table and all the first fields included in each basic data, wherein the calculation results at least include assignment information; specifically include: extracting all the marked field templates corresponding to any basic data, and calculating all the dimension results corresponding to all the marked field templates; in the calculation process, matching is performed through a matrix model algorithm, and the matrix model algorithm outputs corresponding dimensions for the corresponding basic data according to the weight values of each dimension, wherein the input is the first field of the basic data and the output is multiple dimensions; and the assignment information of the corresponding basic data is generated according to the results of all the dimensions; The dimensions in the matrix model algorithm have different weight values; receiving dimension assignment data from a user, the dimension assignment data adding a corresponding weight value to any dimension; specifically, the user adds different weight values to different dimensions according to actual scenarios, so that the dimensions output by the matrix model algorithm during the calculation process conform to the current scenario; determining at least one second field based on the assignment information in the calculation result, and generating metadata based on all second fields in a calculation result, including: extracting assignment information corresponding to a basic data, and retrieving at least one second field based on the assignment information; and generating metadata by counting all second fields corresponding to all assignment information; An association mapping is performed between the corresponding metadata and the basic data so that a dependency relationship is established between the metadata and the basic data.
2. The field-based multidimensional mapping association method according to claim 1, characterized in that: Extracting all the first fields included in each basic data, and assembling a multi-dimensional structure according to all the first fields included in all the basic data to form a multi-dimensional structure table includes: Pre-setting a plurality of field templates, and marking the corresponding field template when determining that a first field corresponding to the field template exists in the basic data; All marked field templates are counted, and a multi-dimensional structure table is generated according to the dimensions of all counted field templates, wherein each field template has a dimension pre-set corresponding to it.
3. The field-based multidimensional mapping association method according to claim 1, characterized in that: Also includes: Receive dimension configuration data input by a user, and extract dimension information newly added in the dimension configuration data; The dimensions in the multi-dimensional structure table at the current moment are updated according to the newly added dimension information in the dimension configuration data.
4. The field-based multidimensional mapping association method according to claim 1, characterized in that: The corresponding metadata is mapped to the basic data so that the metadata and the basic data establish a dependency relationship, including: The metadata and basic data respectively corresponding to the value assignment information are acquired, and the metadata and basic data respectively corresponding to the value assignment information are associated and mapped.
5. The field-based multidimensional mapping association method according to claim 1, characterized in that: The weight values of the dimensions in the multi-dimensional structure table are updated based on the dimension assignment data.
6. The field-based multidimensional mapping association method according to claim 5, characterized in that: The updating process of the weight values of the dimensions in the multi-dimensional structure table based on the dimension assignment data includes: Extracting a dimension corresponding to the dimension assignment data as a target dimension, wherein the target dimension corresponds to a first weight; A dimension corresponding to the target dimension in the multi-dimensional structure table is obtained as a second weight, and the second weight is updated to the first weight.
7. A field-based multi-dimensional mapping association device, characterized in that: include: An extraction module, used for extracting all first fields included in each basic data, and assembling a multi-dimensional structure according to all first fields included in all basic data to form a multi-dimensional structure table; A calculation module, used to generate a calculation result based on the multi-dimensional structure table and all first fields included in each basic data, wherein the calculation result at least includes assignment information; Specifically, it includes: extracting all marked field templates corresponding to any basic data, and calculating all dimension results corresponding to all marked field templates; in the calculation process, matching is performed through a matrix model algorithm, and the matrix model algorithm outputs corresponding dimensions for the corresponding basic data according to the weight value of each dimension, and its input is the first field of the basic data, and the output is multiple dimensions; the assignment information of the corresponding basic data is generated according to the results of all dimensions; The dimensions in the matrix model algorithm have different weight values; receiving dimension assignment data from a user, wherein the dimension assignment data adds a corresponding weight value to any dimension; specifically, the user adds different weight values to different dimensions according to actual scenarios, so that the dimensions output by the matrix model algorithm during the calculation process conform to the current scenario; A determination module, used to determine at least one second field based on the assignment information in the calculation result, and generate metadata according to all the second fields in the calculation result, including: extracting assignment information corresponding to a basic data, and calling at least one second field based on the assignment information; and generating metadata by counting all the second fields corresponding to all the assignment information; The mapping module is used to perform association mapping between corresponding metadata and basic data so as to establish a dependency relationship between the metadata and the basic data.
8. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, it is used to implement any one of the methods of claims 1 to 6.
Citation Information
Patent Citations
Data batch processing method and device, computer device and storage medium
CN109558440A
Heterogeneous data processing method and device and computer equipment
CN111611441A