Data import method, device and equipment and computer readable storage medium

By obtaining the target data organization model and importing rule information for data import, the problem of adaptive transformation of users when accessing third-party data hosting platforms is solved, and simplified operations and cost reduction are achieved.

CN120508556APending Publication Date: 2025-08-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410182619.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-18
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

In the prior art, when users connect local databases to third-party data hosting platforms, they need to adapt to local databases according to the rules of the hosting platform, resulting in an increase in data management costs.

Method used

By obtaining the target data organization model of the data to be imported and looking for matching import rule information from the storage area, data is imported directly without the need for the requesting party to adapt to the data.

Benefits of technology

Simplifies data import operations, reduces the cost and complexity of data management of requesters, and improves the flexibility and transparency of data management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508556A_ABST
    Figure CN120508556A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data importing method, device and equipment and a computer readable storage medium. The method comprises the following steps: if an import request for to-be-imported data sent by a requester is received, obtaining a target data organization model for importing the to-be-imported data; searching target import rule information matched with the target data organization model from a storage area; wherein import rule information corresponding to a plurality of pre-configured data organization models respectively is stored in the storage area; and importing the to-be-imported data according to the target importing rule information so as to complete the importing of the to-be-imported data. Through the method, the data management cost can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data import method, apparatus, device, and computer-readable storage medium. Background Art

[0002] A database is a warehouse that organizes, stores, and manages data according to its structure. To facilitate data management, users often choose to store their data on third-party data hosting platforms in the cloud.

[0003] Current third-party data hosting platforms require users to use proprietary application programming interfaces (APIs) or web front-ends to input data into the database according to pre-defined rules within the configuration system itself. These rules include data size limits, supported data types, and more. Therefore, users must adapt their local databases to the requirements of the selected third-party data hosting platform before connecting them to the platform. This increases data management costs.

[0004] Therefore, how to reduce the cost of data management is an urgent problem to be solved. Summary of the Invention

[0005] To solve the above technical problems, embodiments of the present application provide a data import method, apparatus, device, and computer-readable storage medium.

[0006] Among them, the technical solutions adopted in this application are:

[0007] A data import method, comprising:

[0008] If an import request for the data to be imported is received from a requesting party, a target data organization model for importing the data to be imported is obtained;

[0009] Searching for target import rule information that matches the target data organization model from a storage area; wherein the storage area stores import rule information corresponding to a plurality of pre-configured data organization models;

[0010] An import operation is performed on the data to be imported according to the target import rule information to complete the import of the data to be imported.

[0011] A data import device, comprising:

[0012] an acquiring unit, configured to acquire a target data organization model for importing the data to be imported upon receiving an import request for the data to be imported from a requesting party;

[0013] A query unit, configured to search a storage area for target import rule information that matches the target data organization model; wherein the storage area stores pre-configured import rule information corresponding to a plurality of data organization models;

[0014] A processing unit is used to perform an import operation on the data to be imported according to the target import rule information.

[0015] In one embodiment of the present application, based on the aforementioned scheme, the target import rule information includes multiple tree-shaped import rules; the data to be imported includes multiple business tables; the processing unit is also used to select the tree-shaped import rule corresponding to each business table from the target import rule information, and import the business table according to the tree-shaped import rule to obtain the mapping tree corresponding to the business table; the mapping trees corresponding to each business table are integrated to obtain the mapping tree corresponding to the data to be imported.

[0016] In one embodiment of the present application, based on the aforementioned scheme, the processing unit containing parameters in the business table is further used to: generate parameter nodes corresponding to the parameters in the business table; determine the parent node and child node of each parameter node from the parameter node according to the tree import rule corresponding to the business table; generate the root node of the mapping tree corresponding to the business table based on the identification information of the business table; and construct the mapping tree corresponding to the business table based on the root node, the parent node and child node of each parameter node.

[0017] In one embodiment of the present application, based on the aforementioned scheme, the processing unit is further used to generate corresponding multiple association identification information for the business table based on each tree-shaped import rule if there are multiple tree-shaped import rules corresponding to the business table; and generate the root node of each mapping tree corresponding to the business table based on each association identification information.

[0018] In one embodiment of the present application, based on the aforementioned scheme, the processing unit is further used to: the root node in the mapping tree corresponding to each business table is the identification information of the business table; based on the identification information of the data to be imported, the root node of the mapping tree corresponding to the data to be imported is generated; the root node of the mapping tree corresponding to the data to be imported is used as the parent node of the root node of each business table, so that the root node of the mapping tree corresponding to each business table is used as the secondary root node of the mapping tree corresponding to the data to be imported, and the mapping tree corresponding to the data to be imported is obtained.

[0019] In one embodiment of the present application, based on the aforementioned scheme, the processing unit is further used to generate application identification information corresponding to the business table based on the identification information of the data to be imported and the identification information of the business table; and generate the root node of the mapping tree corresponding to the data to be imported based on the application identification information.

[0020] In one embodiment of the present application, based on the aforementioned scheme, the data to be imported includes a business table, and the mapping tree corresponding to the data to be imported includes a parameter node; after the data to be imported is imported according to the target import rule information, if the transceiver unit receives a query request for the specified business table sent by the requester, the mapping tree of the business table is extracted, and based on the filtering information of the specified parameter node contained in the query request, the branch where the specified parameter node is located is deleted to obtain the extracted and filtered mapping tree corresponding to the specified business table; the extracted and filtered mapping tree is returned to the requester.

[0021] In one embodiment of the present application, based on the aforementioned scheme, before searching for the target import rule information that matches the target data organization model from the storage area, the processing unit is also used to extract the import rule information corresponding to the data to be imported from the import request; if the pre-verification of the import rule information is successful, the import rule information is stored in the storage area.

[0022] In one embodiment of the present application, based on the aforementioned scheme, the acquisition unit is further used to obtain the import time of the data to be imported; the processing unit is further used to trigger the search for target import rule information matching the target data organization model of the data to be imported from the storage area if it detects that the import time is earlier than the update time of the data to be imported, and at least one of the data records corresponding to the data to be imported has changed.

[0023] A data import device includes a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the above-mentioned data import method is implemented.

[0024] A computer-readable storage medium stores computer-readable instructions, which, when executed by a processor of a computer, enable the computer to execute the above-mentioned data import method.

[0025] A computer program product includes computer-readable instructions, which implement the above data import method when executed by a processor.

[0026] In the above technical solution:

[0027] When an import request is received from a requesting party, the target data organization model for the data to be imported is obtained and the import rule information matching the target data organization model is searched from the storage area. This allows the data to be imported according to the target import rule information. During this process, the requesting party does not need to adapt the data to be imported before initiating the import request; instead, the import request is sent directly, making the import operation completely invisible to the requesting party. This method simplifies operations on the requesting party, making the import operation more convenient and transparent, and reducing data management costs for the requesting party.

[0028] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The accompanying drawings are incorporated into and constitute a part of the specification, illustrating embodiments consistent with the present application and, together with the specification, serving to explain the principles of the present application. It is obvious that the drawings described below are merely some embodiments of the present application, and a person of ordinary skill in the art can derive other drawings based on these drawings without inventive effort. In the drawings:

