Data transmission method, device, electronic device and storage medium
By dynamically determining the target interface machine and generating configuration information, the problem of low data transmission efficiency under static configuration is solved, and efficient transmission of cross-network data transmission is achieved.
Patent Information
- Application Number
- CN202010135799.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-02
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2040-03-02
AI Technical Summary
In the prior art, data transmission channels need to be transferred multiple times during data transmission, and the transmission path cannot be changed in time, resulting in low data transmission efficiency.
By obtaining data transmission instructions, the adapted target interface machine is determined based on the destination address, and configuration information is generated based on the source address and destination address, and sent to the target interface machine to control data transmission, realizing dynamic selection of interface machine and the transmission applicable to the current network state path.
Improve data transmission efficiency, avoid multiple network transfers under static configuration, and enhance transmission flexibility and reliability.
Smart Images

Figure CN113347281B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to data processing technology, and more particularly to a data transmission method, device, electronic device and storage medium. Background Art
[0002] With the development of network technology, multiple network environments are deployed in companies around the world. At this time, there is a need to transfer data to different network environments.
[0003] Currently, statically configured transmission channels are used for data transmission. However, since each data transmission can only be transmitted through the data sources at both ends of the static configuration, multiple network transfers may be required between the two network segments. At the same time, the interface machine used for network transfer is fixed. When the statically configured transmission path is not suitable, the data transmission path cannot be changed in time, resulting in low data transmission efficiency. Summary of the invention
[0004] The present disclosure provides a data transmission method, device, electronic device and storage medium to improve data transmission efficiency.
[0005] In a first aspect, an embodiment of the present disclosure provides a data transmission method, including:
[0006] Obtaining a data transmission instruction, the data transmission instruction including a source address and a destination address of target data;
[0007] In response to the data transmission instruction, determining an adapted target interface machine according to the destination address;
[0008] Generate configuration information according to the source address and destination address of the target data;
[0009] Send the configuration information to the target interface machine and control the target interface machine to transmit the target data.
[0010] In a second aspect, an embodiment of the present disclosure further provides a data transmission device, including:
[0011] An instruction acquisition module is used to acquire a data transmission instruction, wherein the data transmission instruction includes a source address and a destination address of the target data;
[0012] A target interface machine determination module, for responding to a data transmission instruction and determining an adapted target interface machine according to a destination address;
[0013] A matching information generation module, used to generate configuration information according to the source address and destination address of the target data;
[0014] The matching information sending module is used to send the configuration information to the target interface machine and control the target interface machine to transmit the target data.
[0015] In a third aspect, an embodiment of the present disclosure further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the data transmission method shown in the first aspect is implemented.
[0016] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data transmission method as shown in the first aspect.
[0017] The data transmission method, device, electronic device and storage medium provided by the embodiments of the present disclosure obtain a data transmission instruction when performing cross-network data transmission, respond to the data transmission instruction, determine the adapted target interface machine according to the destination address carried in the data transmission instruction; generate configuration information according to the source address and destination address of the target data; send the configuration information to the target interface machine to control the target interface machine to transmit the target data. Compared with the current use of static configuration to transmit data, which has low transmission efficiency, the data transmission method provided by the embodiments of the present disclosure can determine the adapted target interface machine according to the destination address of the target data, generate configuration information according to the source address and destination address of the target data, and send the configuration information to the target interface machine so that the target interface machine can transmit the target data, thereby realizing dynamic selection of the target interface machine according to the source address and destination address of the target data, using the target interface machine applicable to the current network status to transmit the target data, and improving the transmission efficiency of the target data. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a flowchart of a data transmission method in an embodiment of the present disclosure;
[0019] Figure 2 is a flowchart of another data transmission method in an embodiment of the present disclosure;
[0020] Figure 3 is a flowchart of another data transmission method in an embodiment of the present disclosure;
[0021] Figure 4 is a flowchart of another data transmission method in an embodiment of the present disclosure;
[0022] Figure 5 is a structural schematic diagram of a data transmission device in an embodiment of the present disclosure;
[0023] Figure 6 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present disclosure, rather than to limit the present disclosure. It should also be noted that, for ease of description, only parts related to the present disclosure are shown in the accompanying drawings, rather than all structures.
[0025] Figure 1 A flowchart of a data transmission method provided in an embodiment of the present disclosure, the method is applied to a server, the server includes a data transmission function, and the method includes:
[0026] Step 110: Obtain a data transmission instruction, where the data transmission instruction includes a source address and a destination address of the target data.
[0027] A user or a computer program can access the server. The server can provide a list of databases located in different network environments to the user or the computer program. The access server can select a source database storing the target data and a target database where the target data is to be stored, and then determine the source address and the destination address of the target data. Optionally, the source address can be the network address of the source database, and the destination database can be the network address of the target database. The source address and the destination address can be connected to a database or a database tool. The database type can be MySQL, Remote Dictionary Server (redis), mongo database or hive.
[0028] MySQL is an open source relational database management system (RDBMS) that uses the most commonly used database management language, Structured Query Language (SQL), for database management. Redis is an open source log-type, Key-Value database written in ANSI C, supporting the network, memory-based and persistent, and providing APIs in multiple languages. MongoDB is a distributed file storage database. Written in C++. It aims to provide a scalable, high-performance data storage solution for WEB applications. Hive is a data warehouse tool based on Hadoop that is used for data extraction, transformation, and loading. It is a mechanism for storing, querying, and analyzing large-scale data stored in Hadoop. The hive data warehouse tool can map structured data files to a database table, and provides SQL query functions, which can convert SQL statements into MapReduce tasks for execution.
[0029] When the user or computer program selects the two ends of the target data transmission, i.e., the source database and the target database, the server generates a data transmission instruction. The data transmission instruction carries the source address and the destination address of the target data, so that the data transmission instruction can carry the target data to be transmitted, the source address storing the target data, and the destination address receiving the target data.
[0030] Step 120: In response to the data transmission instruction, determine the adapted target interface machine according to the destination address.
[0031] When a data transmission instruction is generated, the server responds to the data transmission instruction. According to the network environment where the destination address is located, a target interface machine adapted to the destination address is searched from multiple pre-registered interface machines. The target interface machine and the destination address belong to the same network environment.
[0032] In one implementation, a target network environment is determined according to a destination address; and a target interface machine is determined according to the target network environment.
[0033] When registering an interface machine, record the network environment where the interface machine is located. The network environment can be determined based on the domain name or IP address of the database connected to the source address or destination address. The network environment can include the Chinese network environment, the American network environment, the British network environment or the Indian network environment, etc. One or more interface machines can be configured for each network environment. Search for the interface machine configured in the network environment according to the network environment where the destination address is located. If an interface machine is configured in the network environment, the interface machine is determined as the target interface machine. Optionally, the interface machine in the same network environment as the target address is determined as the target interface machine. Determining the target interface machine according to the target network environment can enable the target data to be transmitted only through the network where the source address is located and the network where the destination address is located during the transmission process, avoiding multiple cross-network transmissions of the target data using a statically configured interface machine, thereby improving data transmission efficiency.
[0034] If multiple interface machines are configured in the network environment, optionally, multiple candidate interface machines are determined according to the destination address; the target interface machine is determined according to the interface machine parameters of the multiple candidate interface machines, and the interface machine parameters include the interface machine network bandwidth or interface machine load information.
[0035] If there are multiple interface machines that are adapted to the target address, it is necessary to determine the target interface machine from the multiple adapted interface machines. At this time, the target interface machine can be determined based on the interface machine parameters of the multiple interface machines. For example, an interface machine with a higher interface machine network bandwidth is determined as the target interface machine, or an interface machine with a lower interface machine load is determined as the target interface machine. An interface machine with a higher interface machine network bandwidth and a lower interface machine load can also be determined as the target interface machine. The most suitable interface machine is determined as the target interface machine from multiple interface machines using interface machine parameters to improve resource utilization.
[0036] Step 130: Generate configuration information according to the source address and destination address of the target data.
[0037] The configuration information is used to be sent to the target interface machine so that the target interface machine can accurately transmit the target data. The combination of the source address and the destination address can be used as the configuration information.
[0038] Furthermore, the configuration information also includes pre-processing parameters or post-processing parameters. The pre-processing parameters are used to control the target interface machine to pre-process the target data, and the post-processing parameters are used to control the target interface machine to perform data processing on writing the target data into a database according to transmission requirements.
[0039] In addition to enabling the target interface machine to obtain the source address and destination address of the target data, the configuration information can also configure pre-processing parameters and post-processing parameters. Optionally, the database where the source address is located compresses the target data, and the interface machine reads the compressed target data. Optionally, the database where the source address is located compresses the data to obtain the target data. The interface machine reads the compressed target data.
[0040] Preprocessing includes data cleaning of the target data. Postprocessing can be configured according to the usage requirements of the target database, such as aggregation calculation or sorting.
[0041] By adding pre-processing parameters and post-processing parameters to the configuration information, the interface machine can be configured in a more diversified manner, so that the interface machine has more functions and the usability of the interface machine is improved.
[0042] Step 140: Send the configuration information to the target interface machine to control the target interface machine to transmit the target data.
[0043] The server sends the configuration information to the target interface machine through the network. The target interface machine accesses the source address according to the received configuration information, obtains the target data, and transmits the target data to the destination address. The interface machine can complete the database data processing by installing the database plug-in connected to it. Databases include but are not limited to MySQL, redis, mongo database or hive.
[0044] If the configuration information includes pre-processing parameters or post-processing parameters, the target data is processed accordingly according to the pre-processing parameters or post-processing parameters.
[0045] The data transmission method provided by the embodiment of the present disclosure obtains a data transmission instruction when performing cross-network data transmission, responds to the data transmission instruction, determines the adapted target interface machine according to the destination address carried in the data transmission instruction; generates configuration information according to the source address and destination address of the target data; sends the configuration information to the target interface machine to control the target interface machine to transmit the target data. Compared with the current use of static configuration to transmit data, which has low transmission efficiency, the data transmission method provided by the embodiment of the present disclosure can determine the adapted target interface machine according to the destination address of the target data, generate configuration information according to the source address and destination address of the target data, and send the configuration information to the target interface machine so that the target interface machine can transmit the target data, realize dynamic selection of the target interface machine according to the source address and destination address of the target data, use the target interface machine applicable to the current network status to transmit the target data, and improve the transmission efficiency of the target data.
[0046] Figure 2 A flowchart of a data transmission method provided in an embodiment of the present disclosure, as a further explanation of the above embodiment, includes:
[0047] Step 210: Obtain a data transmission instruction, where the data transmission instruction includes a source address and a destination address of the target data.
[0048] Step 220: In response to the data transmission instruction, determine the adapted target interface machine according to the destination address.
[0049] Step 230: Acquire transmission parameters of target data, where the transmission parameters include: data filtering parameters, interface machine performance parameters, or transmission data block size.
[0050] The data filtering parameters are used to represent filtering rules. Then, when the interface machine reads or transmits the target data, the noise in the target data is filtered according to the data filtering parameters. Exemplarily, the target data is a data table. The data filtering parameters can be used to filter the row data or column data in the data table. The filtering process includes filtering out invalid data such as symbols. The interface machine is enabled to filter data impurities during the transmission process, thereby improving the processing efficiency of the target data.
[0051] The interface machine performance parameters are used to indicate the hardware allocation of the interface machine when the interface machine transmits the target data. For example, the interface machine performance parameters include the interface machine processor usage, number of processes, memory usage ratio, etc. To achieve more accurate and effective control of the interface machine hardware, after resource allocation, the interface machine can more efficiently process multiple transmission tasks in parallel and improve resource utilization.
[0052] The transmission data block size is used to indicate the block size of the target data transmitted in each transmission window. The target data can be divided into blocks according to the transmission data block size, and then the block data is transmitted to the destination address. This avoids the problem of bandwidth occupation and data loss caused by excessive data volume transmitted at one time, and improves the reliability of data transmission.
[0053] Step 240: Generate configuration information according to the transmission parameters, the source address and the destination address of the target data.
[0054] Step 250: Send the configuration information to the target interface machine, and control the target interface machine to transmit the target data.
[0055] The data transmission method provided by the embodiment of the present disclosure can generate configuration information according to the transmission parameters of the target data, so that the transmission process of the interface machine can be configured, thereby improving the ease of use.
[0056] Figure 3 The flowchart of the data transmission method provided by the embodiment of the present disclosure is that in the process of implementing the above embodiment, it is found that if the transmission is interrupted due to network disconnection or other reasons when transmitting the target data, the target interface machine needs to reconnect the source address and the destination address, and the breakpoint resume cannot be completed. In order to solve this problem, the embodiment of the present disclosure provides a data transmission method as a further explanation of the above embodiment, including:
[0057] Step 310: Obtain a data transmission instruction, where the data transmission instruction includes a source address and a destination address of the target data.
[0058] Step 320: In response to the data transmission instruction, determine the adapted target interface machine according to the destination address.
[0059] Step 330: Generate configuration information according to the source address and destination address of the target data.
[0060] Step 340: Send the configuration information to the target interface machine.
[0061] Step 350: Control the target interface machine to record the target data transmission progress when transmitting data.
[0062] The data transmitted by the target interface machine is the target data. When transmitting the target data, the sent ratio of the target data or the number of packets sent is recorded, so that the target data transmission progress can accurately record the transmission status of the target data.
[0063] Step 360: If the transmission is terminated, resume the transmission of the target data according to the transmission progress.
[0064] The data transmission method provided by the embodiment of the present disclosure records the transmission progress, and can resume the transmission based on the recorded transmission progress after the transmission is interrupted, thereby completing the breakpoint resume transmission and improving the transmission reliability.
[0065] Figure 4 A flowchart of a data transmission method provided in an embodiment of the present disclosure, as a further explanation of the above embodiment, includes:
[0066] Step 410: Receive registration information of multiple interface machines.
[0067] The registration information of the interface machine includes the network environment where the interface machine is located, the database to which the interface machine can be connected, and the hardware configuration of the interface machine.
[0068] Step 420: Obtain a data transmission instruction, where the data transmission instruction includes a source address and a destination address of the target data.
[0069] Step 430: In response to the data transmission instruction, determine a target interface machine that matches the target address according to the registration information of multiple interface machines.
[0070] Step 440: Generate configuration information according to the source address and destination address of the target data.
[0071] Step 450: Send the configuration information to the target interface machine, and control the target interface machine to transmit the target data.
[0072] The data transmission method provided by the embodiment of the present disclosure can receive the registration information of multiple interface machines in advance, so that the server can obtain the transmission capabilities of multiple interface machines and more accurately determine the target interface machine based on the registration information. Through the registration method, the interface machine can quickly access the server, realize fast registration, execute the data transmission function, and improve resource utilization.
[0073] In one implementation of the disclosed embodiment, a system configuration module may be set to complete the server functions shown in the above embodiment. Exemplarily, a user or an external system configures a data source and a data destination in the system configuration module, and the data source and the data destination may be any two data resources in any network environment. The data source may be data accessed through MySQL, redis, mongo database, or hive.
[0074] When the user or external system selects the target data to be transmitted, the data transmission instruction is triggered. The system configuration module receives the data transmission instruction. According to the network information of the data source and the data destination, the network bandwidth of the interface machine, the load of the interface machine and other indicators, a target interface machine suitable for transmission is selected. A configuration information is dynamically generated and transmitted to the target interface machine.
[0075] In addition to the data sources at both ends, the configuration information can also define the transmission parameters of the target data, such as custom filters, interface machine performance parameters, transmission data block size, etc. The configuration information includes the address information of the data sources at both ends (the address information can be the data storage address of the target data, which can be the port address of the connected database).
[0076] After the system configuration module sends the configuration information to the target interface machine, the target interface machine runs in the spark operating environment, relies on the spark operating environment to connect to the data source and starts downloading the pre-compressed data (i.e., target data), saves the transmission progress during the data transmission process, and resumes the transmission according to the transmission progress when encountering an abnormal interruption. Execute different insert commands according to the type of data resource area pointed to by the destination address, and write the data into different types of data resources. Data resources are data resources in the database.
[0077] Figure 5 This is a schematic diagram of the structure of a data transmission device provided in an embodiment of the present disclosure. The device is applied to a server and includes: an instruction acquisition module 510, a target interface machine determination module 520, a matching information generation module 530 and a matching information sending module 540.
[0078] An instruction acquisition module 510 is used to acquire a data transmission instruction, where the data transmission instruction includes a source address and a destination address of target data;
[0079] The target interface machine determination module 520 is used to determine the adapted target interface machine according to the destination address in response to the data transmission instruction;
[0080] A matching information generating module 530, configured to generate configuration information according to a source address and a destination address of target data;
[0081] The matching information sending module 540 is used to send the configuration information to the target interface machine and control the target interface machine to transmit the target data.
[0082] Furthermore, the target interface machine determination module 520 is used to:
[0083] Determine the target network environment based on the destination address;
[0084] Determine the target interface machine based on the target network environment.
[0085] Furthermore, the target interface machine determination module 520 is used to:
[0086] Determine multiple interface machines to be selected according to the destination address;
[0087] The target interface machine is determined according to the interface machine parameters of a plurality of candidate interface machines, where the interface machine parameters include the network bandwidth of the interface machine or the load information of the interface machine.
[0088] Furthermore, the matching information generating module 530 is used to:
[0089] Acquire transmission parameters of target data, the transmission parameters include: data filtering parameters, interface machine performance parameters or transmission data block size;
[0090] Generate configuration information based on transmission parameters, source address and destination address of target data.
[0091] Furthermore, the matching information sending module 540 is used to:
[0092] Control the target interface machine to record the target data transmission progress when transmitting data;
[0093] If the transmission is terminated, the transmission of the target data is resumed according to the transmission progress.
[0094] Furthermore, the configuration information also includes pre-processing parameters or post-processing parameters. The pre-processing parameters are used to control the target interface machine to pre-process the target data, and the post-processing parameters are used to control the target interface machine to perform data processing on writing the target data into a database according to transmission requirements.
[0095] Furthermore, it also includes an interface machine registration module for receiving registration information of multiple interface machines;
[0096] Accordingly, the target interface machine determination module 520 is used to:
[0097] A target interface machine matching the target address is determined according to registration information of multiple interface machines.
[0098] The data transmission device provided by the embodiment of the present disclosure, when performing cross-network data transmission, the instruction acquisition module 510 acquires the data transmission instruction, the target interface machine determination module 520 responds to the data transmission instruction, and determines the adapted target interface machine according to the destination address carried in the data transmission instruction; the matching information generation module 530 generates configuration information according to the source address and destination address of the target data; the matching information sending module 540 sends the configuration information to the target interface machine to control the target interface machine to transmit the target data. Compared with the current use of static configuration to transmit data, the transmission efficiency is low. The data transmission method provided by the embodiment of the present disclosure can determine the adapted target interface machine according to the destination address of the target data, generate configuration information according to the source address and destination address of the target data, and send the configuration information to the target interface machine so that the target interface machine transmits the target data, realizes the dynamic selection of the target interface machine according to the source address and destination address of the target data, uses the target interface machine applicable to the current network status to transmit the target data, and improves the transmission efficiency of the target data.
[0099] The above-mentioned device can execute the methods provided by all the aforementioned embodiments of the present disclosure, and has the functional modules and beneficial effects corresponding to the execution of the above-mentioned methods. For the technical details not described in detail in this embodiment, please refer to the methods provided by all the aforementioned embodiments of the present disclosure. It is worth noting that in the embodiments of the above-mentioned device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present disclosure.
[0100] Figure 6 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure, such as Figure 6 As shown, the computer device includes a processor 60, a memory 61, an input device 62 and an output device 63; the number of processors 60 in the computer device can be one or more. Figure 6 A processor 60 is taken as an example; the processor 60, memory 61, input device 62 and output device 63 in the computer device can be connected by a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0101] The memory 61 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the data transmission method in the embodiment of the present disclosure. The processor 60 executes various functional applications and data processing of the computer device by running the software programs, instructions and modules stored in the memory 61, that is, implements the above-mentioned data transmission method. The method includes:
[0102] Obtaining a data transmission instruction, the data transmission instruction including a source address and a destination address of target data;
[0103] In response to the data transmission instruction, determining an adapted target interface machine according to the destination address;
[0104] Generate configuration information according to the source address and destination address of the target data;
[0105] Send the configuration information to the target interface machine and control the target interface machine to transmit the target data.
[0106] Further, determining the adapted target interface machine according to the destination address includes:
[0107] Determine the target network environment based on the destination address;
[0108] Determine the target interface machine based on the target network environment.
[0109] Further, determining the adapted target interface machine according to the destination address includes:
[0110] Determine multiple interface machines to be selected according to the destination address;
[0111] The target interface machine is determined according to the interface machine parameters of a plurality of candidate interface machines, where the interface machine parameters include the network bandwidth of the interface machine or the load information of the interface machine.
[0112] Further, configuration information is generated according to the source address and destination address of the target data, including:
[0113] Acquire transmission parameters of target data, the transmission parameters include: data filtering parameters, interface machine performance parameters or transmission data block size;
[0114] Generate configuration information based on transmission parameters, source address and destination address of target data.
[0115] Further, controlling the target interface machine to transmit target data includes:
[0116] Control the target interface machine to record the target data transmission progress when transmitting data;
[0117] If the transmission is terminated, the transmission of the target data is resumed according to the transmission progress.
[0118] Furthermore, the configuration information also includes pre-processing parameters or post-processing parameters. The pre-processing parameters are used to control the target interface machine to pre-process the target data, and the post-processing parameters are used to control the target interface machine to perform data processing on writing the target data into a database according to transmission requirements.
[0119] Furthermore, before obtaining the data transmission instruction, it also includes:
[0120] Receive registration information of multiple interface machines;
[0121] Accordingly, determining the adapted target interface machine according to the destination address includes:
[0122] A target interface machine matching the target address is determined according to registration information of multiple interface machines.
[0123] The memory 61 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 61 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 61 may further include a memory remotely arranged relative to the processor 60, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0124] The input device 62 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the computer device. The output device 63 may include a display device such as a display screen.
[0125] The present disclosure also provides a computer-readable storage medium storing a computer program, and the computer program is used to perform a data transmission method when executed by a computer processor. The method includes:
[0126] Obtaining a data transmission instruction, the data transmission instruction including a source address and a destination address of target data;
[0127] In response to the data transmission instruction, determining an adapted target interface machine according to the destination address;
[0128] Generate configuration information according to the source address and destination address of the target data;
[0129] Send the configuration information to the target interface machine and control the target interface machine to transmit the target data.
[0130] Further, determining the adapted target interface machine according to the destination address includes:
[0131] Determine the target network environment based on the destination address;
[0132] Determine the target interface machine based on the target network environment.
[0133] Further, determining the adapted target interface machine according to the destination address includes:
[0134] Determine multiple interface machines to be selected according to the destination address;
[0135] The target interface machine is determined according to the interface machine parameters of a plurality of candidate interface machines, where the interface machine parameters include the network bandwidth of the interface machine or the load information of the interface machine.
[0136] Further, configuration information is generated according to the source address and destination address of the target data, including:
[0137] Acquire transmission parameters of target data, the transmission parameters include: data filtering parameters, interface machine performance parameters or transmission data block size;
[0138] Generate configuration information based on transmission parameters, source address and destination address of target data.
[0139] Further, controlling the target interface machine to transmit target data includes:
[0140] Control the target interface machine to record the target data transmission progress when transmitting data;
[0141] If the transmission is terminated, the transmission of the target data is resumed according to the transmission progress.
[0142] Furthermore, the configuration information also includes pre-processing parameters or post-processing parameters. The pre-processing parameters are used to control the target interface machine to pre-process the target data, and the post-processing parameters are used to control the target interface machine to perform data processing on writing the target data into a database according to transmission requirements.
[0143] Furthermore, before obtaining the data transmission instruction, it also includes:
[0144] Receive registration information of multiple interface machines;
[0145] Accordingly, determining the adapted target interface machine according to the destination address includes:
[0146] A target interface machine matching the target address is determined according to registration information of multiple interface machines.
[0147] Of course, the computer-readable storage medium storing a computer program provided in the embodiments of the present disclosure is not limited to the above method operations, and can also execute related operations in the data transmission method provided in any embodiment of the present disclosure.
[0148] Through the above description of the implementation methods, the technical personnel in the relevant field can clearly understand that the present disclosure can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer's floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present disclosure.
[0149] Note that the above are only preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art will understand that the present disclosure is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present disclosure. Therefore, although the present disclosure is described in more detail through the above embodiments, the present disclosure is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present disclosure, and the scope of the present disclosure is determined by the scope of the appended claims.
Claims
1. A data transmission method, characterized in that: include: Acquire a data transmission instruction, wherein the data transmission instruction includes a source address and a destination address of target data; In response to the data transmission instruction, determining an adapted target interface machine according to the destination address; Generate configuration information according to the source address and destination address of the target data; Sending the configuration information to the target interface machine to control the target interface machine to transmit the target data; The step of determining the adapted target interface machine according to the destination address comprises: Determine the target network environment based on the destination address; Determine a target interface machine according to the target network environment; the target interface machine and the destination address belong to the same network environment; The generating of configuration information according to the source address and the destination address of the target data includes: Acquire transmission parameters of the target data, the transmission parameters including: data filtering parameters, interface machine performance parameters or transmission data block size; Configuration information is generated according to the transmission parameters, the source address and the destination address of the target data.
2. The method according to claim 1, characterized in that The step of determining the target interface machine according to the target network environment further comprises: If multiple interface machines are configured in the target network environment, multiple interface machines to be selected are determined according to the destination address; The target interface machine is determined according to the interface machine parameters of the multiple interface machines to be selected, wherein the interface machine parameters include the network bandwidth of the interface machine or the load information of the interface machine.
3. The method according to claim 1, characterized in that: The controlling the target interface machine to transmit the target data comprises: Controlling the target interface machine to record the target data transmission progress when transmitting data; If the transmission is interrupted, the transmission of the target data is resumed according to the transmission progress.
4. The method according to claim 1, characterized in that: The configuration information also includes pre-processing parameters or post-processing parameters, the pre-processing parameters are used to control the target interface machine to pre-process the target data, and the post-processing parameters are used to control the target interface machine to perform data processing on writing the target data into a database according to transmission requirements.
5. The method according to claim 1, characterized in that Before obtaining the data transfer instruction, it also includes: Registration information of a plurality of interface machines is received, wherein the registration information includes a network environment where the interface machines are located.
6. A data transmission device, characterized in that: include: An instruction acquisition module, used to acquire a data transmission instruction, wherein the data transmission instruction includes a source address and a destination address of target data; A target interface machine determination module, used to determine an adapted target interface machine according to the destination address in response to a data transmission instruction; A matching information generating module, used for generating configuration information according to the source address and destination address of the target data; A matching information sending module, used for sending the configuration information to the target interface machine, and controlling the target interface machine to transmit the target data; The target interface machine determination module is also used to: determine the target network environment according to the destination address; determine the target interface machine according to the target network environment; the target interface machine and the destination address belong to the same network environment; The matching information generation module is also used to: obtain transmission parameters of the target data, the transmission parameters including: data filtering parameters, interface machine performance parameters or transmission data block size; The configuration information is generated according to the transmission parameters, the source address and the destination address of the target data.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the data transmission method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the data transmission method as described in any one of claims 1 to 5 is implemented.
