A data conversion method, device and storage medium

By dynamically creating a data dictionary and monitoring database ID data in real time, the problem of data conversion requiring service downtime in existing technologies is solved, achieving seamless data replication and conversion, reducing complexity and error rate, and improving data conversion efficiency.

CN115827634BActive Publication Date: 2025-12-16BEIJING HESI HUIZHI INFORMATION TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211603104.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-13
Publication Date
2025-12-16
Estimated Expiration
2042-12-13

AI Technical Summary

Technical Problem

Existing data conversion methods require service interruption for data transmission, making real-time data copying and conversion impossible. This leads to high complexity, high error rates, and data lag, especially in scenarios with unified management across multiple enterprises.

Method used

By dynamically creating a data dictionary, monitoring new ID data in the database in real time, using the data dictionary for ID recognition and conversion, employing structured query language to obtain target data, and using string replacement functions for format conversion, seamless data copying and conversion are achieved.

Benefits of technology

It enables real-time replication of data from the first company to the second company without service interruption, dynamically synchronizing configuration changes, reducing complexity and error rate, and improving data conversion efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115827634B_ABST
    Figure CN115827634B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a data conversion method, device and storage medium, wherein the data conversion method comprises the steps of: obtaining a first database table related to target data to be converted by a first enterprise, and obtaining the target data from the first database table; identifying first ID data in the obtained target data, and converting the first ID data into second ID data available for a second enterprise; and writing the target data after the operation of converting the first ID data into the second ID data into a second database table of the second enterprise, so as to complete data warehousing. Through the above method, the data of the first enterprise can be seamlessly copied to the second enterprise for use, and the data transmission can be performed without stopping the service, so that the data replication and conversion are realized in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer information processing technology, specifically to a data conversion method, apparatus, and storage medium. Background Technology

[0002] Currently, the data in SaaS systems is based on a single enterprise; related business data belongs to that enterprise from the moment it is created. For example, basic data in EasyPay includes user information, role information, and permission information, while configuration data includes fee standards, fee types, extended profiles, business objects, payment and collection accounts, document templates, budget packages, and approval workflows.

[0003] However, as business grows, some large accounting firms have needs involving the unified management and configuration of multiple companies. These companies may not have business connections, but they share unified expense reimbursement rules and management systems, creating a new business scenario. For example: An administrator imports basic files, configures document templates, expense types, approval workflows, and other data for Company A into the system as required. After completing the configuration for Company A, the administrator then imports basic files and configures some data for Company B, and then operates on Companies C, D, E...

[0004] The above scenario presents several problems. First, configuring business data for each company is complex and prone to errors for administrators. Second, the more companies there are, the more complex this task becomes. Furthermore, rule changes require time and personnel costs to update each company. Finally, independent configurations for each company hinder unified expense management, leading to data lag and delayed approval processes. Currently available data conversion methods merely map changes to predefined configurations and data field names, requiring server downtime for data transfer and failing to enable real-time data copying and conversion. Summary of the Invention

[0005] The purpose of this application is to provide a data conversion method, apparatus, and storage medium to solve the problem that existing data conversion methods require service interruption for data transmission and cannot perform real-time data copying and conversion.

[0006] To achieve the above objectives, this application provides a data conversion method, including the steps of: obtaining a first database table involving the target data of a first enterprise to be converted, and obtaining the target data from the first database table;

[0007] Identify the first ID data in the acquired target data and convert the first ID data into second ID data that can be used by the second enterprise;

[0008] The target data, after the operation of converting the first ID data into the second ID data is performed, is written into the second database table of the second enterprise to complete the data entry.

[0009] Optionally, the method for identifying the first ID data in the acquired target data includes:

[0010] A data dictionary is dynamically created, and the first ID data is identified through the data dictionary.

[0011] Optionally, the method for dynamically creating the data dictionary includes:

[0012] Monitor the database for newly added ID data related to the first enterprise;