[0030] Figure 1 It is a schematic diagram of an implementation environment involved in this application;

[0031] Figure 2 is a flow chart showing a data import method according to an exemplary embodiment;

[0032] Figure 3 This is a schematic diagram of a configuration group involved in an embodiment of the present application;

[0033] Figure 4 is a flow chart showing a data import method according to another exemplary embodiment;

[0034] Figure 5 is a flow chart showing a data import method according to another exemplary embodiment;

[0035] Figure 6 is a schematic diagram of a mapping tree involved in an embodiment of the present application;

[0036] Figure 7 is a schematic diagram of another mapping tree involved in an embodiment of the present application;

[0037] Figure 8 is a flow chart showing a data import method according to another exemplary embodiment;

[0038] Figure 9is a flow chart showing a data import method according to another exemplary embodiment;

[0039] Figure 10 is a flow chart showing a data import method according to another exemplary embodiment;

[0040] Figure 11 is a block diagram of a data import device according to an exemplary embodiment;

[0041] Figure 12 The figure is a schematic diagram of the hardware structure of a data import device according to an exemplary embodiment. DETAILED DESCRIPTION

[0042] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments applicable to the present application. Rather, they are merely examples of apparatus and methods applicable to certain aspects of the present application, as detailed in the appended claims.

[0043] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0044] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be integrated or partially integrated. Therefore, the actual execution order may vary depending on the actual situation.

[0045] It should be noted that the term "plurality" used in this application refers to two or more. "And / or" describes the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0046] It should be noted that in the specific implementation of this application, when user-related data is involved, when the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. At the same time, the formulas involved in the embodiments of this application can be flexibly adjusted, such as adding or reducing corresponding parameters.

[0047] Before introducing the technical solutions of the embodiments of the present application, the technical terms involved in the embodiments of the present application are first introduced here.

[0048] A database, in short, can be thought of as a digital filing cabinet—a place where electronic files are stored, allowing users to add, query, update, and delete data. A database is a collection of data stored in a specific way, shared by multiple users, with minimal redundancy, and independent of applications.

[0049] A database management system (DBMS) is a computer software system designed for managing databases, typically providing basic functions such as storage, retrieval, security, and backup. DBMSs can be categorized by the database model they support, such as relational or XML (Extensible Markup Language); by the type of computer they support, such as server clusters or mobile phones; by the query language they use, such as Structured Query Language (SQL) or XQuery; by performance priorities, such as maximum scale or maximum speed; or by other classification methods. Regardless of the classification method used, some DBMSs are cross-category, for example, supporting multiple query languages simultaneously.

[0050] The data organization model describes and defines the way data is organized and stored in the system, including the relational data organization model, the key-value data organization model, and the mapping tree organization model.

[0051] The relational data organization model uses relational tables to represent data and organizes data in the form of rows and columns. Each row in the data table consists of multiple columns, each storing a specific type of data, and the structure between rows is loose.

[0052] The key-value (KV) data organization model is a data organization method that simplifies relational tables. One column of the relational table can be selected as the key, and one or more other columns can be combined into values. The structure between rows is also loose, and data is presented to users in the form of key-value pairs (i.e., key = value).

[0053] The mapping tree organization model is an organizational method based on relational tables. It creates a tree-like structure by establishing parent-child relationships within the data. Rows are linked to each other, creating a hierarchical structure. Data is presented in a tree-like format, with each node having a parent node and zero or more child nodes.

[0054] In the embodiments of the present application, a database may contain one or more business tables, each of which contains at least one parameter. These parameters may have certain relationships. For example, if parameters A and B are composite primary keys in a relational table, there may be a parent-child relationship between A and B. In this case, the business tables use a mapping tree organization model, which refers to a data model that uses a tree structure to represent entities and the relationships between them.

[0055] These parameters can also be independent of each other. In this case, the business table uses a key-value data organization model, where each parameter is independent and has a corresponding value, creating a key=value relationship. This model is typically used to describe loosely related, unstructured data. Multiple key-value pairs have no dependencies, allowing point-based queries based on the key.

[0056] The tree access model generally refers to a way of organizing and accessing data, in which data is organized into a tree structure with a hierarchical relationship. In this model, each node can have zero or more child nodes, and each node has a parent node (except the root node). This model is characterized by a clear hierarchy, which allows for easy recursive access and navigation. In the tree access model, common applications include file systems, organizational charts, XML / HTML documents, etc. Each node represents an entity, and the relationship between nodes is represented by a parent-child relationship. The root node is the top of the tree and has no parent node, while the leaf node is a node without child nodes. When accessing a leaf node, you need to start a multi-level key query from the root node, and support operations to obtain all child nodes.

[0057] A data hosting platform is a database service model where users can offload database management tasks to a third-party service provider, such as a cloud provider or professional hosting company. The third-party service provider is responsible for managing hardware facilities, infrastructure, automated operations and maintenance, and security. This allows users to focus on business development without worrying about the complexities of the underlying database, while enjoying the benefits of elastic scalability, high availability, security, and pay-as-you-go services. Data hosting platforms provide users with a convenient, reliable, and efficient database management solution tailored to the needs of the modern cloud computing era.

[0058] Metadata, also known as meta-information, is information about data. It is descriptive data that reveals the data's characteristics, meaning, and context. It serves as a bridge for the effective management, organization, and understanding of data. By providing details about the data's origin, structure, usage, and management, it enables users and systems to more comprehensively understand and utilize information resources. Descriptive metadata helps users understand the data's subject, keywords, and abstract. Structural metadata reveals the data's internal organization. Administrative metadata provides information about the data's creation, maintenance, and access. Technical metadata focuses on technical details such as the data's storage format and processing methods. Metadata plays a key role in various fields, promoting the sharing, exchange, and utilization of information resources.

[0059] A mapping tree is a data structure used to describe the relationships, structure, and hierarchy between data. In computer science and databases, mapping trees are often used to represent the hierarchical structure of data, especially when mapping one data model to another. A mapping tree typically consists of nodes and edges, where nodes represent elements of the data and edges represent the relationships between elements. Each node may contain attributes or values, and the connections between nodes form a tree-like structure, where the root node represents the overall data and the child nodes represent specific data elements. In databases, mapping trees are often used to describe the mapping relationship between relational data and other data models. For example, when mapping a table in a relational database to a document in a document-based database, a mapping tree can show the relationships between tables, rows, and columns, helping to understand and convert data.

[0060] In related technologies, third-party data hosting platforms require users to enter data using proprietary APIs or web-based front-ends according to pre-set rules during the access process. These rules include restrictions on data size, supported data types, and other aspects. Consequently, users need to adapt their local databases to meet the requirements of the selected third-party data hosting platform, increasing data management costs. This adaptation may involve adjusting data structure, size, and type processing to meet the hosting provider's specifications, adding additional workload and complexity to users' access to third-party data hosting platforms.

