Data distribution method and device based on data element label and readable medium
By establishing a data element label list and distribution strategy based on data element labeling, the problems of low data distribution efficiency and high cost in big data systems are solved, and an efficient and accurate data distribution process is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAMEN MEIYA PICO INFORMATION CO LTD
- Filing Date
- 2023-06-01
- Publication Date
- 2026-04-24
AI Technical Summary
In existing technologies, the data distribution process of big data systems requires a high level of business understanding, has high labor costs, is inefficient and prone to errors, and cannot reuse data analysis results, leading to the omission of valuable data.
A data feature tag-based approach is adopted, which involves establishing a list of data feature tags, configuring the distribution strategy information of the target table, and establishing a mapping relationship between the source table and the target table based on the data feature tags to achieve data distribution.
It improves the efficiency and accuracy of data distribution, reduces labor costs, achieves semi-automation of the data distribution process, and avoids omissions in target table mapping configuration.
Smart Images

Figure CN116991842B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data distribution, and more specifically to a data distribution method, apparatus, and readable medium based on data element tags. Background Technology
[0002] With the development of big data, big data systems are taking on greater responsibilities and becoming increasingly complex. Making big data systems simple and easy to use will greatly improve the experience for users and implementers; therefore, automation and semi-automation are inevitably the development direction of big data systems.
[0003] Raw data in big data systems typically has low value density and does not meet the usage requirements of application scenarios. To meet the data needs of the application, data is usually extracted selectively based on actual business requirements. Structured data extraction involves distributing information from source tables to target tables to increase the value density of the data. In practical engineering, this is reflected in distributing data from table A to table B.
[0004] Currently, the data distribution strategy from table A to table B is implemented through manual mapping. The engineering implementation steps are as follows:
[0005] 1) Determine whether it is necessary to distribute data from table A to table B;
[0006] 2) Establish a mapping from table A to table B;
[0007] 3) Establish a mapping from fields in table A to fields in table B.
[0008] Current data distribution implementation schemes have the following drawbacks:
[0009] 1) Requires a high level of business understanding: You need to understand both the source table and the target table;
[0010] 2) Requires significant manual labor costs: Implementation personnel need to be involved in the entire data distribution process. First, they need to analyze the characteristics of the data in table A, then determine the target table, and manually configure table mapping, field mapping, and other information. This process takes a lot of time.
[0011] 3) Poor results: The one-to-one manual mapping method is inefficient, error-prone, and cannot reuse data analysis results;
[0012] 4) Missing valuable data: Manually establishing table mappings and field mappings inevitably involves biases in human subjective judgment, resulting in incomplete table mappings and field mappings, leading to the omission of valuable data. Summary of the Invention
[0013] In view of the aforementioned technical problems, the purpose of the embodiments of this application is to provide a data distribution method, apparatus, and readable medium based on data element tags to solve the technical problems mentioned in the background section.
[0014] In a first aspect, the present invention provides a data distribution method based on data element tags, comprising the following steps:
[0015] S1. Create a list of data element labels, which includes data element labels and their meanings.
[0016] S2, create a target table in the target library, configure corresponding data element labels for the target fields in the target table according to the data element label list, and configure the distribution strategy information of the target table. The distribution strategy information includes distribution information and distribution rules. The distribution rules include data element labels and logical relationships established based on the data element labels.
[0017] S3, When data is accessed from the source library, configure data element labels with corresponding meanings for the source fields in the source table of the source library according to the data element label list;
[0018] S4. Establish a first mapping relationship between the source table and the target table and a second mapping relationship between the source field and the target field based on the distribution strategy information. Distribute the data in the source table to the target table based on the first mapping relationship and the second mapping relationship.
[0019] Preferably, data element labels are conceptual-level tags for fields.
[0020] As a preferred approach, several data element labels can have a hierarchical relationship, and can be extended through inheritance based on the hierarchical relationship.
[0021] Preferably, the data element labels in the logical relationship are connected by logical operators and symbols that specify the order of operations to establish a combination relationship of data element labels. The logical operators include AND and OR, where AND means that the source table must contain all data element labels, and OR means that the source table only needs to contain one set of data element labels. The symbols that specify the order of operations include parentheses of different levels.
[0022] As a preferred option, the distribution rules require that the source table contain the data element labels and their combinations specified in the logical relationships.
[0023] Preferably, the distribution information includes the encoding of the source library, the encoding of the target library, and the name of the target table.
[0024] Preferably, step S4 specifically includes:
[0025] Establish the data transfer relationship between the source library and the target library based on the source library's encoding and the target library's encoding in the distribution information.
[0026] Select source tables that conform to the distribution rules from the source library, and establish a first mapping relationship between the source tables that conform to the distribution rules and the target tables specified by the table names in the distribution information.
[0027] A second mapping relationship is established between the source and target fields in the source and target tables that have a first mapping relationship by matching data element labels;
[0028] The second mapping relationship distributes data from the source field of the source table to the target field of the target table.
[0029] Secondly, the present invention provides a data distribution device based on data element tags, comprising:
[0030] The data element label creation module is configured to create a list of data element labels, which includes data element labels and their meanings.
[0031] The distribution configuration module is configured to create a target table in the target library, configure corresponding data element labels for the target fields in the target table according to the data element label list, and configure the distribution strategy information of the target table. The distribution strategy information includes distribution information and distribution rules. The distribution rules include data element labels and logical relationships established based on the data element labels.
[0032] The source label configuration module is configured to, when data is accessed from the source library, configure data element labels with corresponding meanings for the source field in the source table of the source library according to the data element label list;
[0033] The mapping and distribution module is configured to establish a first mapping relationship between the source table and the target table and a second mapping relationship between the source field and the target field based on the distribution strategy information, and to distribute the data in the source table to the target table based on the first mapping relationship and the second mapping relationship.
[0034] Thirdly, the present invention provides an electronic device including one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any implementation of the first aspect.
[0035] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the implementations of the first aspect.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] (1) This invention marks the meaning of fields by data element tags. By maintaining a list of data element tags, data element tags are configured for the target fields of the target table and the source fields of the source table according to the list of data element tags. Distribution strategy information is configured for the target table so as to establish a mapping relationship between the source table and the target table according to the distribution strategy information and data element tags, and complete the mapping process between the source table and the target table in data distribution. The mapping efficiency is high.
[0038] (2) This invention not only uses the conceptual level tag of this field of data element label as the matching element of field mapping, but also uses data element label as the element of distribution rule in the distribution configuration information, so as to establish a more accurate table-level mapping. The data element label of the target table can be configured by professionals, and the engineering implementation personnel only need to configure the data element label of the source table, which saves labor costs and avoids the problem of missing the target table mapping configuration.
[0039] (3) This invention abstracts the previous specific mapping between tables and fields into concept matching, realizes semi-automation of the data distribution process, greatly reduces the workload of data distribution and improves the accuracy of distribution, and has excellent application scenarios. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is an exemplary device architecture diagram in which an embodiment of this application can be applied;
[0042] Figure 2 This is a flowchart illustrating a data distribution method based on data element tags, as an embodiment of this application.
[0043] Figure 3 This is a schematic diagram of a data distribution device based on data element tags, as exemplified by an embodiment of this application.
[0044] Figure 4 This is a schematic diagram of the structure of a computer device suitable for implementing the electronic device of the present application. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0046] Figure 1 An exemplary device architecture 100 is shown that can be applied to the data distribution method or the data distribution apparatus based on data element tags according to the embodiments of this application.
[0047] like Figure 1 As shown, the device architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, and 103 and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0048] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various applications, such as data processing applications and file processing applications, can be installed on terminal devices 101, 102, and 103.
[0049] Terminal devices 101, 102, and 103 can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices, including but not limited to smartphones, tablets, laptops, and desktop computers. When terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software programs or software modules (e.g., software programs or software modules used to provide distributed services) or as a single software program or software module. No specific limitations are imposed here.
[0050] Server 105 can be a server that provides various services, such as a background data processing server that processes files or data uploaded by terminal devices 101, 102, and 103. The background data processing server can process the acquired files or data and generate processing results.
[0051] It should be noted that the data distribution method based on data element tags provided in this application embodiment can be executed by server 105 or by terminal devices 101, 102, and 103. Correspondingly, the data distribution device based on data element tags can be set in server 105 or in terminal devices 101, 102, and 103.
[0052] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Any number of terminal devices, networks, and servers can be included depending on implementation needs. If the data being processed does not need to be retrieved remotely, the above architecture may not include a network, requiring only servers or terminal devices.
[0053] Figure 2 An embodiment of this application illustrates a data distribution method based on data element tags, comprising the following steps:
[0054] S1. Create a list of data element labels, which includes data element labels and their meanings.
[0055] In a specific embodiment, data element labels are conceptual-level tags for fields.
[0056] In specific embodiments, several data element labels may have a hierarchical relationship and be extended through inheritance based on the hierarchical relationship.
[0057] Specifically, in big data systems, data generated at different stages of data processing needs to be logically partitioned into databases based on the characteristics of the data. As data processing progresses, data flows from one database to another, thus forming an upstream-downstream relationship between the databases. Therefore, the source table and target table for data distribution are located in different databases, namely the source database and the target database. The source database acts as the upstream organization, and the target database acts as the downstream organization, forming an upstream-downstream relationship for data distribution.
[0058] This application proposes using data element tags to label the meaning of fields, thereby completing the mapping process between the source table and the target table in data distribution. A data element tag is a label for a field, used to indicate that the field corresponds to a concept in the real world. For example, if a field is idCard (ID card number), it can be labeled as ys-sfzh, corresponding to an ID card number in the real world. Specifically, the hierarchical relationship can be represented as a parent-child relationship, that is, the relationship between parent data element tags and child data element tags. The parent data element tag is an abstraction of the child data element tag, i.e., a higher-level concept. For example, multiple ID cards are abstracted into "ID card," which has business meaning and cannot be mapped across levels. For instance, in a personnel information scenario table, ys-sfzh is the individual's ID card number, and ys-sfzh-fq is the father's ID card number; these are two fields that need to be labeled separately in the source table before direct mapping. Data element labels can be extended using the concept of inheritance. For example, if a field is `idCard_father` (parent's ID number) and the data element label is `ys-sfzh-fq`, its parent data element label is `ys-sfzh`. Using inheritance facilitates the clear hierarchical maintenance of data element label information and allows for the unified setting of distribution rules. For instance, setting format validation rules for `ys-sfzh` will also apply to `ys-sfzh-fq`, preventing data that does not conform to the format from being distributed to the target database.
[0059] Specifically, data feature tags are labels that are independent of specific database table structures and focus solely on the concept itself. Data distribution using data feature tags shifts the focus from field mapping to matching within the same concept. If the source and target tables contain the same concept, data distribution can be automatically completed through matching. For example, if both the source and target tables contain the data feature tag "ys-sfzh," then the source field corresponding to "ys-sfzh" in the source table can be distributed to the target field corresponding to "ys-sfzh" in the target table.
[0060] Therefore, in the data distribution process, it is first necessary to establish a data element label list. This list includes information such as the data element label, the Chinese name of the data element label, and the parent data element label, as shown in Table 1. Before data distribution, the data element label list needs to be maintained to unify the relevant information of the data element labels and ensure that all personnel have a consistent understanding of the data element labels in the entire big data system, so as to distribute more accurate data.
[0061] Table 1 List of Data Element Labels
[0062] Data Element Labels Data Element Label Chinese Name Parent data element labels ys-xm Name ys-zjlx Document Types ys-zjhm ID number ys-sfzh ID number ys-sfzh-fq Father's ID number ys-sfzh ys-sfzh-mq Mother's ID number ys-sfzh ys-xb gender ys-jg Place of origin ys-sj Phone number ys-xx blood type ys-xl Education ys-dzmc Address Name ys-xzqh Administrative divisions ys-rqsj Date and Time ys-rqsj-ks Start time ys-rqsj ys-rqsj-js End time ys-rqsj ys-rq date ys-rq-ks start date ys-rq ys-rq-js End Date ys-rq … …
[0063] S2. Create a target table in the target library, configure corresponding data element labels for the target fields in the target table according to the data element label list, and configure the distribution strategy information of the target table. The distribution strategy information includes distribution information and distribution rules. The distribution rules include data element labels and logical relationships established based on the data element labels.
[0064] In a specific embodiment, data element labels in a logical relationship are connected using logical operators and symbols that specify the order of operations to establish a combination relationship of data element labels. The logical operators include AND and OR, where AND means that the source table must contain all data element labels, OR means that the source table only needs to contain one set of data element labels. The symbols that specify the order of operations include parentheses of different levels.
[0065] In a specific implementation, the distribution rules require that the source table contain the data element tags and their combinations specified in the logical relationship.
[0066] In a specific embodiment, the distribution information includes the encoding of the source library, the encoding of the target library, and the name of the target table.
[0067] Specifically, in configuring data element labels for the target table, metadata for the target table and target fields must first be established to describe the information of the table and fields. Then, a "data element label" attribute is added to the metadata of the target fields, marking the data element label for a specific field. Target tables can be created in the target library according to the needs of the actual application scenario; this target library can also be called the scenario library. These target tables typically need to store data processed by the big data system and belong to the downstream stage of data distribution. Taking the personnel information scenario as an example, a target table called the personnel information table is created in the scenario library. This personnel information table is used to summarize personnel information from the big data system, and the corresponding data element labels are configured according to the meaning of the fields. Therefore, the configured data element labels in the personnel information table are shown in Table 2.
[0068] Table 2 Personnel Information Table
[0069] field name Field Chinese name Data Element Labels name Name ys-xm idCard ID number ys-sfzh certifType Document Types ys-zjlx certifNumber ID number ys-zjhm gender gender ys-xb nativePlace Place of origin code ys-jg mobilePhone mobile phones ys-sj bloodType Blood type code ys-xx
[0070] After configuring the data element labels in the target table, configure the distribution strategy information for the target table. The distribution strategy information includes the parent organization code (i.e., the source database code) and distribution rules. The distribution rules configure the data element label information and specify which data element labels the source table needs to contain. Multiple rules can be connected using AND and OR, that is, the distribution requirements are formed by concatenating data element labels using AND (&&) and OR (||), and the order of rule operations is determined by different levels of parentheses. AND and OR indicate that the source table contains all data element labels, or that the source table only needs to contain one set of data element labels. The combination of AND and OR represents the combination relationship of data element labels. Only when the source table meets this combination relationship is the data in the source table considered acceptable for distribution to the target table. Taking personnel information as an example, the distribution strategy information for the personnel information table is shown in Table 3.
[0071] Table 3 Distribution Strategy
[0072]
[0073] The distribution rules in Table 3 state that the source table must contain "Name", and "ID Number" must be one of the following: "ID Type" or "ID Number".
[0074] Furthermore, since the tables in the later stages of the data processing flow are relatively fixed, only the initial tables need to be dynamically adjusted due to the data from different sources. Therefore, in engineering practice, the data element tags and distribution strategy information of the target tables in the downstream stages of the data processing flow can be configured in advance. Subsequently, the implementers only need to configure the data element tag information of the source tables they access.
[0075] S3, when data is accessed from the source database, configure data element labels with corresponding meanings for the source fields in the source table of the source database according to the data element label list.
[0076] Specifically, data element labels with corresponding meanings are configured for the source fields of the source tables in the source library. Taking the personnel information scenario as an example, the source table in the source library is the employee information table. The source fields of the employee information table in the source library need to be distributed to the target fields of the personnel information table in the scenario library. Therefore, data element labels are configured in the employee information table, as shown in Table 4.
[0077] Table 4 Employee Information Table
[0078]
[0079]
[0080] S4. Establish a first mapping relationship between the source table and the target table and a second mapping relationship between the source field and the target field based on the distribution strategy information. Distribute the data in the source table to the target table based on the first mapping relationship and the second mapping relationship.
[0081] In a specific embodiment, step S4 specifically includes:
[0082] Establish the data transfer relationship between the source library and the target library based on the source library's encoding and the target library's encoding in the distribution information.
[0083] Select source tables that conform to the distribution rules from the source library, and establish a first mapping relationship between the source tables that conform to the distribution rules and the target tables specified by the table names in the distribution information.
[0084] A second mapping relationship is established between the source and target fields in the source and target tables that have a first mapping relationship by matching data element labels;
[0085] The second mapping relationship distributes data from the source field of the source table to the target field of the target table.
[0086] Specifically, if the employee information in the source database meets the distribution rules of the personnel information in the scenario database, the big data system will establish a mapping relationship between the source field and the target field with consistent data element labels, and recommend it to the implementation personnel for confirmation. After confirmation, the data distribution will officially take effect.
[0087] The mapping relationship includes the following two parts:
[0088] 1) Establishing Table Mapping: The big data system identifies the distribution strategy information of the target table, scans the source tables in the upper-level organization using this information, selects source tables that match the distribution strategy, and establishes the first mapping relationship between the source tables and the target tables. This table mapping is only a recommendation; if the implementers are not satisfied with the recommended first mapping relationship, they can manually modify it.
[0089] 2) Establishing Field Mapping: The big data system establishes a second mapping relationship between source fields and target fields by matching data element tags. This field mapping is only a recommendation; if the implementers are not satisfied with the recommended second mapping relationship, they can manually modify it.
[0090] Once the mapping relationship is established, data distribution can be performed.
[0091] By following the steps above, semi-automation of data distribution can be achieved. Implementers can shift their focus from the source table and the target table to simply describing the source table itself.
[0092] Specifically, since the distribution rules are set with data element tags as the main unit, and several data element tags with hierarchical relationships are extended through inheritance, parent data element tags and child data element tags have the same tag content. Since the second mapping relationship is established by matching data element tags, the distribution rules set for parent data element tags also apply to child data element tags during the distribution process based on the distribution strategy information.
[0093] This invention configures data element tags on the source fields of the source table and the target fields of the target table to mark the meaning of the fields, and then sets the distribution strategy for the target table. When the system scans and finds that the source table matches the distribution strategy of the target table, it establishes a first mapping relationship between the source table and the target table; at the same time, it identifies the source resources of the source table and the data element tags of the target fields in the target table, and establishes a second mapping relationship between the source fields and target fields with the same data element tags, thereby distributing data.
[0094] With this solution, the data element labels of the target table can be configured by professionals, while the engineering implementation personnel only need to configure the data element labels of the source table. This saves labor costs and avoids the problem of missing the target table mapping configuration.
[0095] Further reference Figure 3 As an implementation of the methods shown in the above figures, this application provides an embodiment of a data distribution device based on data element tags, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0096] This application provides a data distribution device based on data element tags, including:
[0097] Data element label creation module 1 is configured to create a data element label list, which includes data element labels and their meanings.
[0098] The distribution configuration module 2 is configured to create a target table in the target library, configure corresponding data element labels for the target fields in the target table according to the data element label list, and configure the distribution strategy information of the target table. The distribution strategy information includes distribution information and distribution rules. The distribution rules include data element labels and logical relationships established based on the data element labels.
[0099] Source label configuration module 3 is configured to configure corresponding data element labels for the source field in the source table of the source library according to the data element label list when data from the source library is accessed.
[0100] The mapping and distribution module 4 is configured to establish a first mapping relationship between the source table and the target table and a second mapping relationship between the source field and the target field based on the distribution strategy information, and distribute the data in the source table to the target table based on the first mapping relationship and the second mapping relationship.
[0101] The following is for reference. Figure 4 It illustrates an electronic device suitable for implementing embodiments of this application (e.g., Figure 1 The diagram shows the structure of a computer device 400 (a server or terminal device). Figure 4 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0102] like Figure 4 As shown, the computer device 400 includes a central processing unit (CPU) 401 and a graphics processing unit (GPU) 402, which can perform various appropriate actions and processes according to programs stored in read-only memory (ROM) 403 or programs loaded from storage section 409 into random access memory (RAM) 404. The RAM 404 also stores various programs and data required for the operation of the device 400. The CPU 401, GPU 402, ROM 403, and RAM 404 are interconnected via a bus 405. An input / output (I / O) interface 406 is also connected to the bus 405.
[0103] The following components are connected to I / O interface 406: an input section 407 including a keyboard, mouse, etc.; an output section 408 including an LCD, speakers, etc.; a storage section 409 including a hard disk, etc.; and a communication section 410 including a network interface card, such as a LAN card or modem. The communication section 410 performs communication processing via a network such as the Internet. A drive 411 may also be connected to I / O interface 406 as needed. A removable medium 412, such as a hard disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 411 as needed so that computer programs read from it can be installed into storage section 409 as needed.
[0104] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 410, and / or installed from removable medium 412. When the computer program is executed by central processing unit (CPU) 401 and graphics processing unit (GPU) 402, the functions defined in the methods of this application are performed.
[0105] It should be noted that the computer-readable medium described in this application can be a computer-readable signal medium, a computer-readable medium, or any combination thereof. A computer-readable medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, or any combination thereof. More specific examples of a computer-readable medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution device, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than a computer-readable medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution device, apparatus, or apparatus. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0106] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0107] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using dedicated hardware-based means to perform the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0108] The modules described in the embodiments of this application can be implemented in software or hardware. These modules can also be located within a processor.
[0109] In another aspect, this application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: establish a data element tag list, which includes data element tags and their meanings; establish a target table in a target library, configure corresponding data element tags for target fields in the target table according to the data element tag list, and configure distribution strategy information for the target table, which includes distribution information and distribution rules, the distribution rules including data element tags and logical relationships established based on the data element tags; when data from the source library is accessed, configure corresponding data element tags for source fields in the source table in the source library according to the data element tag list; establish a first mapping relationship between the source table and the target table and a second mapping relationship between source fields and target fields according to the distribution strategy information, and distribute data from the source table to the target table according to the first and second mapping relationships.
[0110] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A data distribution method based on data element tags, characterized in that, Includes the following steps: S1, Establish a data element label list, which includes data element labels and their meanings. The data element labels are conceptual-level markers for fields. S2, create a target table in the target library, configure corresponding data element tags for the target fields in the target table according to the data element tag list, and configure the distribution strategy information of the target table. The distribution strategy information includes distribution information and distribution rules. The distribution rules include the data element tags and logical relationships established based on the data element tags. In the logical relationships, the data element tags are connected using logical operators and symbols that specify the order of operations to establish a combination relationship of data element tags. The distribution information includes the encoding of the source library to be accessed, the encoding of the target library, and the table name of the target table. S3, when data is accessed from the source library, configure data element tags with corresponding meanings for the source fields in the source table of the source library according to the data element tag list; S4, establish a first mapping relationship between the source table and the target table and a second mapping relationship between the source field and the target field according to the distribution strategy information, and distribute the data in the source table to the target table according to the first mapping relationship and the second mapping relationship; Step S4 specifically includes: A data transfer relationship between the source library and the target library is established based on the source library's encoding and the target library's encoding in the distribution information; Select a source table that conforms to the distribution rules from the source library, and establish the first mapping relationship between the source table that conforms to the distribution rules and the target table specified by the table name of the target table in the distribution information; A second mapping relationship is established between the source field and the target field in the source table and the target table that have the first mapping relationship by matching the data element labels; The data from the source field of the source table is distributed to the target field of the target table through the second mapping relationship.
2. The data distribution method based on data element tags according to claim 1, characterized in that, Several data element tags may have a hierarchical relationship, and can be extended through inheritance based on the hierarchical relationship.
3. The data distribution method based on data element tags according to claim 1, characterized in that, The logical operators include AND and OR, where AND indicates that the source table must contain all data element labels, OR indicates that the source table only needs to contain one set of data element labels, and the symbols that specify the order of operations include parentheses of different levels.
4. The data distribution method based on data element tags according to claim 1, characterized in that, The distribution rules require that the source table contain the data element labels and their combinations specified in the logical relationship.
5. A data distribution device based on data element tags, characterized in that, include: The data element label creation module is configured to create a data element label list, which includes data element labels and their meanings. The distribution configuration module is configured to create a target table in the target library, configure corresponding data element tags for target fields in the target table according to the data element tag list, and configure the distribution strategy information of the target table. The distribution strategy information includes distribution information and distribution rules. The distribution rules include the data element tags and logical relationships established based on the data element tags. In the logical relationships, the data element tags are connected using logical operators and symbols that specify the order of operations to establish a combination relationship of data element tags. The distribution information includes the encoding of the source library to be accessed, the encoding of the target library, and the table name of the target table. The source tag configuration module is configured to, when data is accessed from the source library, configure data element tags with corresponding meanings for the source field in the source table of the source library according to the data element tag list; The mapping and distribution module is configured to establish a first mapping relationship between the source table and the target table and a second mapping relationship between the source field and the target field based on the distribution strategy information, and to distribute data from the source table to the target table according to the first and second mapping relationships. Specifically, this includes: A data transfer relationship between the source library and the target library is established based on the source library's encoding and the target library's encoding in the distribution information; Select a source table that conforms to the distribution rules from the source library, and establish the first mapping relationship between the source table that conforms to the distribution rules and the target table specified by the table name of the target table in the distribution information; A second mapping relationship is established between the source field and the target field in the source table and the target table that have the first mapping relationship by matching the data element labels; The data from the source field of the source table is distributed to the target field of the target table through the second mapping relationship.
6. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-4.
Citation Information
Patent Citations
Parallel migration method and device based on data management and readable medium
CN115858488A