[0013] The newly added ID data is acquired in real time, and the data dictionary with a tree structure is dynamically created and updated using the newly added ID data. The data dictionary is used to provide keyword prefix query and full text hit query.

[0014] Optionally, the method for identifying the first ID data through the data dictionary includes:

[0015] Based on the minimum length of the ID data in the system, a minimum retrieval length for the first ID data is set. When performing retrieval and identification, only strings with a length greater than or equal to the minimum retrieval length are selected for matching.

[0016] Optionally, the method for converting the first ID data into second ID data usable by the second enterprise includes:

[0017] Format conversion is performed using the string replace function.

[0018] Optionally, the method for obtaining the target data from the first database table includes:

[0019] Using the first ID data as a query condition, the corresponding target data can be retrieved using the structured query language; and / or, using the update time field when the target data was configured as a query condition, the corresponding target data can be retrieved using the structured query language.

[0020] To achieve the above objectives, this application also provides a data conversion apparatus, including: a memory; and

[0021] A processor connected to the memory, the processor being configured to:

[0022] Obtain the first database table involved in the target data to be converted from the first enterprise, and obtain the target data from the first database table;

[0023] Identify the first ID data in the acquired target data and convert the first ID data into second ID data that can be used by the second enterprise;

[0024] The target data, after the operation of converting the first ID data into the second ID data is performed, is written into the second database table of the second enterprise to complete the data entry.

[0025] To achieve the above objectives, this application also provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a machine, implements the steps of the method described above.

[0026] The embodiments of this application have the following advantages:

[0027] This application provides a data conversion method, including the following steps: obtaining a first database table involving target data to be converted from a first enterprise; obtaining the target data from the first database table; identifying first ID data in the obtained target data; converting the first ID data into second ID data usable by a second enterprise; and writing the target data after performing the operation of converting the first ID data into the second ID data into the second database table of the second enterprise to complete the data entry.

[0028] Using the above method, the data of the first company can be seamlessly copied to the second company for use without service interruption, enabling real-time data copying and conversion.

[0029] Furthermore, a data dictionary is dynamically created, and the first ID data is identified using the data dictionary. The method for dynamically creating the data dictionary includes: monitoring newly added ID data related to the first enterprise in the database via binlog; acquiring the newly added ID data in real time; and dynamically creating and updating the tree-structured data dictionary using the newly added ID data. The data dictionary is used to provide keyword prefix queries and full-text hit queries.

[0030] Using the above method, a data dictionary can be dynamically created, new IDs generated in the database can be monitored in real time and synchronized to the data dictionary, and ID recognition can be performed through the data dictionary without service interruption or user awareness. This allows configuration changes of the first company to be synchronized to the second company in real time. Attached Figure Description

[0031] To more clearly illustrate the embodiments of this application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0032] Figure 1 A flowchart illustrating a data conversion method provided in an embodiment of this application;

[0033] Figure 2 A first database representation of a data conversion method provided in this application embodiment;

[0034] Figure 3 This is a schematic diagram of the first ID data conversion process of a data conversion method provided in an embodiment of this application;

[0035] Figure 4 This application provides a schematic diagram of a data transformation method for dynamically creating a data dictionary, as illustrated in an embodiment of the present application.

[0036] Figure 5 This is a schematic diagram of the data dictionary structure for a data conversion method provided in an embodiment of this application;

[0037] Figure 6 This is a block diagram of a data conversion device provided in an embodiment of this application. Detailed Implementation

[0038] The following specific embodiments illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0039] Furthermore, the technical features involved in the different embodiments of this application described below can be combined with each other as long as they do not conflict with each other.

[0040] One embodiment of this application provides a data conversion method, referencing... Figure 1 , Figure 1 The flowchart provided in one embodiment of this application illustrates a data conversion method. It should be understood that the method may also include additional boxes not shown and / or the boxes shown may be omitted, and the scope of this application is not limited in this respect.

[0041] In step 101, the first database table involved in the target data to be converted of the first enterprise is obtained, and the target data is obtained from the first database table.