[0061] Based on this, the embodiments of the present application respectively propose a data import method, a data import device, a data import equipment, a computer-readable storage medium and a computer program product. In these embodiments, when an import request sent by a requesting party is received, it is necessary to obtain a target data organization model for importing the data to be imported, and search for import rule information that matches the target data organization model from the storage area. In this way, the import operation can be performed on the data to be imported according to the target import rule information. In this process, the requesting party does not need to adapt the data to be imported before initiating the import request, but directly sends the import request. For the requesting party, the import operation is imperceptible. This method simplifies the operation of the user end, makes the import operation more convenient and transparent, and reduces the cost of data management for the requesting party. The requesting party does not need to perform additional data preparation before importing, which improves the flexibility of data management and reduces the complexity and cost of data management work.

[0062] See also Figure 1 , Figure 1 It is a schematic diagram of an implementation environment involved in this application.

[0063] Figure 1 The illustrated implementation environment includes a configuration server 110 , a storage area 120 of the configuration server, a requester 1 , data to be imported 130 of the requester 1 , a requester 2 , and data to be imported 140 of the requester 2 .

[0064] The configuration server 110 also includes at least a network I / O (input / output) port 111 , a file service module 112 , a scheduling module 113 , a detection module 114 and a configuration generator 115 .

[0065] The network I / O port 111 is used to communicate with the requester. The requester can send an import request, a query request, etc. to the configuration server 110 through the network I / O port 111. At the same time, the configuration server 110 can also return a response message, a query result message, etc. to the requester through the network I / O port 111. In the embodiment of the present application, the requester can send data to be processed to the network I / O port 111, so that the configuration server 110 receives the data to be processed.

[0066] The file module 112 is responsible for processing file-related services, including functions such as storage, retrieval, and transmission of files.

[0067] The scheduling module 113 is used to coordinate and schedule the process of the import operation to ensure that the import request of the requester is processed in a timely and effective manner.

[0068] The detection module 114 is used to verify the legitimacy of the import request for the data to be imported, sent by the requesting party. The detection module 114 can verify the accuracy of the connection address of the data to be imported, the legitimacy of the import rule information involved in the import request, the existence of the business table in the data to be imported, and the legitimacy of the parameters in the business table. If the import request is successfully verified, subsequent data import operations can be performed.

[0069] The configuration generator 115 can extract the import rule information corresponding to the data to be imported from the import request. If the detection module 114 successfully pre-checks the import rule information in the import request, the configuration generator 115 can store the import rule information in the storage area. The storage area refers to the storage area 120 of the configuration server. The storage area 120 of the configuration server is a database connected to the configuration generator 115 and belongs to a cloud database. The configuration generator 115 can store the import rule information in the storage area 120 of the configuration server to realize the registration of the import rule information. In addition, the configuration generator 115 can also receive the data to be imported sent by the requester through the network I / O port 111, and import the data to be imported based on the target import rule information of the data to be imported. The imported data can also be stored in the storage area 120 of the configuration server.

[0070] It should be noted that the import rule information and the imported data corresponding to the data to be imported can be stored in different areas in the configuration server's storage area 120. The configuration generator 115 can store the two in different areas in the storage area 120 according to specific standards or classification methods to more effectively organize and manage the data.

[0071] In an embodiment of the present application, configuration generator 115 may receive import requests for data to be imported from different requesters, such as requester 1 sending an import request for data to be imported 130, and requester 2 sending an import request for data to be imported 140. Each requester may have at least one data to be imported, and therefore, each requester may initiate different import requests for different databases it owns. The data to be imported from each requester may be all or part of the data in a database.

[0072] Figure 1 The number of requesting parties shown is two. In actual application scenarios, the number of requesting parties can be 2 or more, and this embodiment of the application does not limit this.

[0073] In an embodiment of the present application, import rule information can be used to convert a business table into a mapping tree. The business table contains at least one parameter, which may or may not have certain associations. The configuration generator 115 can use the parameters in the business table as node fields and the values corresponding to each parameter as attribute fields. In an embodiment of the present application, an import rule information can have at least the following metadata fields, as shown in Table 1.

[0074]

[0075]

[0076] Table 1

[0077] The group name (FGroupName) is the group in which a mapping tree is located. A group can contain at least one mapping tree.

[0078] When the data to be processed has multiple mapping trees, in order to distinguish different mapping trees, the names of the data to be processed need to be distinguished, and the names of the data to be processed (FDatabase) and the alias of the data to be processed (FDatabaseAlias) can be used for distinction.

[0079] Similarly, a business table can also have different mapping trees. The name of the business table (FTable) and the alias of the business table (FTableAlias) can distinguish different mapping trees of a business table.

[0080] The connection information (FConnectionInfo) of the business table may include the connection address, user name, password, host address, etc. of the business table.

[0081] A business table can contain parameters, each of which can be represented as a node using node fields (FKeyList), such as k1 and k2. Within these nodes are leaf nodes, each of which also corresponds to an attribute field (FColumn), such as k1, k2, c3, and c4. When k1 and k2 are node fields, they represent parameters; when they are attribute fields, they represent the corresponding values of k1 and k2.

[0082] The filter (FFilter) can be used to filter specified data. For example, k1!=0 means that the branch containing the node with k1=0 in the mapping tree needs to be deleted.

[0083] The timestamp field (FUpdateField) of the business table refers to the generation time of the mapping tree corresponding to the business table, which can be represented by FTimeStamp.

[0084] Business ciphertext field description (FEncryptFields) means that some parameters are encrypted, including the ciphertext field column name and decryption key.

[0085] The requesting party in the embodiment of the present application may be a terminal device, which may be a mobile phone, a tablet computer, a laptop computer, a PDA, a mobile Internet device (MID), a vehicle-mounted device, an aircraft, a wearable device (such as a smart watch, a smart bracelet, a pedometer, etc.), a virtual reality device (such as a VR (Virtual Reality) device, an AR (Augmented Reality) device), and the like.

[0086] The configuration server in the embodiment of the present application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0087] See also Figure 2 , Figure 2 This is a flow chart of a data import method according to an exemplary embodiment. Figure 1 The implementation environment shown is specifically executed by a configuration server (hereinafter referred to as the server). Of course, this method can also be applied to other implementation environments, and the execution subject of this method is not limited here.

[0088] The following will describe the data import method in detail using the configuration server as an exemplary execution subject. Figure 2 As shown, in an exemplary embodiment, the method includes at least the following steps:

[0089] S210: If an import request for the data to be imported is received from a requesting party, a target data organization model for importing the data to be imported is obtained.

[0090] When the requester can initiate an import request for the data to be imported, the server can, after receiving the import request for the data to be imported sent by the requester, obtain the target data organization model for importing the data to be imported based on the import request, that is, determine which data organization model the requester needs to use to import the data to be imported into the storage area of the server. The target data organization model can be obtained by automatic identification by the server or specified by the requester. The data organization model can exist in the form of a specific data identifier, and the server can determine the data organization model by obtaining the data identifier.

