A data transmission system, method and storage medium based on internal and external network isolation
By introducing configuration items and feature tags into the data transmission system isolated by internal and external networks, the problem of fixed parameters during data transmission is solved, and the flexibility and configurability of data transmission are achieved.
Patent Information
- Application Number
- CN202411155008.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-08-22
AI Technical Summary
In the prior art, in the data transmission process under the isolation of internal and external networks, there is a lack of flexibility and the transmission parameters cannot be set dynamically, resulting in fixed and inflexible data transmission.
Design a data transmission system based on internal and external network isolation, and generate configuration items through external transmission service units, including configuration feature tags for data query and transmission, allowing users to customize data sources, read numbers, encryption algorithms, etc. to realize data Flexible configuration of the transmission process.
It realizes high flexibility in the data transmission process, and users can adjust the reading and transmission parameters in real time according to their needs, improving the configurability of data transmission.
Smart Images

Figure CN118677703B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of network management, and in particular to a data transmission system, method and storage medium based on internal and external network isolation. Background Art
[0002] Based on security requirements, quite a number of enterprises adopt a network structure that isolates the internal and external networks, that is, physically or logically isolate the internal network from the external network in the network environment to ensure the security and stability of the internal network. This isolation is usually achieved through technical means such as firewalls, routers, and network isolation devices. Its main purpose is to prevent adverse factors in the external network (such as malware, network attacks, etc.) from threatening and damaging the internal network.
[0003] In current technology, data transmission in the case of internal and external network isolation basically adopts the direct method of jdbc. jdbc is specifically identified as Java Database Connection, which is used to provide an application program interface for standardizing how client programs access databases through Java language, and provides methods such as querying and updating data in the database. Its service saves data to the target database, and the receiver directly obtains data from the target database through jdbc.
[0004] However, in JDBC, the screening conditions during data transmission are fixed and cannot be set. This results in the inability to set and update related parameters during the transmission process. All parameter contents are fixed in the system and can only be set by modifying the program, which lacks flexibility in data transmission. Summary of the invention
[0005] In order to improve the configurable flexibility during data transmission, the present application provides a data transmission system, method and storage medium based on internal and external network isolation.
[0006] In the first aspect, the present application provides a data transmission system based on internal and external network isolation, which adopts the following technical solutions:
[0007] A data transmission system based on internal and external network isolation includes an isolation device for isolating an internal network part from an external network part, including an external transmission service unit corresponding to the external network part, an internal receiving service unit corresponding to the internal network part, and an internal network data using unit, wherein:
[0008] The external transmission service unit generates a configuration item based on the configuration requirement, wherein the configuration item includes a plurality of configuration fields, each of which stores a corresponding configuration feature tag, and the types of the configuration feature tags include data query and data transmission;
[0009] The external transmission service unit reads corresponding data from a data source at a target location based on the configuration item for data query, and transmits the data to the internal receiving service unit based on the configuration item for data transmission;
[0010] The internal receiving service unit receives the data, and the intranet data usage unit contains several service interfaces registered and connected to the internal receiving service unit. The internal receiving service unit transmits the data to the service interface corresponding to the corresponding transmission requirement based on the configuration items for data transmission.
[0011] In some embodiments, the external transmission service unit specifically includes:
[0012] A configuration management module, used to read the configuration requirements to generate configuration items, wherein the configuration feature tags used for data query in the configuration items include data source, data table name, execution incremental SQL, number of read entries, and the configuration feature tags also include encryption algorithms;
[0013] A data query module selects the target location based on the data source, and queries and reads the corresponding data in the data source corresponding to the target location based on the data table name, wherein when reading the data source, the number of data items read each time is determined based on the number of items read, and whether the reading process is completed is confirmed based on the execution of the incremental SQL;
[0014] A data encryption module, encrypting the data read from the data source based on the encryption algorithm;
[0015] The data cross-zone transmission module obtains the encrypted data and transmits the data to the internal receiving service unit.
[0016] In some of the embodiments, the configuration feature tag used for the data query also includes an excess time, and the data query module is further used to obtain the reading time corresponding to when reading data from the data source, and compare the reading time with the excess time. When the reading time is greater than the excess time, the reading of the data is interrupted and an error record is generated.
[0017] In some of the embodiments, the configuration feature tag for the data query further includes the number of execution tables and the total amount of sql, wherein the number of execution tables is characterized by the number of transmission data tables allowed to be executed simultaneously;
[0018] The data query module is also used to generate a plurality of independent query task threads based on the number of execution tables, each of the query task threads corresponds to one of the transmission data tables and each of the query task threads corresponds to a group of the configuration feature tags for the data query;
[0019] When each of the query task threads confirms that the reading process is completed based on the execution of the incremental SQL, the data query module is also used to generate summary data based on the total amount SQL and send it to the internal receiving service unit through the cross-zone transmission module.
[0020] In some embodiments, the configuration feature tag for data transmission in the configuration item generated by the configuration management module includes a transmission address and a number of transmissions, and the configuration feature tag also includes a decryption algorithm, and the internal receiving service unit specifically includes:
[0021] An interface registration module, used to obtain registration requests of several service interfaces in the intranet data use unit, and complete the registration connection with each service interface based on the registration request, wherein the registration request includes an interface address corresponding to each service interface;
[0022] A data receiving module, used to obtain the data transmitted by the data cross-zone transmission module, and extract the transmission address and the number of transmission entries corresponding to the data;
[0023] A data decryption module, decrypting the data acquired by the data receiving module based on the decryption algorithm;
[0024] The data sending module searches for the corresponding service interface in the intranet data using unit based on the transmission address, and transmits the decrypted data based on the number of transmissions.
[0025] In some embodiments, after receiving the data, the intranet data using unit is further used to:
[0026] Determine the data type of the data, the data type includes single data and the summary data;
[0027] If the data is the single data, determine whether the data exists, and generate a return result to the internal receiving service unit, wherein the return result includes: if it already exists, update the currently existing data according to the data, and if it does not exist, add the data;
[0028] If the data is the summary data, the number of transmission items is compared with the total amount sql corresponding to the summary data to generate a transmission result, and a return result is generated to the internal receiving service unit.
[0029] In some embodiments, the returned result includes a transmission status, and the internal receiving service unit further includes an automatic push module, the automatic push module is used to generate a timed query task, and the timed query task includes a timed time, a query object, and target data;
[0030] The automatic re-push module selects the query object within the timing time and queries the transmission status of the target data in the query object. If the transmission status is failure, the re-push instruction is automatically returned to resend the target data. If the number of resending exceeds a preset number, the target data is marked to return manual processing information.
[0031] In some of the embodiments, the data sending module further includes a data ranking module and a task allocation module;
[0032] The data ranking module is used to query the transmission progress corresponding to the data currently transmitted by each of the service interfaces, and rank each of the service interfaces from high to low based on the transmission progress;
[0033] The task allocation module is used to determine the average transmission speed corresponding to the data currently transmitted by each of the service interfaces, and when the average transmission speed is lower than a preset speed, generate a preset number of priority transmission instructions and transmission suspension instructions, and send the preset number of priority transmission instructions to the corresponding service interfaces in order according to the ranking to continue transmission, and send the transmission suspension instructions to the remaining service interfaces to stop transmission;
[0034] The task allocation module is further configured to convert the transmission stop instructions of a corresponding number of the service interfaces into the priority transmission instructions in sequence after the transmission of the service interface corresponding to the priority transmission instruction is completed.
[0035] In the second aspect, the present application provides a data transmission method based on internal and external network isolation, which adopts the following technical solution:
[0036] A data transmission method based on internal and external network isolation includes the following steps:
[0037] The external transmission service unit generates a configuration item based on the configuration requirement, wherein the configuration item includes a plurality of configuration fields, each of which stores a corresponding configuration feature tag, and the types of the configuration feature tags include data query and data transmission;
[0038] The external transmission service unit reads corresponding data from the data source at the target location based on the configuration item for data query, and transmits the data to the external transmission service unit based on the configuration item for data transmission;
[0039] The internal receiving service unit receives the data, and based on the configuration item for data transmission, the internal receiving service unit transmits the data to a corresponding service interface registered and connected to the internal receiving service unit in the intranet data using unit.
[0040] In a third aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution:
[0041] A computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the above method when executed by a processor.
[0042] The technical solution provided by the embodiments of the present application has the following technical effects:
[0043] The process of generating data and transmitting data is separated. Each process has corresponding configuration items that can be modified and set based on the configuration requirements input by the user. The configuration items are used to adjust the different transmission states in the data generation and data transmission process in real time. The SQL read, the number of entries read each time, and the number of entries transmitted each time can be configured accordingly, which has extremely high flexibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a module framework diagram of a data transmission system based on an intranet and an extranet in some embodiments of the present application.
[0045] Figure 2 It is a module framework diagram of a data transmission system based on an intranet and an extranet in some embodiments of the present application.
[0046] Figure 3 It is a flowchart corresponding to the data query generation process in the embodiment of the present application.
[0047] Figure 4 It is a flowchart corresponding to the data transmission process in the embodiment of the present application.
[0048] Figure 5 It is a flowchart corresponding to the automatic data supplementation process in the embodiment of the present application.
[0049] Figure 6 It is a schematic diagram of the steps of the data transmission method based on the intranet and extranet in an embodiment of the present application. DETAILED DESCRIPTION
[0050] To more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. However, it should be understood by those of ordinary skill in the art that the present application can be implemented without these details. In some cases, in order to avoid unnecessary descriptions that make various aspects of the present application obscure, well-known methods, processes, systems, components and / or circuits that have been described at a higher level will not be described in detail. For those of ordinary skill in the art, it is obvious that various changes can be made to the embodiments disclosed in the present application, and without departing from the principles and scope of the present application, the general principles defined in the present application can be applied to other embodiments and application scenarios. Therefore, the present application is not limited to the embodiments shown, but conforms to the broadest scope consistent with the scope claimed for protection of the present application.
[0051] It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention. In addition, the technical features involved in each embodiment of the present invention described below can be combined with each other as long as there is no conflict between them.
[0052] In the description of this application, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used to distinguish the technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0053] In the description of the present application, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples.
[0054] The embodiment of the present application discloses a data transmission system based on isolation of internal and external networks.
[0055] like Figure 1 As shown, a data transmission system based on internal and external network isolation includes an isolation device for isolating an internal network part from an external network part. In the embodiment of the present application, the isolation device is a physical device for isolating the internal and external networks.
[0056] It also includes an external transmission service unit corresponding to the external network part, an internal receiving service unit corresponding to the internal network part, and an internal network data use unit. The external network transmission service unit is mainly responsible for data query, generation, encryption, etc., and transmits external data to the internal network safely and quickly. The internal receiving service unit is mainly used to receive data transmitted from the external network part, and after relevant processing, it is passed to the data demander. The internal network data use unit stores several data demanders, each of which is connected to the internal receiving service unit through a service interface to receive data.
[0057] The external transmission service unit generates configuration items based on the configuration requirements, and each configuration item includes a number of configuration fields. In the initial state, each configuration field is a blank field, and each configuration field is used to store configuration feature tags of different configuration requirements. The content of the configuration feature tag is associated with the configuration requirements issued by the user, and the configuration requirements are the transmission requirements selected by the user, such as what data to transmit, the target location of the transmission, how much data to transmit at the same time, etc. Among them, the types of configuration feature tags include those for data query and data transmission. The configuration feature tag for data query is characterized as the configuration parameters needed to query and obtain the corresponding data from the corresponding data source based on certain configuration requirements, and the configuration feature tag for data transmission is characterized as the configuration parameters needed to transfer data to the corresponding location based on certain configuration requirements.
[0058] The external transmission service unit reads corresponding data from a data source at a target location based on the configuration item for data query, and transmits the data to the external transmission service unit based on the configuration item for data transmission.
[0059] The data source represents the source of the data. Different data corresponds to different data sources.
[0060] Based on the configuration items for data query, the source, data name, query volume and other information of the data to be queried are obtained. After reading the required data from the data source, the data is sent to the internal receiving service unit according to the configuration requirements based on the configuration items for data transmission, such as transmission speed.
[0061] The internal receiving service unit receives the data and sends the data to the connected intranet data using unit. The intranet data using unit has several service interfaces, each of which corresponds to a data demander, and each of the service interfaces is registered and connected to the internal receiving service unit.
[0062] After receiving the data, the internal receiving service unit will send the data to the service interface that meets the transmission configuration requirements according to the configuration items used for data transmission. The service interface will transmit the data to the server corresponding to the subsequent demander to complete the data transmission work.
[0063] Through the above technical solution, the processes of generating data and transmitting data are first separated. Each process corresponds to a configuration item that can be modified and set based on the configuration requirements input by the user. The different transmission states in the data generation and data transmission process are adjusted in real time through the configuration items. The SQL read, the number of items read each time, and the number of items transmitted each time can all be configured accordingly, which has extremely high flexibility.
[0064] like Figure 2 and Figure 3 As shown, in some other embodiments, the external transmission service unit specifically includes:
[0065] The configuration management module is used to read configuration requirements to generate configuration items. Among them, the configuration feature tags used for data query in the configuration items include data source, data table name, execution incremental SQL, and number of reads. The configuration feature tags also include encryption algorithms.
[0066] The configuration management module is configured with configuration items for generating data, transmitting data, and subsequent encryption and decryption. Specifically, the data source is represented by the specific data source corresponding to the data required by the configuration, for example, the data source is the human resources library; the data table name is the table name of the configured data that needs to be transmitted. When data is transmitted, the acquired and transmitted data are stored in the corresponding table; the execution of incremental SQL is represented by the SQL required for generating data every day; the number of reads is represented by the number of data items each time a query is performed in the data source.
[0067] The data query module is an executor of SQL, which is used to execute the corresponding statement instructions of SQL to query the corresponding data in the data source. It determines the target location based on the data source, and the target location corresponds to one or more data sources. Then, based on the data indication, it queries the corresponding data in the corresponding database and reads it. The number of data read each time depends on the number of reads configured by the user. After reading the corresponding data, it determines whether all the required data has been read based on the incremental SQL. When the number of read data matches the number of incremental SQL, the reading process is considered to be completed.
[0068] The data encryption module is used to encrypt the read data using a preset encryption algorithm.
[0069] The data cross-zone transmission module, after the data encryption is completed, calls the internal receiving service unit to send the encrypted data to the internal receiving service unit. After the internal receiving service unit receives the corresponding data, it saves the data to complete the data query and cross-zone transmission.
[0070] In other embodiments, the configuration feature tag for data query also includes an excess time, where the excess time is characterized as the maximum time for reading data configured by the user.
[0071] The data query module is also used to obtain the corresponding reading time when reading data from the data source, and compare the reading time with the exceeding time. If the reading time is greater than the exceeding time, it means that the time consumed for querying and reading a certain data exceeds the maximum time required by the user to read the data. At this time, it is necessary to terminate the reading of the table corresponding to the data and make an error record. The user can know the abnormal problems that occurred during the data reading process based on the error record.
[0072] In other embodiments, the configuration feature tag for data query also includes the number of execution tables and the total amount of SQL, wherein the number of execution tables is represented by the number of transmission data tables allowed to be executed simultaneously, and the total amount of SQL is represented by the sum of all SQLs that need to be used in the query process configured based on the data table name.
[0073] The data query module is also used to generate multiple independent query task threads based on the number of execution tables, each query task thread corresponds to a transmission data table and each query task thread corresponds to a set of configuration feature tags for data query.
[0074] In this way, multiple independent task threads are generated according to the configuration items, and each independent query task thread corresponds to a table to perform data generation tasks respectively. This is different from the serial transmission in the related technology. In serial transmission, the data volume of each transmission data table is different, so the corresponding consumption time of each table is different, resulting in the data cannot be transmitted within the specified time. The present application adopts asynchronous multi-threading to operate simultaneously, and the transmission status and transmission time of each table will not be affected by other tables, ensuring that all tables can be successfully transmitted within the specified time range.
[0075] When each query task thread confirms that the reading process is completed based on the execution of incremental SQL, the data query module generates summary data based on the total SQL and sends it to the internal receiving service unit through the cross-zone propagation module. The summary data is the summary information generated for the data transmitted each time the data is completed, mainly including: [data source name], [table name], [how much data was transmitted this time], [total data in the table after the transmission is completed], which is used to judge the overall data transmission integrity when the subsequent data is transmitted to the intranet data usage unit.
[0076] like Figure 2 and Figure 4As shown, in other embodiments, the configuration feature tag for data transmission in the configuration item generated by the configuration management module includes a transmission address and a number of transmission items, wherein the transmission address is represented by an interface address corresponding to a service interface that needs to receive the data, and the number of transmission items is represented by the number of data items contained in a transmission message corresponding to each transmission, and the configuration feature tag also includes a decryption algorithm.
[0077] The internal receiving service unit specifically includes:
[0078] The interface registration module is used to obtain registration requests of several service interfaces in the intranet data use unit and complete the registration connection with each service interface based on the registration request. The registration request contains the interface address corresponding to each service interface.
[0079] All parties who need to receive data need to register their corresponding service interface to the intranet interface service unit. During registration, a corresponding interface address will be generated for subsequent data transmission.
[0080] The data receiving module is used to obtain the data transmitted by the data cross-zone transmission module and extract the transmission address and transmission number corresponding to the data.
[0081] The internal receiving service unit receives the data sent by the external network transmission service unit and obtains the configuration information corresponding to the data.
[0082] The data decryption module decrypts the acquired data based on the decryption algorithm, and the decryption algorithm and the encryption algorithm are interrelated.
[0083] The data sending module queries the corresponding service interface in the intranet data use unit based on the transmission address, and transmits the decrypted data based on the number of transmissions.
[0084] Used to send the saved data to the corresponding service interface according to the configuration requirements, and the number of transmissions corresponds to the corresponding transmission rate.
[0085] In some other embodiments, after receiving the data, the intranet data using unit is further used to:
[0086] Determine the data type of the data, which includes single data and summary data.
[0087] The data received by the intranet data usage unit includes ordinary single data and final summary data. Receiving summary data indicates that the corresponding server has obtained all the data in the transmission task. In order to achieve real-time monitoring of the data transmission process, it is necessary to make corresponding data judgments after obtaining the data to timely discover data transmission problems. At the same time, different data types have different corresponding processing methods.
[0088] If the data is a single data, it is determined whether the data exists, and a return result is generated to the internal receiving service unit.
[0089] When a single data is obtained, it is necessary to determine whether the data already exists in the data demander. If it does, the existing old data will be overwritten and updated according to the newly received data. If the data does not exist in the demander, the data will be treated as new data. At the same time, after the corresponding processing, a return result needs to be generated and sent to the internal receiving service unit for the user to view.
[0090] If the data is summary data, the number of transmissions is compared with the total amount sql corresponding to the summary data to generate a transmission result, and a return result is generated to the internal receiving service unit.
[0091] If the data obtained is summary data, it means that the data transmission process from the external network to the internal network has been completed, and the corresponding data has theoretically been completely transmitted to the corresponding data demander. At this time, it is necessary to verify whether there are any abnormalities in the complete transmission process, including data loss.
[0092] Therefore, it is necessary to integrate the number of transmissions monitored in real time to calculate the total amount, and compare the calculated total amount with the total amount sql configured in the summary data to verify whether the data transmission is correct as a whole. If the number does not match, it means that data duplication, error transmission or data loss may occur during the transmission process. After the judgment is completed, the corresponding return result is also generated to the internal receiving service unit.
[0093] Through the above method, the data is counted each time it is transmitted and checked with the receiver of the data to ensure the correctness of each transmission.
[0094] like Figure 2 and Figure 5 As shown, in other embodiments, the returned result includes the transmission status, and the internal receiving service unit also includes an automatic push module, which is used to generate a scheduled query task, and the scheduled query task includes a scheduled time, a query object, and target data. The scheduled time is characterized by a set execution frequency, such as running once every three minutes, the query object is characterized by the service interface corresponding to the demand side that needs to be queried, and the target data is characterized by the specific data that needs to be queried.
[0095] The automatic push module selects the query object within the scheduled time and queries the transmission status of the target data in the query object, which includes transmission success and transmission failure. If a transmission failure is detected, a push instruction will be automatically generated, which will cause the internal receiving service unit to resend the failed data to the intranet data usage unit.
[0096] At the same time, if the number of resends exceeds the preset number, the target data will be marked to return the manual processing information. The preset number is generally 5 times. If the resend is unsuccessful for five times, the data transmission is marked as failed and the manual processing link is performed.
[0097] In some other embodiments, the data sending module also includes a data ranking module and a task allocation module.
[0098] The data ranking module is used to query the transmission progress corresponding to the data currently transmitted by each service interface, and rank each service interface from high to low based on the transmission progress.
[0099] The transmission progress is represented by the ratio between the amount of data already obtained by the data demander corresponding to the current service interface and the total amount of SQL. The higher the transmission progress, the closer the demander's demand data is to being fully transmitted.
[0100] Then, the service interfaces are sorted according to the transmission progress. The higher the ranking, the closer the transmission task is to completion.
[0101] The task allocation module is used to determine the average transmission speed corresponding to the data currently transmitted by each service interface, and when the average transmission speed is lower than a preset speed, generate a preset number of priority transmission instructions and transmission suspension instructions.
[0102] Subsequently, the task allocation module is used to determine the average transmission speed corresponding to all data currently transmitted from the internal receiving service unit to the intranet data usage unit. Generally speaking, when there is a lot of data being transmitted at the same time and the more demand parties corresponding to the simultaneously transmitted data, the overall average transmission speed becomes slower. Conversely, if the amount of data being transmitted at the same time is not large or the number of demand parties corresponding to the simultaneously transmitted data is not large, the overall average transmission speed is faster. At the same time, the transmission data is also affected by factors such as the network environment and the server response speed.
[0103] Then, when it is determined that the current overall average transmission speed is low, certain processing is required to adjust the transmission status corresponding to each service interface.
[0104] The priority transmission instruction is characterized by an instruction that can give priority to the transmission tasks corresponding to some service ports when the transmission speed is slow; the transmission suspension instruction is characterized by an instruction that requires some service ports that are currently performing transmission tasks to interrupt the transmission tasks when the transmission speed is slow.
[0105] The task allocation module is used to send a preset number of priority transmission instructions to the corresponding service interfaces in order of ranking to continue transmission, and send transmission suspension instructions to the remaining service interfaces for transmission.
[0106] When transmission allocation is required, a certain preset amount is first set, and a certain preset amount of priority transmission instructions are generated to be sent to several service interfaces with higher transmission progress according to the queue, while the remaining service interfaces correspond to transmission abort instructions. In this way, the number of transmission threads and data transmissions carried out simultaneously is reduced, and a certain transmission pressure is relieved to make concessions to several service interfaces that are close to completing the transmission task. This can effectively improve the transmission speed corresponding to some service interfaces and avoid the overall transmission efficiency being reduced due to transmission congestion of more service interfaces.
[0107] The task allocation module is also used to convert the transmission suspension instructions of the corresponding number of service interfaces into priority transmission instructions in sequence after the transmission of the service interface corresponding to the priority transmission instruction is completed.
[0108] Finally, when the transmission task of the service interface corresponding to the priority transmission instruction is completed, the corresponding number of service interfaces under the transmission suspension instruction will be restored to the priority transmission instruction to restart the transmission task. For example, when there are 7 transmission threads, 4 of which correspond to the priority transmission instruction and 3 correspond to the transmission suspension instruction, then after a period of time, when the data transmission task corresponding to one of the threads is completed, a corresponding service interface under the transmission suspension instruction will become the priority transmission instruction.
[0109] At the same time, if during the transmission task allocation process, all suspended tasks will be restarted at regular intervals to re-determine the overall average transmission speed. If the average transmission speed returns to normal, the transmission allocation will be terminated to start the threads corresponding to all transmission tasks.
[0110] like Figure 6 As shown, the present application also discloses a data transmission method for isolating the internal and external networks, comprising the following steps:
[0111] S100, the external transmission service unit generates a configuration item based on the configuration requirements. The service interface configuration item includes a number of configuration fields. Each service interface configuration field stores a corresponding configuration feature tag. The types of service interface configuration feature tags include data query and data transmission.
[0112] S200, the external transmission service unit reads corresponding data from the data source at the target location based on the service interface configuration item for service interface data query, and transmits the service interface data to the service interface external transmission service unit based on the service interface configuration item for service interface data transmission.
[0113] S300, the internal receiving service unit receives the service interface data, and the internal receiving service unit transmits the service interface data to the corresponding service interface registered in the internal receiving service unit connected to the service interface in the service interface based on the service interface configuration item used for the service interface data transmission.
[0114] The present application also discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above method is implemented.
[0115] The implementation principle is:
[0116] The process of generating data and transmitting data is separated. Each process has corresponding configuration items that can be modified and set based on the configuration requirements input by the user. The configuration items are used to adjust the different transmission states in the data generation and data transmission process in real time. The SQL read, the number of entries read each time, and the number of entries transmitted each time can be configured accordingly, which has extremely high flexibility.
[0117] It should be understood that although the steps in the flowchart of the accompanying drawings are shown in sequence according to the instructions of the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise clearly stated in this document, the execution of these steps is not strictly limited in order and can be performed in other orders.
[0118] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. A data transmission system based on internal and external network isolation, comprising an isolation device for isolating an internal network part from an external network part, characterized in that: It includes an external transmission service unit corresponding to the external network part, an internal receiving service unit corresponding to the internal network part, and an internal network data using unit, wherein: The external transmission service unit comprises: A configuration management module, used for reading configuration requirements to generate configuration items, wherein the configuration items include a number of configuration fields, each of which stores a corresponding configuration feature tag, and the types of the configuration feature tags include data query and data transmission; The configuration feature tag for the data query in the configuration item includes data source, data table name, execution increment sql, number of reads, number of execution tables and total sql, and the number of execution tables is characterized by the number of transmission data tables allowed to be executed simultaneously; the configuration feature tag for the data transmission in the configuration item includes the transmission address and the number of transmissions; the configuration feature tag also includes encryption algorithm and decryption algorithm; A data query module selects a target location based on the data source, and queries and reads the corresponding data in the data source corresponding to the target location based on the data table name, wherein when reading the data source, the number of data items read each time is determined based on the number of items read, and whether the reading process is completed is confirmed based on the execution of the incremental SQL; It is also used to generate a plurality of independent query task threads based on the number of execution tables, each of the query task threads corresponds to one of the transmission data tables and each of the query task threads corresponds to a group of the configuration feature tags for the data query; When each of the query task threads confirms that the reading process is completed based on the execution of the incremental SQL, the data query module is also used to generate summary data based on the total amount SQL and send it to the internal receiving service unit through the data cross-region transmission module; A data encryption module, encrypting the data read from the data source based on the encryption algorithm; A data cross-zone transmission module, which obtains the encrypted data and transmits the data to the internal receiving service unit; The external transmission service unit reads corresponding data from a data source at a target location based on the configuration item for data query, and transmits the data to the internal receiving service unit based on the configuration item for data transmission; The internal receiving service unit comprises: An interface registration module, used to obtain registration requests of several service interfaces existing in the intranet data use unit, and complete the registration connection with each of the service interfaces based on the registration requests, wherein the registration requests include an interface address corresponding to each of the service interfaces; A data receiving module, used to obtain the data transmitted by the data cross-zone transmission module, and extract the transmission address and the number of transmission entries corresponding to the data; A data decryption module, decrypting the data acquired by the data receiving module based on the decryption algorithm; A data sending module, which searches the corresponding service interface in the intranet data using unit based on the transmission address, and transmits the decrypted data to the service interface corresponding to the transmission requirement based on the number of transmission items; Among them, after the intranet data usage unit receives the data, if it is determined that the data is the summary data, the number of transmission items is compared with the total amount sql corresponding to the summary data to generate a transmission result, and a return result is generated to the internal receiving service unit.
2. The data transmission system based on internal and external network isolation according to claim 1 is characterized in that: The configuration feature tag used for the data query also includes an excess time. The data query module is also used to obtain the reading time corresponding to when reading data from the data source, and compare the reading time with the excess time. When the reading time is greater than the excess time, the reading of the data is interrupted and an error record is generated.
3. The data transmission system based on internal and external network isolation according to claim 1 is characterized in that: After receiving the data, the intranet data using unit is further used to: Determine the data type of the data, the data type includes single data and the summary data; If the data is the single data, determine whether the data exists, and generate a return result to the internal receiving service unit, wherein the return result includes: if it already exists, update the currently existing data according to the data; if it does not exist, add the data.
4. The data transmission system based on internal and external network isolation according to claim 3 is characterized in that: The returned result includes a transmission status, and the internal receiving service unit further includes an automatic push module, the automatic push module is used to generate a timed query task, and the timed query task includes a timing time, a query object, and target data; The automatic re-push module selects the query object within the timing time and queries the transmission status of the target data in the query object. If the transmission status is failure, the re-push instruction is automatically returned to resend the target data. If the number of resending exceeds a preset number, the target data is marked to return manual processing information.
5. The data transmission system based on internal and external network isolation according to claim 1 is characterized in that: The data sending module also includes a data ranking module and a task allocation module; The data ranking module is used to query the transmission progress corresponding to the data currently transmitted by each of the service interfaces, and rank each of the service interfaces from high to low based on the transmission progress; The task allocation module is used to determine the average transmission speed corresponding to the data currently transmitted by each of the service interfaces, and when the average transmission speed is lower than a preset speed, generate a preset number of priority transmission instructions and transmission suspension instructions, and send the preset number of priority transmission instructions to the corresponding service interfaces in order according to the ranking to continue transmission, and send the transmission suspension instructions to the remaining service interfaces to stop transmission; The task allocation module is further configured to convert the transmission stop instructions of a corresponding number of the service interfaces into the priority transmission instructions in sequence after the transmission of the service interface corresponding to the priority transmission instruction is completed.
6. A data transmission method based on internal and external network isolation, characterized in that: The following steps are involved: The external transmission service unit reads the configuration requirement to generate a configuration item, wherein the configuration item includes a plurality of configuration fields, each of which stores a corresponding configuration feature tag, and the types of the configuration feature tags include data query and data transmission; The configuration feature tag for the data query in the configuration item includes data source, data table name, execution increment sql, number of reads, number of execution tables and total sql, and the number of execution tables is characterized by the number of transmission data tables allowed to be executed simultaneously; the configuration feature tag for the data transmission in the configuration item includes the transmission address and the number of transmissions; the configuration feature tag also includes encryption algorithm and decryption algorithm; A target location is selected based on the data source, and corresponding data is queried in the data source corresponding to the target location based on the data table name and read, wherein when reading the data source, the number of data items read each time is determined based on the number of items read, and whether the reading process is completed is confirmed based on the execution of the incremental SQL; Generate multiple independent query task threads based on the number of execution tables, each query task thread corresponds to one of the transmission data tables and each query task thread corresponds to a group of configuration feature tags for data query; When each of the query task threads confirms that the reading process is completed based on the execution of the incremental SQL, the data query module is also used to generate summary data based on the total amount SQL and send it to the internal receiving service unit through the data cross-region transmission module; Encrypting the data read from the data source based on the encryption algorithm; Acquire the encrypted data through the data cross-zone transmission module, and transmit the data to the internal receiving service unit; The external transmission service unit reads corresponding data from the data source at the target location based on the configuration item for data query, and transmits the data to the internal receiving service unit based on the configuration item for data transmission; The internal receiving service unit obtains registration requests of several service interfaces existing in the intranet data using unit, and completes the registration connection with each of the service interfaces based on the registration requests, wherein the registration requests include an interface address corresponding to each of the service interfaces; Acquire the data transmitted by the data cross-zone transmission module, and extract the transmission address and the number of transmission entries corresponding to the data; Decrypting the data acquired by the data receiving module based on the decryption algorithm; Based on the transmission address, query the corresponding service interface in the intranet data use unit, and based on the number of transmissions, transmit the decrypted data to the service interface corresponding to the transmission requirement; After the intranet data using unit receives the data, if it is determined that the data is the summary data, the number of transmissions is compared with the total amount sql corresponding to the summary data to generate a transmission result, and a return result is generated to the internal receiving service unit.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method described in claim 6 are implemented.