[0042] In some embodiments, a method for obtaining the target data from the first database table includes:

[0043] Using the first ID data as a query condition, the corresponding target data can be retrieved using the structured query language; and / or, using the update time field when the target data was configured as a query condition, the corresponding target data can be retrieved using the structured query language.

[0044] In some embodiments, the target data includes user role configuration data of the first enterprise, wherein the user role configuration data includes user data, role data, and user role relationship data;

[0045] The first database tables involved in the target data include a user table, a role table, and a user-role relationship table.

[0046] The first ID data in the target data includes primary key ID data, enterprise ID data, user ID data, and role ID data;

[0047] Based on the user ID data, the user data and user role data are obtained using structured query language;

[0048] Based on the update time field configured for the role, the role data is obtained using a structured query language.

[0049] Specifically, during the data design phase of a business system, relational data is inevitably generated. There are many scenarios involving relational data. This embodiment uses a standard user role configuration data (target data, including user data, role data, and user role relationship data) as an example to illustrate a specific implementation scheme.

[0050] refer to Figure 2 The first database table contains a user table, a role table, and a user-role relationship table. Each table has primary key ID data and enterprise ID data. The role relationship table contains referenced user ID data and role ID data.

[0051] Before copying data, it's necessary to identify the tables involved in the role configuration. In this role configuration scenario, the following information can be confirmed by querying the SQL:

[0052] Select * from user table where userID = 'xxxxx'

[0053] Select from User Role Relationship Table where UserID = 'xxxxx'

[0054] Based on the SQL statement (Structured Query Language) above, specifying the user's ID data allows you to retrieve the user data and user role relationship data. However, there is still information in the role table that needs to be processed, as there are no associated IDs available for querying. Here, the role data can be defined using the following SQL:

[0055] Select * from the role table where updateTime >= ?

[0056] When designing data tables, each table should be configured with an update time field, with a default value of the current time. If it's an existing system, this field can be added later.

[0057] Using the database query statement above, the updateTime field configured for the role is used as the query condition to retrieve the role data. The condition is assigned using the computer's start time 1970-01-01 00:00:00 when the data is copied for the first time, and can be assigned using the time of the last successful data copy operation thereafter.

[0058] This design ensures that no data is lost during each data copy, and that only the updated data is copied during data updates, avoiding redundant data operations.

[0059] This application defines the user data and role data to be copied as two parts: master data and base data.

[0060] The definition of master data can be understood through its scope of application: for example, user data, which only affects the specified user.

[0061] The definition of basic data can be understood as follows: for example, a role can not only be used by one user, but can be applied to any user and can be used in other business modules.

[0062] In summary, through the above operations, the target data that needs to be copied can now be retrieved from the database.

[0063] In step 102, the first ID data in the acquired target data is identified, and the first ID data is converted into second ID data that can be used by the second enterprise.

[0064] In some embodiments, a method for identifying the first ID data in the acquired target data includes:

[0065] A data dictionary is dynamically created, and the first ID data is identified through the data dictionary.

[0066] In some embodiments, the method for dynamically creating the data dictionary includes:

[0067] Monitor the database for newly added ID data related to the first enterprise;

[0068] The newly added ID data is acquired in real time, and the data dictionary with a tree structure is dynamically created and updated using the newly added ID data. The data dictionary is used to provide keyword prefix query and full text hit query.

[0069] In some embodiments, a method for identifying the first ID data using the data dictionary includes:

[0070] Based on the minimum length of the ID data in the system, a minimum retrieval length for the first ID data is set. When performing retrieval and identification, only strings with a length greater than or equal to the minimum retrieval length are selected for matching.

[0071] In some embodiments, a method for converting the first ID data into second ID data usable by the second enterprise includes:

[0072] Format conversion is performed using the string replace function.

[0073] Specifically, the related fields in the data are transformed. Referring to the previous embodiment, in the role data scenario, the transformed result is directly shown here. Then, based on the result, the problems that need to be solved in the transformation steps are explained.