[0091] Optionally, if the data to be imported is specified by the requester to be imported in a key-value data organization model, indicating that the requester does not wish to save the relationship between the various parameters, but only save the mapping relationship between each parameter and its corresponding value, then the server can also import the data to be imported in a key-value data organization model according to the requester's requirements.

[0092] The import request contains metadata about the data to be imported, including the connection address, import rules, and business table parameters. The server pre-verifies the metadata and, if successful, registers it with the server's configuration generator.

[0093] It should be noted that, since the meta information includes the connection address of the data to be imported, the server can access the connection address to obtain the data to be imported.

[0094] Optionally, the requester may also directly send the data to be imported to the server.

[0095] S220 , searching the storage area for target import rule information that matches the target data organization model; wherein the storage area stores pre-configured import rule information corresponding to a plurality of data organization models.

[0096] Optionally, the requester may provide import rule information and include the import rule information for the data to be imported in the import request sent. The server may extract the import rule information corresponding to the data to be imported from the import request and, if pre-verification of the import rule information is successful, store the import rule information in the storage area.

[0097] Optionally, before sending an import request, the requester can obtain the import rule information stored in the server from the server, so that the requester can select the import rule information it needs and provide the identification information of the import rule information. In this way, the server can import the data to be imported based on the import rule information specified by the requester.

[0098] If the requester does not provide or specify import rule information, the server will search the storage area for target import rule information that matches the target data organization model. The storage area may contain pre-configured import rule information corresponding to multiple data organization models. Furthermore, this import rule information may also be provided in advance by the requester.

[0099] S230: performing an import operation on the data to be imported according to the target import rule information to complete the import of the data to be imported.

[0100] The data to be imported can contain multiple business tables, and the target import rule information can also contain multiple tree-based import rules. For each business table, the server can select the tree-based import rule corresponding to that business table from the target import rule information and import the business table according to the tree-based import rule to obtain the mapping tree corresponding to that business table.

[0101] The mapping tree for the business table consists of a root node and parameter nodes. The root node can be generated based on the name of the business table (i.e., the identification information of the business table), and the parameter nodes are the parameters contained in the business table. Each parameter node has a hierarchical relationship that matches the tree-shaped import rule corresponding to the business table, representing the association relationship between different parameter nodes.

[0102] Optionally, a business table can correspond to multiple tree-shaped import rules, and the server can generate multiple mapping trees for the business table based on the multiple tree-shaped import rules. The root nodes of these mapping trees are different, but they are all associated with the name of the business table. An alias mechanism can be used to name the business table with an associated name. For example, for a business table named t, it corresponds to three mapping trees. Then, the business table can be named t, t_alias1, and t_alias2 according to the different mapping trees. The root nodes of these three mapping trees are generated in sequence according to the corresponding business table names, so that the different mapping trees of the business table can be distinguished.

[0103] Alternatively, if the requester specifies that the data to be imported be organized as a key-value data model, the parameters in the business table contained therein will not have an associated relationship, and the mapping tree corresponding to the business table will not have a hierarchical relationship. In this case, the server can generate a root node based on the name of the business table, and then make each parameter in the business table a child node of the root node. Each child node has corresponding attribute fields (including value, data type, options, etc.).

[0104] Optionally, if the requester specifies that the data to be imported be imported in the form of a mapping tree organization model, even if there is an association relationship between the various parameters in the data to be imported, the requester can also specify that some business tables be imported in the form of a key-value data organization model, that is, ignore the association relationship between the various parameters in the business table.

[0105] It should be noted that, for ease of description, a mapping tree that does not retain the associations between parameters will be referred to as a key-value mapping tree, while a mapping tree that retains the associations between parameters will be referred to as a relationship mapping tree. Therefore, for imported data that includes parameter associations, some or all business tables may have key-value mapping trees, as specified by the requester.

[0106] After obtaining the mapping tree for each business table of the data to be imported, the server needs to integrate each mapping tree to form a complete mapping tree corresponding to the data to be imported. Specifically, the server can generate a root node based on the name of the data to be imported (i.e., the identification information of the data to be imported), and then use this root node as the parent node of the root node of the mapping tree corresponding to each business table. In this way, the root node of each business table can be used as the secondary root node of the mapping tree corresponding to the data to be imported. Each secondary root node is connected to multiple parameter nodes, thus obtaining the mapping tree corresponding to the data to be imported.

[0107] Optionally, when integrating, the server can also, based on the requester's requirements, treat some business tables as a configuration group, generate a node corresponding to the configuration group, use the node as the secondary root node of the mapping tree of the data to be imported, and use the root node of the mapping tree of the corresponding part of the business table as the child node of the node. In this way, the hierarchical structure of the mapping tree of the data to be imported can be further enriched. For example, the server treats business table 1 and business table 2 as a configuration group, and business table 1 corresponds to mapping tree 1, and business table 2 corresponds to two mapping trees - mapping tree 2 and mapping tree 3, then the following can be obtained: Figure 3 A schematic diagram of the configuration group is shown.

[0108] In one embodiment of the present application, after obtaining the mapping tree of the data to be imported, the server can store it in the server's storage area. In this embodiment of the present application, the physical storage of the mapping tree can be divided into multiple forms. It can be represented as a tree structure in memory and can be persistently stored in a file as text (such as XML, JSON, etc.) or binary file (custom storage structure).

[0109] After the integration is completed to obtain the mapping tree of the data to be imported, if the server receives a query request for a specified business table sent by the requester, it can respond to the query request accordingly, extract the mapping tree from the storage area, and return it to the requester.

[0110] Optionally, if the query request contains filtering information, the server needs to extract the mapping tree of the business table from the storage area, and based on the filtering information of the specified parameter node contained in the query request, delete the branch where the specified parameter node is located, and obtain the extracted and filtered mapping tree corresponding to the specified business table, and then return the extracted and filtered mapping tree to the requester.

[0111] Optionally, the server can obtain the import time of the data to be imported. If it detects that the import time is earlier than the update time of the data to be imported, or at least one of the data records corresponding to the data to be imported has changed, it will trigger the search for target import rule information that matches the target data organization model of the data to be imported from the storage area. This means that the data to be imported has been updated. For example, the requester has added data to the data to be imported, or modified the data, resulting in the need to change the structure or parameter values of the mapping tree. In this case, the server can re-trigger the search for the target import rule information based on the update of the data to be imported, and regenerate a new mapping tree for the updated imported data, so that the requester's latest data can be synchronized to the server in a timely manner.

[0112] Through this method, on the one hand, the server can import the data to be imported according to the import rule information specified by the requester, without the requester having to adaptively modify the data to be imported according to the server's requirements, thereby reducing the requester's data management costs.

[0113] Furthermore, when importing data, the server can preserve the relationships between parameters in the imported data using a mapping tree, as specified by the requester. Compared to traditional solutions that rely solely on key-value storage, this approach better meets the requester's need to preserve parameter relationships. The mapping tree structure better reflects the hierarchy and relationships between data, improving the flexibility and comprehensibility of data management for the requester. This allows the server to more accurately store and present data relationships, helping the requester to more effectively manage and utilize the imported data.

