DBF-based cross-network data exchange method, system, device and medium
By converting data into DBF format and using the data conversion engine, the problem of data heterogeneity and isolation in cross-business system and cross-network data exchange is solved, and a simplified data exchange process and efficient data transmission are achieved.
Patent Information
- Application Number
- CN202211662557.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-23
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-12-23
AI Technical Summary
Existing technology makes it difficult to realize data exchange across business systems and networks, especially due to data heterogeneity, inconsistent input and output formats, and network isolation.
Using a cross-network data exchange method based on DBF, the source file data is read and converted into DBF format, the import rule configuration template is obtained, the data is stored in the database, and the checksum format conversion is performed through the data conversion engine, and finally the data is exported to target end.
It realizes data exchange across business systems and networks, solves the problem of network isolation, simplifies the data exchange process, eliminates the need for personalized development on the source and target ends, and improves the speed of data exchange.
Smart Images

Figure CN115801883B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network transmission, and in particular to a DBF-based cross-network data exchange method, system, device and medium. Background Art
[0002] Different business departments and institutions often have their own business systems. When completing a certain task, they often need to use data across business systems. However, due to technical problems such as data heterogeneity, inconsistent data input and output formats, and network isolation between business system transmissions, data exchange between business system transmissions is difficult. Therefore, it is necessary to study data exchange methods that can achieve cross-business system and cross-network transmission and simplify the heterogeneous data exchange process.
[0003] For example, Chinese patent CN112165529A, published on January 1, 2021, is a method, device, equipment and medium for low-cost cross-network data exchange. The method includes: deploying a proxy applet at the source data end and the destination end respectively, setting a Kafka middleware at the source data end, and opening the Kafka port at the destination end; the request end encapsulates the request body through the proxy applet according to the interface API provided by the source data end, and sends the request body through the Kafka middleware at the source data end; after the proxy applet at the destination end listens to the message of the Kafka middleware, it parses the request body through the API, and then obtains the required data based on the parsed data, and then feeds the data back through the Kafka middleware; after the proxy applet at the source data end receives the data from the Kafka middleware, it immediately forwards it to the request end, so that data and APIs of different networks can be shared at a low cost, thereby improving work efficiency. However, this technical solution requires the deployment of proxy programs and Kafka middleware on the source and target ends to realize data exchange. In addition, when facing different source and target ends, the data structure is inconsistent and personalized input and output conversions are required separately. It does not solve the technical problems of the complicated heterogeneous data exchange process.
[0004] For example, Chinese patent CN113347252A, published on September 3, 2021, is a cross-network data exchange system based on file transfer. The invention includes a data transmission module, which is used to exchange data by file transfer; a monitoring module, which is used to store the data exchanged by the data transmission module locally when monitoring the transmission task; a reading and translation module, which is used to parse the data stored locally by the monitoring module and store it in the database, and update the information in the system; a network transfer module, which is used to transfer the data from the current network to another corresponding network after reading the data parsed by the reading and translation module; through file transfer, the crossing between two different networks is realized and a connection channel is established. The monitoring module can be used to encrypt the data in the transmitted file and store it in the file under the local specified path, classify the files, and prevent data confusion. However, this technical solution only realizes cross-network transmission, and does not convert heterogeneous data. Summary of the invention
[0005] The technical problem to be solved by the present invention is as follows: At present, there are technical problems such as data heterogeneity, inconsistent data input and output formats, and network isolation in the data exchange between business systems. A DBF-based cross-network data exchange method, system, device and medium are proposed, which can realize cross-network data exchange, and uniformly manage and convert data, thereby simplifying the data exchange process.
[0006] To solve the above technical problems, the present invention adopts the following technical solution: a DBF-based cross-network data exchange method, comprising the following steps:
[0007] Read source file data from a source end, and convert the source file data into DBF data;
[0008] Obtain an import rule configuration template, and store the DBF data in a database according to the import rule configuration template, and record it as stored data;
[0009] Verifying the stored data in the database, and deleting the stored data that fails the verification;
[0010] The verified stored data is input into a pre-established data conversion engine to obtain target business data in DBF format, and the DBF target business data is exported to the target end.
[0011] Preferably, the method for obtaining the import rule configuration template is:
[0012] The user's import configuration for the DBF data is received, the import configuration records the mapping relationship between the DBF data and the database field, and the import rule configuration template is generated according to the import configuration.
[0013] Preferably, the method for storing the DBF data in a database is:
[0014] A primary key of the DBF data is defined, and the DBF data is divided into a plurality of groups based on the value of the primary key, and the divided DBF data is stored in a database in groups.
[0015] Preferably, the method for storing the DBF data in a database comprises the following steps:
[0016] Establish a commit statement, wherein the commit statement stores a piece of the DBF data into a database;
[0017] respectively establishing submission statements corresponding to all the DBF data in the same group;
[0018] The submission statements corresponding to all the DBF data in the same group constitute a JBDC batch submission statement;
[0019] The DBF data is submitted to the database as a batch processing task through the JBDC batch submission statement.
[0020] As a preferred method, the method for verifying the stored data in the database is:
[0021] Configure field validation rules;
[0022] The entries in the database are checked according to the field check rules. When the check passes, the currently checked entries are retained. When the check fails, the currently checked entries are removed.
[0023] Preferably, the configuration method of the field verification rule is:
[0024] Receive the verification rule template library submitted by the user;
[0025] Perform attribute field segmentation on the data information of the database to obtain the attribute fields of the database;
[0026] Verification rule node information is selected from the verification rule template library, and the verification rule node information is associated with the attribute field of each database to form a field verification rule.
[0027] Preferably, the configuration method of the field verification rule is:
[0028] Read each column of the table of the database corresponding to the DBF data;
[0029] Receive the user's configuration of the validation rules for each column value;
[0030] The validation rules of all columns constitute the field validation rules.
[0031] A DBF-based cross-network data exchange system is used to execute the DBF-based cross-network data exchange method as described above, comprising:
[0032] Template configuration module, used to obtain import rule configuration template;
[0033] The data writing module is used to read the source file data at the source end, and store the DBF data converted from the source file data into the database according to the import rule configuration template, which is recorded as the stored data;
[0034] A verification engine, used to verify the stored data in the database;
[0035] A data conversion engine, used to convert the verified stored data into target business data in DBF format;
[0036] The data export module is used to export the DBF target business data to the target end and write it to the hard disk.
[0037] Preferably, the data export module includes a data buffer, and the data buffer is used to buffer the stored data retrieved from the database.
[0038] Preferably, when the template configuration module obtains the import rule configuration template, the following steps are performed:
[0039] The user's import configuration for the DBF data is received, the import configuration records the mapping relationship between the DBF data and the database field, and the import rule configuration template is generated according to the import configuration.
[0040] A computer device,
[0041] The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the DBF-based cross-network data exchange method as described above is implemented.
[0042] A computer readable storage medium,
[0043] The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the cross-network data exchange method based on DBF as described above is implemented.
[0044] The beneficial technical effects of the present invention include: adopting a DBF-based cross-network data exchange method, system, device and medium, and using DBF files to exchange data, which can realize cross-business system and cross-network data exchange, and solve the data exchange problem between high-density systems isolated by the network and external systems; using a data conversion engine to uniformly manage and convert data, so that a source end data can be converted into a business data format required by multiple target ends, and neither the source end nor the target end needs to do personalized data input and output development, which greatly simplifies the data exchange process; through multi-threading, setting data buffers and JDBC batch submission processing methods, it is possible to improve the speed of data exchange while supporting large amounts of data exchange.
[0045] Other features and advantages of the present invention will be disclosed in detail in the following specific embodiments and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The present invention will be further described below in conjunction with the accompanying drawings:
[0047] Figure 1 The present invention is a flowchart of a DBF-based cross-network data exchange method according to an embodiment of the present invention.
[0048] Figure 2 This is a flow chart of a method for storing DBF data into a database according to an embodiment of the present invention.
[0049] Figure 3 The present invention is a flowchart of a method for configuring field verification rules according to an embodiment of the present invention.
[0050] Figure 4 The figure is a schematic diagram of the structure of a cross-network data exchange system based on DBF according to an embodiment of the present invention.
[0051] Figure 5 The figure is a schematic diagram of the structure of a computer device according to an embodiment of the present invention.
[0052] Among them: 1. Template configuration module, 2. Data writing module, 3. Verification engine, 4. Data conversion engine, 5. Data export module, 6. Computer equipment, 7. Memory, 8. Processor, 9. Computer program. DETAILED DESCRIPTION
[0053] The technical solutions of the embodiments of the present invention are explained and described below in conjunction with the drawings of the embodiments of the present invention, but the following embodiments are only preferred embodiments of the present invention, not all. Based on the embodiments in the implementation mode, other embodiments obtained by those skilled in the art without creative work are all within the protection scope of the present invention.
[0054] In the following description, terms such as "inside", "outside", "up", "down", "left", "right", etc. that indicate directions or positional relationships are only used to facilitate the description of the embodiments and simplify the description, and do not indicate or imply that the referred device or element must have a specific direction, be constructed and operate in a specific direction. Therefore, it should not be understood as a limitation of the present invention.
[0055] Before describing the technical solution of this embodiment in detail, the background of the application of this embodiment is first introduced.
[0056] With the popularization and development of computer technology and network technology, many units have developed a large number of computer application system software in combination with actual work needs, including a large number of network business systems, which provide reliable support for solving practical problems in specific work and realizing office automation of units. However, with the gradual deepening of digital transformation of enterprises, enterprises pay more and more attention to the protection of core data assets; in order to prevent the leakage of internal core data, most enterprises have implemented internal and external network isolation, and even divided the internal network into R&D network, office network, production network, etc. The use of network isolation has greatly improved the overall security level of the network and ensured the security of data. However, in today's professional division of labor and cooperation, enterprises increasingly need to frequently exchange data with external customers, partners, etc., and network isolation has become a major obstacle to the efficient external collaboration of enterprises. Therefore, without modifying the business implementation mode of the source and the end and ensuring the security of data files, it is particularly important to realize heterogeneous data exchange across networks, departments, and business systems, and solve the problem of data exchange between high-density systems with network isolation and external systems.
[0057] Heterogeneous data, as the name implies, refers to data with different structures. Heterogeneous data is often not heterogeneous at one level, but heterogeneous at multiple levels. Heterogeneous data is mainly reflected in the following three levels:
[0058] 1. Heterogeneity of business systems: Data storage comes from different business systems, such as Unix, Windows, Linux, OS / 400, etc.
[0059] 2. Heterogeneity of data formats: The data storage and management mechanisms are different. It can be a relational database system, such as Oracle, SQL Server, DB2, etc., or it can be two-dimensional file row data, such as txt, CSV, XLS, etc.
[0060] 3. Heterogeneous logical model of data storage: Data is stored and maintained in different business logics, so data with the same meaning may be presented in heterogeneous ways; for example, department coding is inconsistent between an independent sales system and an independent procurement system.
[0061] The goal of heterogeneous data integration is to achieve the merging and sharing of data information resources, hardware equipment resources and human resources among data of different structures.
[0062] Different business departments and institutions often have their own business systems. When completing a task, they often need to use data across business systems. However, due to technical problems such as data heterogeneity, inconsistent data input and output formats, and network isolation between business system transmissions, data exchange between business system transmissions is difficult. Therefore, it is urgent to develop a data exchange method that can achieve cross-business system and cross-network transmission and simplify the heterogeneous data exchange process.
[0063] To this end, the present application embodiment provides a cross-network data exchange method based on DBF, please refer to the attached Figure 1 , including the following steps:
[0064] Step A01) Read source file data from the source end and convert the source file data into DBF data.
[0065] Among them, DBF is a database file format. DBF format database is a commonly used desktop database. As a standard format for storing structured data in commercial applications, DBF format files are widely used in data exchange in business systems of various enterprises and institutions.
[0066] The operation of converting the source file data into DBF data is similar to the operation of converting the format of the source file data in the related art, and is not elaborated in detail in the embodiment of the present application.
[0067] Step A02) Obtain an import rule configuration template, and store the DBF data in a database according to the import rule configuration template, and record it as stored data.
[0068] Furthermore, the method for obtaining the import rule configuration template is:
[0069] Receive the user's import configuration for DBF data, the import configuration records the mapping relationship between DBF data and database fields, and generate an import rule configuration template based on the import configuration.
[0070] In the process of business processing of a company, it is usually necessary to use a rule configuration tool to configure the usage rules of business data. However, many existing rule configuration tools require hard-coding settings in programming languages, with complex syntax. At the same time, they are mainly aimed at professional developers, and it is not easy for business personnel to intervene, and it is impossible to achieve decoupling and separation between business logic and code. Therefore, this embodiment preferably adopts a method of receiving the user's import configuration of DBF data and then generating an import rule configuration template, providing users with a simple and flexible configuration interface, so that non-professionals can configure business logic, reducing the processing complexity of rule configuration, and improving the user experience.
[0071] Step A03) Verify the stored data in the database and delete the stored data that fails the verification.
[0072] Step A04) Input the verified stored data into a pre-established data conversion engine to obtain the target business data in DBF format, and export the DBF target business data to the target end.
[0073] Among them, the data exchange platform refers to an information exchange platform built through a computer network by integrating several decentralized application information systems. It enables several application subsystems to transmit and share information / data, improve the utilization rate of information resources, and become the basic goal of information construction. It ensures the interconnection between distributed heterogeneous systems, establishes a central database, completes data extraction, concentration, loading, and display, and constructs unified data processing and exchange. The data exchange engine module is the core of the entire data exchange platform and is the key functional module for realizing all data exchange tasks. The data exchange engine module is a system service that is responsible for triggering and executing all published data exchange tasks.
[0074] Data exchange with the help of DBF files can realize data exchange across business systems and networks, solving the problem of data exchange between high-density systems isolated by the network and external systems; unified management and conversion of data through the data conversion engine allows a source data to be converted into business data formats required by multiple target ends, and neither the source end nor the target end needs to do personalized data input and output development, greatly simplifying the data exchange process.
[0075] On the other hand, in this embodiment, the method for storing DBF data in the database is:
[0076] Define the primary key of the DBF data, divide the DBF data into multiple groups based on the primary key value, and store the divided DBF data in the database in groups.
[0077] The relational database itself is more likely to become a system bottleneck, and the storage capacity, number of connections, and processing power of a single machine are all limited. When the amount of data in a single table reaches 10 million or 100 GB, due to the large number of query dimensions, even if slave libraries are added and indexes are optimized, the performance still degrades severely when many operations are performed. For this reason, this embodiment uses a data segmentation method and introduces multi-threading to improve the storage speed of data. Among them, data segmentation is to store data in multiple databases in a dispersed manner, so that the amount of data in a single database becomes smaller, and the performance problem of a single database is alleviated by expanding the number of hosts, thereby achieving the purpose of improving the database operation performance.
[0078] On the other hand, in this embodiment, please refer to the attached Figure 2 , the method for storing DBF data into a database comprises the following steps:
[0079] Step B01) Create a commit statement, which stores a DBF data into the database;
[0080] Step B02) respectively establish submission statements corresponding to all DBF data in the same group;
[0081] Step B03) the submission statements corresponding to all DBF data in the same group constitute JBDC batch submission statements;
[0082] Step B04) Submit the DBF data to the database as a batch processing task through the JBDC batch submit statement.
[0083] JDBC (Java Data Base Connectivity) is a Java API for executing SQL statements. It can provide unified access to multiple relational databases. It consists of a set of classes and interfaces written in Java. JDBC provides a benchmark on which more advanced tools and interfaces can be built, enabling database developers to write database applications. JDBC batch processing means that a batch (group) of SQL operations can be executed. Get a connection once, and then splice multiple SQL statements into one to execute. Batch processing can make database execution performance faster and effectively improve the speed of writing DBF data to the database.
[0084] On the other hand, in this embodiment, the method for verifying the stored data in the database is:
[0085] Configure field validation rules;
[0086] The database entries are verified according to the field verification rules. When the verification passes, the currently verified entries are retained. When the verification fails, the currently verified entries are removed.
[0087] Furthermore, the database entries are verified using a batch verification method. According to the configured field verification rules, the database entries are screened in batches. When the verification passes, the current batch verified entries are retained. When the verification fails, the current batch verified entries are removed.
[0088] On the other hand, in this embodiment, please refer to the attached Figure 3 , the configuration method of field validation rules is:
[0089] Step C01) receiving the verification rule template library submitted by the user;
[0090] Step C02) performing attribute field segmentation on the data information of the database to obtain the attribute fields of the database;
[0091] Step C03) Select verification rule node information from the verification rule template library, and associate the verification rule node information with the attribute field of each database to form a field verification rule.
[0092] On the other hand, this embodiment also provides a method for configuring field verification rules:
[0093] Read each column of the table corresponding to the DBF data in the database;
[0094] Receive the user's configuration of the validation rules for each column value;
[0095] The validation rules for all columns constitute the field validation rules.
[0096] On the other hand, the embodiment of the present application also provides a DBF-based cross-network data exchange system for executing the DBF-based cross-network data exchange method as described above, see the attached Figure 4 ,include:
[0097] Template configuration module 1, used to obtain the import rule configuration template;
[0098] The data writing module 2 is used to read the source file data at the source end, and store the DBF data converted from the source file data into the database according to the import rule configuration template, which is recorded as the stored data;
[0099] Verification engine 3, used to verify the stored data in the database;
[0100] The data conversion engine 4 is used to convert the verified stored data into target business data in DBF format;
[0101] The data export module 5 is used to export the DBF target business data to the target end and write it to the hard disk.
[0102] Data exchange with the help of DBF files can realize data exchange across business systems and networks, solving the problem of data exchange between high-density systems isolated by the network and external systems; unified management and conversion of data through the data conversion engine 4 allows a source data to be converted into business data formats required by multiple target ends, and neither the source end nor the target end needs to do personalized data input and output development, greatly simplifying the data exchange process.
[0103] On the other hand, in this embodiment, the data export module 5 includes a data buffer, and the data buffer is used to buffer the stored data retrieved from the database.
[0104] Disk performance greatly affects the data writing speed. This embodiment introduces a data buffer to reduce the number of disk writes when the database retrieves stored data, thereby increasing the data writing speed.
[0105] On the other hand, in this embodiment, when the template configuration module 1 obtains the import rule configuration template, the following steps are performed:
[0106] Receive the user's import configuration for DBF data, the import configuration records the mapping relationship between DBF data and database fields, and generate an import rule configuration template based on the import configuration.
[0107] This embodiment preferably adopts a method of receiving the user's DBF data import configuration and then generating an import rule configuration template, providing the user with a concise and flexible configuration interface, allowing non-professionals to perform business logic configuration, reducing the processing complexity of rule configuration and improving the user experience.
[0108] A computer device, see attached Figure 5 ,
[0109] The computer device 6 includes a memory 7, a processor 8, and a computer program 9 stored in the memory 7 and executable on the processor 8. When the computer program 9 is executed by the processor 8, the DBF-based cross-network data exchange method as described above is implemented.
[0110] The processor 8 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor 8.
[0111] The memory 7 stores a program code, and the program code can be executed by the processor 8, so that the processor 8 executes any one of the above DBF-based cross-network data exchange methods of this specification. In some embodiments, the memory 7 can be an internal storage unit of the computer device 6, such as a hard disk or memory of the computer device 6. In other embodiments, the memory 7 can also be an external storage device of the computer device 6, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 6. Further, the memory 7 can also include both an internal storage unit of the computer device 6 and an external storage device.
[0112] A computer readable storage medium,
[0113] The computer-readable storage medium stores a computer program 9 , and when the computer program 9 is executed by the processor 8 , the cross-network data exchange method based on DBF as described above is implemented.
[0114] Among them, computer-readable storage media can be any tangible media that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0115] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Those skilled in the art should understand that the present invention includes but is not limited to the contents described in the drawings and the above specific embodiments. Any modification that does not deviate from the functional and structural principles of the present invention will be included in the scope of the claims.
Claims
1. A cross-network data exchange method based on DBF, characterized in that: The following steps are involved: Read source file data from a source end, and convert the source file data into DBF data; Obtain an import rule configuration template, and according to the import rule configuration template, use a data segmentation method and a JDBC batch processing method to store the DBF data in a database, which is recorded as storage data; Verifying the stored data in the database, and deleting the stored data that fails the verification; Input the verified stored data into a pre-established data conversion engine to obtain target business data in DBF format, and export the target business data in DBF format to a target end; The method for obtaining the import rule configuration template is as follows: An import configuration for the DBF data is received, the import configuration records a mapping relationship between the DBF data and a database field, and the import rule configuration template is generated according to the import configuration.
2. The DBF-based cross-network data exchange method according to claim 1, characterized in that: The method of storing the DBF data in the database is: A primary key of the DBF data is defined, and the DBF data is divided into a plurality of groups based on the value of the primary key, and the divided DBF data is stored in a database in groups.
3. The DBF-based cross-network data exchange method according to claim 2, characterized in that: The method for storing the DBF data in a database comprises the following steps: Establish a commit statement, wherein the commit statement stores a piece of the DBF data into a database; respectively establishing submission statements corresponding to all the DBF data in the same group; The submission statements corresponding to all the DBF data in the same group constitute a JBDC batch submission statement; The DBF data is submitted to the database as a batch processing task through the JBDC batch submission statement.
4. The DBF-based cross-network data exchange method according to claim 1, characterized in that: The method for verifying the stored data in the database is: Configure field validation rules; The entries in the database are checked according to the field check rules. When the check passes, the currently checked entries are retained. When the check fails, the currently checked entries are removed.
5. The DBF-based cross-network data exchange method according to claim 4, characterized in that: The configuration method of the field verification rule is: Receive submitted verification rule template library; Perform attribute field segmentation on the data information of the database to obtain the attribute fields of the database; Verification rule node information is selected from the verification rule template library, and the verification rule node information is associated with the attribute field of each database to form a field verification rule.
6. The DBF-based cross-network data exchange method according to claim 4, characterized in that: The configuration method of the field verification rule is: Read each column of the table of the database corresponding to the DBF data; Receive the configuration of validation rules for each column value; The validation rules of all columns constitute the field validation rules.
7. A DBF-based cross-network data exchange system, used to execute a DBF-based cross-network data exchange method according to any one of claims 1 to 6, characterized in that: include: Template configuration module, used to obtain import rule configuration template; The data writing module is used to read the source file data at the source end, and store the DBF data converted from the source file data into the database according to the import rule configuration template, which is recorded as the stored data; A verification engine, used to verify the stored data in the database; A data conversion engine, used to convert the verified stored data into target business data in DBF format; The data export module is used to export the target business data in the DBF format to the target end and write it into the hard disk.
8. The DBF-based cross-network data exchange system according to claim 7, characterized in that: The data export module includes a data buffer, and the data buffer is used to buffer the stored data retrieved from the database.
9. The DBF-based cross-network data exchange system according to claim 7, characterized in that: When the template configuration module obtains the import rule configuration template, the following steps are performed: An import configuration for the DBF data is received, the import configuration records a mapping relationship between the DBF data and a database field, and the import rule configuration template is generated according to the import configuration.
10. A computer device, characterized in that: The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the DBF-based cross-network data exchange method according to any one of claims 1 to 6 is implemented.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the DBF-based cross-network data exchange method according to any one of claims 1 to 6 is implemented.