[0074] refer to Figure 3 The transformation result has two parts. One is the identifier for the selected transformation, which is here prefixed with "Company ID:" and the ID data is concatenated. The other is replacing the corpId field value (the first company ID) with the second company ID (i.e., replacing company A with company B).

[0075] Before implementing the above conversion, a core problem needs to be solved: how to quickly identify which strings in the target data are ID data and then convert them?

[0076] refer to Figure 4 First, you need to listen for newly added ID data in the database via binlog. The binlog functionality in MySQL will not be elaborated here; it's an official MySQL message outlet for data change events, and various programming languages ​​have ways to connect to it.

[0077] By monitoring the binlog, real-time data change information from the database can be obtained. In the business logic implementation, newly added ID data for the primary target company can be retrieved. The key is to filter the data based on this primary target company. For example, if we only need data for company A (the primary company), then we only filter the relevant ID data for company A, thereby reducing unnecessary memory and program efficiency consumption and ensuring the correctness of subsequent data dictionary creation.

[0078] After obtaining the ID data, a trie-structured data dictionary needs to be created using the ID data. This data dictionary needs to provide keyword prefix lookup and full-text match lookup. For example... Figure 5 As shown, assuming the ID data consists of four items: ABC, ABCD, ACE, and ACDE, the program needs to construct the following tree structure. Besides determining the existence of the query keyword prefix through tree branches, it can also determine whether the entire text is matched by the marker at the end of the keyword. This data format ensures that the time complexity of insertion and query is O(l), guaranteeing efficient data retrieval and dictionary keyword addition.

[0079] In this embodiment, when performing a match on the trie data dictionary, a keyword extraction optimization is implemented, which can significantly reduce time complexity. Since the goal of this embodiment is to convert IDs, the minimum retrieval length of the ID data can be set based on the minimum length of the ID data within the system. If all IDs generated in the system are 8 characters or longer, then only strings longer than 8 characters can be truncated for matching, while strings shorter than 8 characters are left unprocessed.

[0080] For example, if we need to identify ID data in a string of 26 English letters (26 English letters arranged in order from a to z), we have two pre-prepared ID data in the dictionary: bcdefghi and lmnopgrs. The following steps can be used to obtain the two ID data.

[0081] 1. The first value taken from index 0 does not match;

[0082] 2. The second time, the value 1 is matched to bcdefghi;

[0083] 3. The third match starts from the index of the previous successful match + 1, i.e., index 9, and the value does not match.

[0084] 4. The fourth time the value is taken from index 10, there is no match;

[0085] 5. The fifth time the value is taken from index 11, it matches lmnopgrs;

[0086] 6. The sixth match starts from the index of the previous successful match + 1. If the index is less than 8, no match is made, and the process ends.

[0087] In summary, the above operations can complete the data identification of the first ID data in the aforementioned steps.

[0088] Using the above method, a data dictionary can be dynamically created, new IDs generated in the database can be monitored in real time and synchronized to the data dictionary, and ID recognition can be performed through the data dictionary without service interruption or user awareness. This allows configuration changes of the first company to be synchronized to the second company in real time.

[0089] When performing data conversion, such as in Java, the format can be converted using the string replace function. Since each record in the database is relatively small, the efficiency of the string replacement method provided by the official documentation is generally sufficient for most scenarios.

[0090] In step 103, the target data after performing the operation of converting the first ID data into the second ID data is written into the second database table of the second enterprise to complete the data entry.

[0091] In some embodiments, a method for writing the target data after performing the operation of converting the first ID data into the second ID data into the second database table of the second enterprise includes:

[0092] Batch saving can be done using the INSERT statement or by using MySQL's large data import method, LOCK DATA.

[0093] Specifically, MySQL data is typically written in batches using INSERT statements, such as: INSERT INTO table(field1, field2, ...) VALUES(value1, value2, ...). This is also the data entry method used by some business systems in various implementations. This method can meet the efficiency requirements of daily business operations, but when large amounts of data, such as more than 100MB of data, are entered into the database, encapsulating and executing the SQL becomes extremely slow.