[0114] In one embodiment of the present application, another data import method is provided, which can be executed by a server. Figure 4 As shown, the data import method may include S210 to S220 and S410 to S420. That is, S410 to S420 are Figure 2 The specific implementation method of S230 is shown.

[0115] In the embodiment of the present application, the target import rule information includes multiple tree-shaped import rules; and the data to be imported includes multiple business tables.

[0116] S410 to S420 are described below:

[0117] S410 , for each business table, selecting a tree-shaped import rule corresponding to the business table from the target import rule information, and importing the business table according to the tree-shaped import rule to obtain a mapping tree corresponding to the business table.

[0118] Each business table in the data to be imported requested by the requester can find a corresponding tree-based import rule in the target import rule information. The server can import each business table according to its corresponding tree-based import rule to obtain a mapping tree that meets the requester's requirements as the mapping tree corresponding to the business table.

[0119] S420: Integrate the mapping trees corresponding to each business table to obtain a mapping tree corresponding to the data to be imported.

[0120] Specifically, the server generates the root node of the mapping tree corresponding to the data to be imported based on the identification information of the data to be imported; the root node of the mapping tree corresponding to the data to be imported is used as the parent node of the root node of each business table, so that the root node of the mapping tree corresponding to each business table is used as the secondary root node of the mapping tree corresponding to the data to be imported, and the mapping tree corresponding to the data to be imported is obtained.

[0121] Because the data to be imported has multiple business tables, the mapping trees corresponding to each business table need to be integrated to obtain the mapping tree corresponding to the data to be imported. Specifically, the server can add a parent node before the root node of the mapping tree corresponding to each business table. This parent node can serve as the root node of the mapping tree for the data to be imported, making the root node corresponding to each business table a secondary root node of the root node of the data to be imported. This completes the integration of the mapping trees corresponding to each business table, obtaining the mapping tree corresponding to the data to be imported.

[0122] Through this method, the server can integrate the mapping tree of each business table to obtain a complete mapping tree corresponding to the data to be imported. The integrated mapping tree can more comprehensively express the structure and association relationship of the data to be imported, which helps to improve the readability and efficiency of data management.

[0123] In one embodiment of the present application, another data import method is provided, which can be executed by a server. Figure 5 As shown, the data import method may include S210 to S220, S510 to S540 and S420. That is, S510 to S540 are Figure 4 The specific implementation method of S410 is shown.

[0124] S510 to S540 are described below:

[0125] S510 : For each business table, select a tree-shaped import rule corresponding to the business table from the target import rule information, and generate a parameter node corresponding to the parameter in the business table.

[0126] Each business table can contain at least one parameter, so the server can generate a corresponding parameter node for each parameter. For example, if a business table contains two parameters, k1 and k2, the server can generate a k1 node and a k2 node accordingly.

[0127] S520 : Determine the parent node and child node of each parameter node from the parameter nodes according to the tree-shaped import rule corresponding to the business table.

[0128] In the embodiment of the present application, the business table includes multiple parameters. The following is the code of the parameters included in an exemplary business table (table name is t):

[0129] CREATE TABLE `t`(

[0130] `k1`int(11)NOT NULL DEFAULT 0,

[0131] `k2`int(11)NOT NULL DEFAULT 0,

[0132] `c3`varchar(32)NOT NULL DEFAULT”,

[0133] `c4`varchar(32)NOT NULL DEFAULT”,

[0134] `FTimeStamp`timestamp NOT NULL DEFAULT current_timestamp()ON UPDATEcurrent_timestamp(),

[0135] PRIMARY KEY(`k1`,`k2`)

[0136] )ENGINE=InnoDB DEFAULT CHARSET=utf8;

[0137] mysql>SELECT * FROM t;

[0138] +----+----+----+----+---------------------+

[0139] |k1|k2|c3|c4|FTimeStamp|

[0140] +----+----+----+----+---------------------+

[0141] |0|0|h1|g1|2018-01-25 19:27:59|

[0142] |0|1|h2|g2|2018-01-26 15:16:16|

[0143] |1|2|h3|g3|2018-01-26 15:17:50|

[0144] |1|3|h4|g4|2018-01-26 17:48:04|

[0145] +----+----+----+----+---------------------+

[0146] The business table contains parameters such as k1, k2, c3, and c4. The server can specify k1 and k2 as node fields (FKeyList) and c3 and c4 as attribute fields (FColumn). Node fields are organized into parent-child nodes in a specific order, while attribute fields reflect values, data types, and options. By specifying node and attribute fields, the server can create a tree-structured mapping tree.

[0147] In this way, the server can determine the parent node and child nodes of each parameter node from the parameter nodes according to the tree-shaped import rule corresponding to the business table.

[0148] S530: Generate a root node of a mapping tree corresponding to the business table based on the identification information of the business table.

[0149] That is, the root node of the mapping tree corresponding to the business table is generated based on the name of the business table.

[0150] Optionally, specific implementation steps of S530 may include S531 to S532:

[0151] S531: If the business table corresponds to multiple tree-shaped import rules, generate multiple pieces of corresponding association identification information for the business table based on each tree-shaped import rule.

[0152] That is, when the requester needs to generate multiple different mapping trees for a certain business table, it is necessary to use the alias mechanism to rename the business table to distinguish different mapping trees. These names are interrelated and point to the business table at the same time. Therefore, different association identification information corresponding to the business table under different tree import rules can be obtained.

[0153] S532: Generate a root node of each mapping tree corresponding to the business table based on each association identification information.

[0154] In this way, the server can generate the root node of each mapping tree based on each piece of associated identification information in the business table.

[0155] S540: Construct a mapping tree corresponding to the business table based on the root node, the parent node and the child nodes of each parameter node.

[0156] In one embodiment of the present application, if the tree-based import rule indicates the association relationship between various parameters in the business table, and the mapping tree of the business table is constructed with the simplest association relationship, some repeated branches can be omitted. For example, in the business table above, the server can use the following mapping tree structure to generate the mapping tree of the business table based on the tree-based import rule. The mapping tree structure is generally a binary structure and is not visible. To visualize the mapping tree, XML code can be used to describe it:

[0157] <test>

[0158] <t>

[0159] <0>

[0160] <0k1="0"k2="0"c3="h1"c4="g1" / >

[0161] <1k1="0"k2="1"c3="h2"c4="g2" / >

[0162] <!--0-->

[0163] <1>

[0164] <2k1="1"k2="2"c3="h3"c4="g3" / >

[0165] <3k1="1"k2="3"c3="h4"c4="g4" / >

[0166] <!--1-->

[0167] < / t>

[0168] < / test>

[0169] Among them, test represents the identification information of the data to be imported and is the root node of the mapping tree of the data to be imported, while t represents the identification information of the current business table and is the root node of the mapping tree of the business table and also the secondary root node of test. <0> "and" <1> " represents the two branches of t,"<!--0--> "and"<!--1--> " respectively represent " <0> "The end of the branch and" <1> ". Under each branch, there can be multiple branches, such as " <0> "There are two branches under it, <0 and <1," <1> There are two branches under "<2" and "<3".

[0170] It should be noted that there is an order between the node fields "k1, k2". K1 is placed before k2, which means that in the mapping tree derived from the business table t, the node generated by the value of the k1 column is the parent node of the k2 column, and correspondingly, the node generated by the value of the k2 column is the child node. From this, it can be seen that the mapping tree structure can clearly express the relationship between the k1 and k2 nodes. The tree structure corresponding to the above xml is as follows Figure 6 shown.

[0171] Figure 6 The child nodes in the mapping tree contain attribute values. For example, the leaf node with k2=0 contains the attribute values of k1="0"k2="0"c3="h1"c4="g1"; the leaf node with k2=1 contains the attribute values of k1="0"k2="1"c3="h2"c4="g2", and so on.

[0172] In one embodiment of the present application, if the tree import rule indicates that the mapping tree of the business table is constructed based on the association relationship of each parameter in the business table with the most comprehensive association relationship, all branches can be retained. In this case, the alias mechanism is used to name the business table t_alias, and the corresponding mapping tree XML code is as follows:

[0173]

[0174] If the mapping tree corresponding to the above xml is compared with Figure 6 By integrating the mapping trees in Figure 7 The two mapping trees corresponding to the business table shown have root nodes that are independent of each other but related to each other. Both are child nodes of the mapping tree of the data to be imported (test), that is, sub-root nodes of the mapping tree of the data to be imported.

[0175] Optionally, considering that the requester may want to encrypt some or all parameter nodes, the requester can specify the parameter nodes that need to be encrypted. The server can use the FEncrptyFields field to represent the encryption and decryption rules, which can be used for the encryption and decryption column information and decryption key of the business table. The format of the FEncrptyFields field is:

[0176] col0:E_col0,decrptyCode0; col1:E_col1,decrptyCode1;...

[0177] Each item consists of a column name and corresponding encryption information, as described below:

[0178] col0: The decrypted plaintext column name, that is, the name of the corresponding attribute field created in the mapping tree. The value of col0 is the decrypted plaintext value.

[0179] E_col0: Ciphertext column name, indicating the encrypted column name.

[0180] decryptCode0: decryption key, used to decrypt ciphertext, ensuring that only users with the decryption key can restore the plaintext.

[0181] For example, if k1 needs to be encrypted, the following XML code can be obtained:

[0182] <test>

[0183] <t>

[0184] <0>

[0185] <0k1="E_col0"k2="0"c3="h1"c4="g1" / >

[0186] <1k1="E_col0"k2="1"c3="h2"c4="g2" / >

[0187] <!--0-->

[0188] <1>

[0189] <2k1="E_col0"k2="2"c3="h3"c4="g3" / >

[0190] <3k1="E_col0"k2="3"c3="h4"c4="g4" / >

[0191] <!--1-->

[0192] < / t>

[0193] < / test>

[0194] The requester needs to use decryptCode0 to decrypt E_col0 and obtain the plaintext col0, which represents the actual value of k1 on each branch.

[0195] Optionally, if the business table is of key-value type and has only two fields, key and value, the server can use "key" as the parameter node (Keylist) and "value" as the attribute field (column) to build a mapping tree for the business table.

[0196] For example, the following mapping tree:

[0197]

[0198] Here, "k1:v1" and "k2:v2" are two key-value pairs. In this embodiment of the present application, the root node and the secondary root node (i.e., test-t) of the mapping tree corresponding to the key-value data organization model can be mapped to a file path on the destination machine, or mapped to a Remote Procedure Call (RPC) service identifier, or appended to the key value in the key-value pair as a prefix.

[0199] This method allows the server to generate a corresponding mapping tree for each business table according to its corresponding tree-based import rules and integrate the mapping trees of each business table to obtain a mapping tree corresponding to the data to be imported. This mapping tree preserves the relationships between the parameters contained in each business table, making the mapping tree of the database to be imported more expressive and improving the flexibility and understandability of data management for the requester.

[0200] In one embodiment of the present application, another data import method is provided, which can be executed by a server. Figure 8 As shown, the data import method may include S210 to S220, S410 and S810 to S820. That is, S810 to S820 are Figure 4 The specific implementation method of S420 is shown.

[0201] S810 to S820 are described below:

[0202] S810: Generate a root node of a mapping tree corresponding to the data to be imported based on identification information of the data to be imported.

[0203] The server may directly generate the root node of its mapping tree based on the name of the data to be imported (eg, test).

[0204] Optionally, the server may also generate a root node based on S811 to S812:

[0205] S811 : Generate application identification information corresponding to the business table based on the identification information of the data to be imported and the identification information of the business table.

[0206] That is, the server may combine the identification information of the data to be imported and the identification information of the business table to generate application identification information.

[0207] S812: Generate a root node of a mapping tree corresponding to the data to be imported based on the application identification information.

[0208] The application identification information is used as the root node of the mapping tree corresponding to the data to be imported. In this way, when the subsequent requester queries the mapping tree of the business table, it can use one application identification information to query, instead of providing the identification information of the data to be imported and the identification information of the business table at the same time, thereby improving the efficiency of the query.

[0209] S820, the root node of the mapping tree corresponding to the data to be imported is used as the parent node of the root node of each business table, so that the root node of the mapping tree corresponding to each business table is used as the secondary root node of the mapping tree corresponding to the data to be imported, and the mapping tree corresponding to the data to be imported is obtained.

[0210] This step is to use the root node corresponding to the business table as a child node of the root node of the data to be imported, so that the root node corresponding to the business table becomes the secondary root node in the mapping tree of the data to be imported.

[0211] Through this method, the server can integrate the mapping trees of different business tables to form a complete mapping tree for the data to be imported, so that the data of the requester can be imported more completely, improving the comprehensiveness of the requester's data management.

[0212] In one embodiment of the present application, another data import method is provided, which can be executed by a server. Figure 9 As shown, the data import method may include S210 to S230 and S910 to S920. That is, S910 to S920 are Figure 2 The specific implementation method after S230 is shown.

[0213] S910 to S920 are described below:

[0214] S910. If a query request for a specified business table is received from a requesting party, a mapping tree of the business table is extracted, and based on the filtering information of the specified parameter node contained in the query request, the branch where the specified parameter node is located is deleted to obtain an extracted and filtered mapping tree corresponding to the specified business table.

[0215] In one embodiment of the present application, after receiving a query request from a requester, the server needs to first determine whether the requester has query permission for the specified business table. Only if the requester has query permission can the server return the mapping tree of the specified business table queried by the requester accordingly.

[0216] Optionally, if the requester queries the mapping tree of a key-value type business table, it can directly specify a key and query the value corresponding to the key, and the server can directly return the value.

[0217] In one embodiment of the present application, if the query request also includes filtering information for a specified parameter node, the parameter node specified in the filtering information is filtered and the branch containing the specified parameter node is deleted, thereby obtaining an extracted and filtered mapping tree corresponding to the specified business table. This is because, in some cases, the requester only needs a portion of the data in the business table, so a mapping filter can be used to filter out the data that is not needed for the query.