[0094] Data transformation scenarios may involve large-scale data import. Some embodiments of this solution utilize MySQL's large-scale data import method, `LOAD DATA`, to accomplish this. The specific execution statements are as follows:

[0095] "load data local infile'ignore.csv'REPLACE into table"+REPLACE_TABLE+"CHARACTER SET utf8mb4"+"("+REPLACE_FIELDS+")".

[0096] `ignore.csv` is just a virtual name; no actual file is needed. Data is passed to the MySQL SDK as an `InputStream` using `mysqlStatement.setLocalInfileInputStream(inputStream)`.

[0097] This completes the final data entry into the database.

[0098] In some embodiments, this application created 2000 custom profile records, which were copied from one enterprise to another for data replication and conversion. All code was written in Java and tested in the same environment to ensure hardware consistency.

[0099] The first method is to implement the process without using this technical solution, but by using Java's official JDK methods and SQL statements.

[0100] The second method is to use this solution for data copying and conversion.

[0101] The final execution result is as follows:

[0102]

[0103] Using the above method, the data of the first company can be seamlessly copied to the second company for use without service interruption, enabling real-time data copying and conversion.

[0104] Figure 6 A block diagram of a data conversion apparatus provided in an embodiment of this application. The apparatus includes:

[0105] Memory 201; and processor 202 connected to the memory 201, the processor 202 being configured to: acquire a first database table relating to target data to be converted from a first enterprise, and acquire the target data from the first database table;

[0106] Identify the first ID data in the acquired target data and convert the first ID data into second ID data that can be used by the second enterprise;

[0107] The target data, after the operation of converting the first ID data into the second ID data is performed, is written into the second database table of the second enterprise to complete the data entry.

[0108] In some embodiments, the processor 202 is further configured to: identify the first ID data in the acquired target data using a method comprising:

[0109] A data dictionary is dynamically created, and the first ID data is identified through the data dictionary.

[0110] In some embodiments, the processor 202 is further configured to: dynamically create the data dictionary by including:

[0111] Monitor the database for newly added ID data related to the first enterprise;

[0112] The newly added ID data is acquired in real time, and the data dictionary with a tree structure is dynamically created and updated using the newly added ID data. The data dictionary is used to provide keyword prefix query and full text hit query.

[0113] In some embodiments, the processor 202 is further configured to: the method for identifying the first ID data through the data dictionary includes:

[0114] Based on the minimum length of the ID data in the system, a minimum retrieval length for the first ID data is set. When performing retrieval and identification, only strings with a length greater than or equal to the minimum retrieval length are selected for matching.

[0115] In some embodiments, the processor 202 is further configured to: a method for converting the first ID data into second ID data usable by the second enterprise includes:

[0116] Format conversion is performed using the string replace function.

[0117] In some embodiments, the processor 202 is further configured to: retrieve the target data from the first database table using a method comprising:

[0118] Using the first ID data as a query condition, the corresponding target data can be retrieved using the structured query language; and / or, using the update time field when the target data was configured as a query condition, the corresponding target data can be retrieved using the structured query language.

[0119] In some embodiments, the processor 202 is further configured to: write the target data after performing the operation of converting the first ID data into the second ID data into the second database table of the second enterprise, including:

[0120] Batch saving can be done using the INSERT statement or by using MySQL's large data import method, LOCK DATA.

[0121] For specific implementation methods, please refer to the aforementioned method embodiments, which will not be repeated here.

[0122] This application may be a method, apparatus, system, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this application.

[0123] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0124] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0125] The computer program instructions used to perform the operations of this application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may 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 a remote computer, the remote computer may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing state information from the computer-readable program instructions. These electronic circuits can execute the computer-readable program instructions to implement various aspects of this application.

[0126] Various aspects of this application are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0127] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0128] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0129] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, 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 an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive 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 a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0130] Note that, unless otherwise explicitly stated, all features disclosed in this specification (including any appended claims, abstract, and drawings) may be replaced by alternative features for achieving the same, equivalent, or similar purpose. Therefore, unless explicitly stated otherwise, each disclosed feature is merely one example of a set of equivalent or similar features. Where used, "further," "preferably," "even further," and "more preferably" are simple starting points for describing another embodiment based on the foregoing embodiments, the combination of which with the foregoing embodiments constitutes the complete configuration of another embodiment. Any combination of several "further," "preferably," "even further," or "more preferably" settings following the same embodiment constitutes yet another embodiment.

[0131] Although this application has been described in detail above with general descriptions and specific embodiments, some modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of this application fall within the scope of protection claimed in this application.

Claims

1. A data conversion method characterized by, The method comprises the following steps: obtaining a first database table related to target data to be converted by a first enterprise, and obtaining the target data from the first database table; identifying first ID data in the obtained target data, and converting the first ID data into second ID data available for a second enterprise; the method for identifying the first ID data in the obtained target data comprises: obtaining a dynamically created data dictionary, and identifying the first ID data through the data dictionary; writing the target data after performing the operation of converting the first ID data into the second ID data into a second database table of the second enterprise to complete data storage; the method for dynamically creating the data dictionary comprises: listening to newly added ID data related to the first enterprise in the database; real-time obtaining the newly added ID data, and dynamically creating and updating the data dictionary in a tree structure by using the newly added ID data, wherein the data dictionary is used to provide keyword prefix query and full-text hit query; the method for identifying the first ID data through the data dictionary comprises: based on the minimum length of the ID data in the system, setting the minimum search length of the first ID data, and only matching the string greater than or equal to the minimum search length when performing search and identification.

2. The data conversion method of claim 1, wherein, the method for converting the first ID data into the second ID data available for the second enterprise comprises: performing format conversion through the replace function of a string.

3. The data conversion method of claim 1, wherein, the method for obtaining the target data from the first database table comprises: querying the corresponding target data by using the first ID data as a query condition through a structured query language; and / or, querying the corresponding target data by using the update time field when the target data is configured as a query condition through a structured query language.

4. The data conversion method of claim 1, wherein, the method for writing the target data after performing the operation of converting the first ID data into the second ID data into the second database table of the second enterprise comprises: performing batch saving through an insert statement or completing the operation through a large data storage mode provided by mysql, load data.

5. A data conversion apparatus characterized by comprising: comprise: a memory; and a processor connected with the memory, wherein the processor is configured to: obtain a first database table related to target data to be converted by a first enterprise, and obtain the target data from the first database table; identify first ID data in the obtained target data, and convert the first ID data into second ID data available for a second enterprise; obtain a dynamically created data dictionary, and identify the first ID data through the data dictionary; write the target data after performing the operation of converting the first ID data into the second ID data into a second database table of the second enterprise to complete data storage; the method for dynamically creating the data dictionary comprises: listen to newly added ID data related to the first enterprise in the database; real-time obtaining the newly added ID data, and dynamically creating and updating the data dictionary in a tree structure by using the newly added ID data, wherein the data dictionary is used to provide keyword prefix query and full-text hit query; Real-time acquisition of the new ID data, dynamic creation and update of the data dictionary of the tree structure by using the new ID data, the data dictionary is used to provide keyword prefix query and full-text hit query; The method for identifying the first ID data through the data dictionary comprises: Based on the minimum length of the ID data in the system, the minimum search length of the first ID data is set, and when the search identification is performed, only the string equal to or greater than the minimum search length is intercepted for matching.

6. A computer storage medium having stored thereon a computer program, characterized in that The computer program is executed by a machine to implement the steps of the method in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Credit investigation data processing method and device, electronic equipment and computer readable medium

    CN114239519A

  • Data processing method, electronic equipment and readable storage medium

    CN114676138A

  • Data conversion method, device and equipment

    CN115408464A