[0218] For example, for the example in S440, if the filtering information set by the requester is: k1!=0, it means that the branch where k1 is not equal to 0 needs to be deleted, then the following mapping tree can be obtained:

[0219]

[0220] It can be seen that the server removes the branch of "k1=0" in the mapping tree.

[0221] S920: Return the extracted and filtered mapping tree to the requesting party.

[0222] In this way, the server can extract the mapping tree that meets the requester's filtering requirements and return it to the requester, so that the requester can query data on demand, thereby improving the efficiency of the query.

[0223] In one embodiment of the present application, considering that some parameter nodes may be requested to be encrypted by the requesting party, the requesting party needs to attach the corresponding decryption key in the query request to query the data of the corresponding parameter nodes.

[0224] Optionally, if the value of an attribute field is empty, the tree field will no longer be exported. For example, if the value c3 in the attribute field of the node corresponding to the parameter node (0,1) in the test.t table is empty, it will no longer be exported if this rule is configured. The following mapping tree structure is shown:

[0225]

[0226] Through this method, the requester queries the mapping tree of the specified business table according to its own needs. The query can include conditional filtering of specific parameters, obtaining partial mapping tree structure of a specific business table, etc. This flexible query mechanism enables the requester to accurately obtain the required mapping tree information according to its own needs.

[0227] In one embodiment of the present application, another data import method is provided, which can be executed by a server. Figure 10 As shown, the data import method may include S1001 to S1017.

[0228] S1001 to S1017 are described below:

[0229] S1001: receiving an import request for data to be imported from a requesting party.

[0230] S1002: Extracting meta information corresponding to the data to be imported from the import request.

[0231] The meta information includes the connection address of the data to be imported and the import rule information specified by the requester.

[0232] S1003: Whether the pre-verification of the meta information is successful.

[0233] If yes, execute S1005; if no, execute S1004.

[0234] S1004: Return a request failure response message to the requesting party.

[0235] S1005: Register the meta information.

[0236] S1006: Obtain a target data organization model for importing the data to be imported.

[0237] S1007: Search the storage area for target import rule information that matches the target data organization model.

[0238] S1008 : For each business table, select a tree-shaped import rule corresponding to the business table from the target import rule information.

[0239] S1009: Import each business table according to its tree import rule to obtain a mapping tree corresponding to each business table.

[0240] S1010: Integrate the mapping trees corresponding to each business table to obtain a mapping tree corresponding to the data to be imported.

[0241] S1011, maintaining and storing a mapping tree corresponding to the data to be imported.

[0242] S1012: Whether it is detected that the data to be imported is updated.

[0243] If yes, execute S1013; if no, execute S1011.

[0244] S1013: Use the updated data to be imported as the data to be imported, and jump to S1007.

[0245] S1014: Whether a query request for a designated business table is received from the requesting party.

[0246] If yes, execute S1015; if no, execute S1011.

[0247] S1015: Whether filtering information of the specified parameter node is detected.

[0248] If yes, execute S1016; if no, execute S1017.

[0249] S1016: Delete the branch where the specified parameter node is located, and obtain the extracted and filtered mapping tree corresponding to the specified business table.

[0250] S1017: Return the queried mapping tree to the requesting party.

[0251] It should be noted that S1011 and S1014 can be performed in parallel, there is no order of execution, and they do not affect each other.

[0252] Through this method, on the one hand, the server can import the data to be imported according to the import rule information specified by the requester, without the requester having to adaptively modify the data to be imported according to the server's requirements, thereby reducing the requester's data management costs.

[0253] Furthermore, when importing data, the server can preserve the relationships between parameters in the imported data using a mapping tree, as specified by the requester. Compared to traditional solutions that rely solely on key-value storage, this approach better meets the requester's need to preserve parameter relationships. The mapping tree structure better reflects the hierarchy and relationships between data, improving the flexibility and understandability of data management for the requester. This allows the server to more accurately store and present data relationships, helping the requester to more effectively manage and utilize the imported data.

[0254] Figure 11 FIG. 1 is a block diagram of a data import device according to an embodiment of the present application. Figure 11 As shown, the data import device can be applied to a server, and the device includes:

[0255] The acquiring unit 1110 is configured to acquire a target data organization model for importing the data to be imported upon receiving an import request for the data to be imported from the requesting party;

[0256] The query unit 1120 is configured to search the storage area for target import rule information that matches the target data organization model; wherein the storage area stores import rule information corresponding to a plurality of pre-configured data organization models;

[0257] The processing unit 1130 is configured to perform an import operation on the data to be imported according to the target import rule information.

[0258] In one embodiment of the present application, based on the aforementioned scheme, the target import rule information includes multiple tree-shaped import rules; the data to be imported includes multiple business tables; the processing unit 1130 is also used to select the tree-shaped import rule corresponding to each business table from the target import rule information, and import the business table according to the tree-shaped import rule to obtain a mapping tree corresponding to the business table; the mapping trees corresponding to each business table are integrated to obtain a mapping tree corresponding to the data to be imported.

[0259] In one embodiment of the present application, based on the aforementioned scheme, the business table includes a parameter processing unit 1130, which is also used to: generate parameter nodes corresponding to the parameters in the business table; determine the parent node and child node of each parameter node from the parameter node according to the tree import rule corresponding to the business table; generate the root node of the mapping tree corresponding to the business table based on the identification information of the business table; and construct the mapping tree corresponding to the business table based on the root node, the parent node and child node of each parameter node.

[0260] In one embodiment of the present application, based on the aforementioned scheme, the processing unit 1130 is further used to generate corresponding multiple association identification information for the business table based on each tree import rule if there are multiple tree import rules corresponding to the business table; and generate the root node of each mapping tree corresponding to the business table based on each association identification information.

[0261] In one embodiment of the present application, based on the aforementioned scheme, the processing unit 1130 is further used to use the root node in the mapping tree corresponding to each business table as the identification information of the business table; generate the root node of the mapping tree corresponding to the data to be imported based on the identification information of the data to be imported; and use the root node of the mapping tree corresponding to the data to be imported as the parent node of the root node of each business table, so that the root node of the mapping tree corresponding to each business table serves as the secondary root node of the mapping tree corresponding to the data to be imported, thereby obtaining the mapping tree corresponding to the data to be imported.

[0262] In one embodiment of the present application, based on the aforementioned solution, the processing unit 1130 is further used to generate application identification information corresponding to the business table based on the identification information of the data to be imported and the identification information of the business table; and generate the root node of the mapping tree corresponding to the data to be imported based on the application identification information.

[0263] In one embodiment of the present application, based on the aforementioned scheme, the data to be imported includes a business table, and the mapping tree corresponding to the data to be imported includes a parameter node; after the data to be imported is imported according to the target import rule information, if the transceiver unit 1140 receives a query request for the specified business table sent by the requester, the mapping tree of the business table is extracted, and based on the filtering information of the specified parameter node contained in the query request, the branch where the specified parameter node is located is deleted to obtain the extracted and filtered mapping tree corresponding to the specified business table; the extracted and filtered mapping tree is returned to the requester.

[0264] In one embodiment of the present application, based on the aforementioned scheme, before searching for target import rule information that matches the target data organization model from the storage area, the processing unit 1130 is also used to extract import rule information corresponding to the data to be imported from the import request; if the import rule information is pre-verified successfully, the import rule information is stored in the storage area.

[0265] In one embodiment of the present application, based on the aforementioned scheme, the acquisition unit 1110 is further used to obtain the import time of the data to be imported; the processing unit 1130 is also used to trigger the search for target import rule information that matches the target data organization model of the data to be imported from the storage area if it is detected that the import time is earlier than the update time of the data to be imported, and at least one of the data records corresponding to the data to be imported has changed.

[0266] It should be noted that the apparatus provided in the aforementioned embodiment and the method provided in the aforementioned embodiment belong to the same concept, wherein the specific manner in which each module and unit performs operations has been described in detail in the method embodiment.

[0267] An embodiment of the present application also provides a data import device, comprising: one or more processors; a memory for storing one or more programs, which enables the electronic device to implement the above-mentioned data import method when the one or more programs are executed by the one or more processors.

[0268] Figure 12 It is a structural diagram of a computer system suitable for implementing the data import device of the embodiment of the present application.

[0269] It should be noted that Figure 12 The computer system 1200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0270] like Figure 12As shown, the computer system 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1202 or the program loaded from the storage part 1208 into the random access memory (RAM) 1203, such as executing the method in the above embodiment. Various programs and data required for system operation are also stored in the RAM 1203. The CPU 1201, ROM 1202 and RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0271] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, and the like; an output section 1207 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 1208 including a hard disk; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. Removable media 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 1210 as needed, so that computer programs read from the removable media can be installed in the storage section 1208 as needed.

[0272] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1209, and / or installed from a removable medium 1211. When the computer program is executed by the central processing unit (CPU) 1201, the various functions defined in the system of the present application are executed.

[0273] It should be noted that the computer-readable medium shown in the embodiments of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0274] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. Among them, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0275] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. In some cases, the names of these units do not constitute limitations on the units themselves.

[0276] Another aspect of the present application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned data import method. The computer-readable medium may be included in the electronic device described in the above embodiments, or may exist independently without being incorporated into the electronic device.

[0277] Another aspect of the present application provides a computer program product or computer program, which includes computer instructions stored in a computer-readable medium. A processor of a computer device reads the computer instructions from the computer-readable medium and executes the computer instructions, causing the computer device to perform the data import method provided in each of the above embodiments.

[0278] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. Ordinary technicians in this field can easily make corresponding changes or modifications based on the main ideas and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.

Claims

1. A data import method, characterized in that: include: If an import request for the data to be imported is received from a requesting party, a target data organization model for importing the data to be imported is obtained; Searching for target import rule information that matches the target data organization model from a storage area; wherein the storage area stores import rule information corresponding to a plurality of pre-configured data organization models; An import operation is performed on the data to be imported according to the target import rule information to complete the import of the data to be imported.

2. The method according to claim 1, characterized in that The target import rule information includes multiple tree-shaped import rules; the data to be imported includes multiple business tables; The importing operation on the data to be imported according to the target import rule information includes: For each business table, selecting a tree-shaped import rule corresponding to the business table from the target import rule information, and importing the business table according to the tree-shaped import rule to obtain a mapping tree corresponding to the business table; The mapping trees corresponding to each business table are integrated to obtain a mapping tree corresponding to the data to be imported.

3. The method according to claim 2, characterized in that The business table includes parameters; Importing the business table according to the tree-shaped import rule to obtain a mapping tree corresponding to the business table includes: Generate parameter nodes corresponding to the parameters in the business table; Determining the parent node and child node of each parameter node from the parameter nodes according to the tree-shaped import rule corresponding to the business table; Generating a root node of a mapping tree corresponding to the business table based on identification information of the business table; A mapping tree corresponding to the business table is constructed based on the root node, the parent node and the child nodes of each parameter node.

4. The method according to claim 3, characterized in that The generating a root node of the mapping tree corresponding to the business table based on the identification information of the business table includes: If the business table corresponds to multiple tree-shaped import rules, generating corresponding multiple association identification information for the business table based on each tree-shaped import rule; A root node of each mapping tree corresponding to the service table is generated based on each piece of associated identification information.

5. The method according to claim 2, characterized in that The root node in the mapping tree corresponding to each business table is the identification information of the business table; The step of integrating the mapping trees corresponding to each business table to obtain the mapping tree corresponding to the data to be imported includes: Generating a root node of a mapping tree corresponding to the data to be imported based on the identification information of the data to be imported; The root node of the mapping tree corresponding to the data to be imported is used as the parent node of the root node of each business table, so that the root node of the mapping tree corresponding to each business table is used as the secondary root node of the mapping tree corresponding to the data to be imported, and the mapping tree corresponding to the data to be imported is obtained.

6. The method according to claim 5, characterized in that The generating a root node of a mapping tree corresponding to the data to be imported based on the identification information of the data to be imported includes: generating application identification information corresponding to the business table based on the identification information of the data to be imported and the identification information of the business table; A root node of a mapping tree corresponding to the data to be imported is generated based on the application identification information.

7. The method according to any one of claims 1 to 6, characterized in that The data to be imported includes a business table, and the mapping tree corresponding to the data to be imported includes a parameter node; After the import operation is performed on the data to be imported according to the target import rule information, the method includes: If a query request for a specified business table is received from the requesting party, a mapping tree of the business table is extracted, and based on the filtering information of the specified parameter node contained in the query request, the branch where the specified parameter node is located is deleted to obtain an extracted and filtered mapping tree corresponding to the specified business table; The extracted and filtered mapping tree is returned to the requesting party.

8. The method according to claim 1, characterized in that Before searching the storage area for target import rule information that matches the target data organization model, the method further includes: Extracting import rule information corresponding to the data to be imported from the import request; If the pre-verification of the import rule information is successful, the import rule information is stored in the storage area.

9. The method according to claim 1, characterized in that The method further comprises: Obtaining the import time when the import of the data to be imported is completed; If it is detected that the import time is earlier than the update time of the data to be imported, and at least one of the data records corresponding to the data to be imported has changed, it is triggered to search the storage area for target import rule information that matches the target data organization model of the data to be imported.

10. A data import device, characterized in that: include: an acquiring unit, configured to acquire a target data organization model for importing the data to be imported upon receiving an import request for the data to be imported from a requesting party; A query unit, configured to search a storage area for target import rule information that matches the target data organization model; wherein the storage area stores pre-configured import rule information corresponding to a plurality of data organization models; A processing unit is used to perform an import operation on the data to be imported according to the target import rule information.

11. A data import device, characterized in that: include: a memory storing computer-readable instructions; A processor reads the computer-readable instructions stored in the memory to execute the method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the method according to any one of claims 1 to 9.