Data transmission method, device, equipment, medium and product

By replacing the private address returned by the server with a public address in the passive mode of FTP, the connection failure and transmission interruption problems of the FTP protocol in complex network environments are solved, and the reliability and compatibility of data transmission are improved.

CN121728082APending Publication Date: 2026-03-24INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-18
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In complex network environments, the FTP protocol is prone to connection failures and file transfer failures, especially in cross-regional and cross-carrier network topologies. The traditional FTP protocol lacks an automatic recovery mechanism after transmission interruption, resulting in poor data transmission reliability.

Method used

In passive mode, if the address returned by the server is inconsistent with the public IP address, it is replaced with the server's public IP address to ensure that the client can recognize the public IP address for data transmission, thereby improving the reliability of data transmission.

Benefits of technology

It improves the reliability of data transmission and compatibility in complex network environments, avoiding connection failures and transmission interruptions that occur with traditional FTP protocols in complex network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121728082A_ABST
    Figure CN121728082A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method, device and equipment, a medium and a product, and relates to the field of financial science and technology or other related fields. Comprising the following steps: determining a data connection mode between a client and a server; the data connection mode comprises a passive mode and an active mode; if the data connection mode is a passive mode, determining whether an address returned by the server in the passive mode is consistent with a public network address of the server; and if the address returned by the server is inconsistent with the public network address of the server, replacing the address returned by the server with the public network address of the server, and performing data transmission between the client and the server based on the public network address of the server. According to the scheme, the reliability of data transmission is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of financial technology or other related fields, in particular to a data transmission method, device, equipment, medium and product. BACKGROUND

[0002] As a core technology for cross-system and cross-platform data exchange, File Transfer Protocol (FTP) is widely used in government systems, financial institutions, medical gateways, industrial control, Internet of Things and other scenarios with high requirements for data transmission stability.

[0003] However, due to the double-channel communication mechanism of FTP protocol, problems such as connection failure and file transmission failure are prone to occur. In some solutions, the client usually needs to manually configure the transmission mode, which cannot dynamically switch according to the network environment, resulting in frequent connection failures in complex network topologies and poor data transmission reliability. SUMMARY

[0004] The present application provides a data transmission method, device, equipment, medium and product to improve the reliability of data transmission.

[0005] In a first aspect, the present application provides a data transmission method, comprising:

[0006] determining a data connection mode between a client and a server; the data connection mode includes a passive mode and an active mode;

[0007] if the data connection mode is the passive mode, determining whether the address returned by the server in the passive mode is consistent with the public network address of the server;

[0008] if the address returned by the server is not consistent with the public network address of the server, replacing the address returned by the server with the public network address of the server, and performing data transmission between the client and the server based on the public network address of the server.

[0009] In a second aspect, the present application provides a data transmission device, comprising:

[0010] a first determination module configured to determine a data connection mode between a client and a server; the data connection mode includes a passive mode and an active mode;

[0011] a second determination module configured to determine whether the address returned by the server in the passive mode is consistent with the public network address of the server if the data connection mode is the passive mode;

[0012] The transmission module is configured to replace the address returned by the server with a public network address of the server if the address returned by the server is inconsistent with the public network address of the server, and perform data transmission between the client and the server based on the public network address of the server.

[0013] In a third aspect, an electronic device is provided, including: a memory, a processor;

[0014] The memory stores computer-executable instructions.

[0015] The processor executes the computer-executable instructions stored in the memory, so that the processor performs the first aspect and / or various possible implementation manners of the first aspect.

[0016] In a fourth aspect, a computer-readable storage medium is provided, and the computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the computer-executable instructions are used to implement the first aspect and / or various possible implementation manners of the first aspect.

[0017] In a fifth aspect, a computer program product is provided, and the computer program product includes a computer program. When the computer program is executed by a processor, the computer program implements the first aspect and / or various possible implementation manners of the first aspect.

[0018] The data transmission method, device, equipment, medium and product provided by the application determine a data connection mode between a client and a server. The data connection mode includes a passive mode and an active mode. If the data connection mode is the passive mode, it is determined whether an address returned by the server in the passive mode is consistent with a public network address of the server. If the address returned by the server is inconsistent with the public network address of the server, the address returned by the server is replaced with the public network address of the server, and data transmission between the client and the server is performed based on the public network address of the server. In the transmission mode of the passive mode, when the address returned by the server is inconsistent with the public network address of the server, the address returned by the server is replaced with the public network address of the server, so that the client identifies the public network address of the server, and data transmission between the client and the server is performed based on the public network address of the server, thereby improving the reliability of data transmission. BRIEF DESCRIPTION OF DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.

[0020] Figure 1 A schematic diagram of an application scenario of the application is shown;

[0021] Figure 2An exemplary flowchart of a data transmission method is shown.

[0022] Figure 3 An exemplary flowchart of a data transmission method is shown.

[0023] Figure 4 An exemplary structural diagram of a data transmission device is shown.

[0024] Figure 5 An exemplary structural diagram of an electronic device is shown.

[0025] The above-described drawings have shown the specific embodiments of the present application, which will be described in more detail hereinafter. These drawings and detailed description are not intended to limit the scope of the present application in any way, but to explain the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0026] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, like reference numerals refer to like elements, unless the context clearly dictates otherwise. The following exemplary embodiments are described in enough detail to enable those skilled in the art to make and use it. The embodiments described herein are not meant to limit the application in any way. Rather, they are illustrative examples of apparatus and methods consistent with the present application as detailed in the appended claims.

[0027] It should be noted that the brief description of terms in the present application is only for the convenience of understanding the following described embodiments, and is not intended to limit the embodiments of the present application. Unless otherwise stated, these terms should be understood in accordance with their ordinary and customary meanings. The terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar or like objects or entities, and do not necessarily mean a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchanged as appropriate, for example, those other than the order given can be implemented according to the embodiment illustrations or descriptions of the present application. The terms "include" and "have" and any variations thereof in the specification and claims of the present application and the above-described drawings are intended to cover but not exclusively include, for example, a product or device including a series of components does not necessarily limit to those components clearly listed, but can include other components not clearly listed or inherent to such products or devices. The term "module" used in the present application refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or a combination of hardware or / and software code capable of performing a function related to the element.

[0028] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant countries and regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation access points for users to choose to authorize or refuse.

[0029] Furthermore, the technical solution involved in this application, which involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) and the use of artificial intelligence technology for automated decision-making, and makes decisions that have a significant impact on personal rights based on the results of automated decision-making, provides users with corresponding operation entry points for users to choose to agree to or reject the results of automated decision-making; if the user chooses to reject, the process will proceed to the expert decision-making process.

[0030] It should be noted that the data transmission methods, apparatus, devices, storage media and products provided in this application can be used in the field of financial technology, or in any field other than financial technology. The application fields of the data transmission methods, apparatus, devices, media and products in this application are not limited.

[0031] FTP, as a core technology for cross-system and cross-platform data exchange, is widely used in scenarios with extremely high requirements for data transmission stability, such as government systems, financial institutions, medical gateways, industrial control, and the Internet of Things (IoT). For example, in the financial industry, banks and third-party partners (such as payment platforms and regulatory agencies) need to use FTP to automate the transfer of transaction records and reconciliation files; in the industrial control field, device status data in multi-network isolated environments needs to be synchronized between the intranet and extranet via FTP; in IoT scenarios, edge devices need to upload collected data to cloud servers. However, these scenarios generally suffer from complex network environments and limited device configurations. For example, the partner's network may not have ALG (Application Layer Gateway) functionality enabled, causing the private network address returned by the server in passive FTP mode to be unresolved by the client; or firewall rules may restrict the data channel port in active mode, leading to connection failures. Furthermore, the traditional FTP protocol lacks an automatic recovery mechanism after transmission interruptions, requiring manual intervention when file transfers fail, severely impacting business continuity. Especially in cross-regional and cross-carrier network topologies, how to achieve adaptive file transfer without relying on gateway configuration has become a key technical bottleneck restricting the efficient application of the FTP protocol in complex network environments.

[0032] In FTP's passive mode (PASV), the server uses a "227" response to indicate the Internet Protocol (IP) address and port for the client to connect. However, if the server is in an intranet environment and ALG is not enabled, the returned address is usually a private network address (such as 192.168.xx), causing the client to be unable to establish a data connection and resulting in poor data transmission reliability.

[0033] FTP client technology relies on firewalls or gateways to configure ALG (Automatic Level Gauge) functionality. However, these devices may not be modifiable or may be located in uncontrolled partner networks, resulting in the following limitations that cause FTP communication failures: inability to automatically detect applicable FTP modes; lack of data channel repair capabilities in scenarios where ALG is missing; lack of file status confirmation mechanisms; inability to provide fallback strategies in case of connection failure; and poor data transmission reliability.

[0034] The data transmission method, apparatus, device, medium, and product provided in this application, in passive mode, replace the address returned by the server with the server's public IP address when the address returned by the server is inconsistent with the server's public IP address, so that the client can identify the server's public IP address and perform data transmission between the client and the server based on the server's public IP address, thereby improving the reliability of data transmission.

[0035] Figure 1 This is a schematic diagram illustrating an application scenario exemplified in this application; such as Figure 1 As shown, this embodiment of the application is applicable to data transmission between a client and a server; wherein the client includes a probing module, a data connection control module, and a User Datagram Protocol (UDP) transmission module. A command channel is established between the client and the server, and the client's probing module sends an FTP transfer command to the server. Subsequently, a data channel is established between the client and the server, and data transmission occurs through the client's data connection control module. If the data channel establishment fails, the UDP transmission module can be attempted; if the UDP protocol is available, data transmission is performed using the UDP protocol.

[0036] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0037] Example 1

[0038] Figure 2 An exemplary flowchart of a data transmission method is shown; for example... Figure 2 As shown, the method includes:

[0039] Step 201: Determine the data connection mode between the client and the server; the data connection mode includes passive mode and active mode.

[0040] For example, one application scenario of this application is data transmission between a client and a server. This data transmission can be either the client sending data to the server or the server sending data to the client.

[0041] Generally, both the client and server support active and passive modes; FTP uses two separate Transmission Control Protocol (TCP) connections. The control connection (port 21) is initiated by the FTP client to port 21 of the FTP server. This connection is used to send commands (such as listing, retrieving / downloading files) and receive responses. The data connection (port 20 or others) is used for the actual transfer of file content or directory listings.

[0042] In active mode, the server proactively connects to the client to establish a data connection. The client randomly opens a port (e.g., 1025) and connects to the server's port 21. The client sends an active mode (PORT) command to the server via the control connection. This command tells the server, "I will be listening on my port 1025; please connect to me." The command includes the client's IP address and port number. The server proactively initiates a connection from its own port 20 (the data port) to the IP address and port specified by the client in the PORT command (e.g., client IP:1025); after the connection is established, file or data transfer begins.

[0043] In passive mode, the server passively waits for the client to establish a data connection. Similar to active mode, the client connects to port 21 of the server. The client sends a Passive Mode (PASV) command to the server via the control connection. Upon receiving the PASV command, the server randomly opens a high-end port (e.g., 2024) and informs the client: "I am listening on port 2024, please connect to me." The server returns this message (IP and port) to the client via the control connection. The client then actively initiates a connection from one of its own random ports to the IP address and port previously provided by the server (e.g., server IP:2024). After the connection is established, data transmission begins.

[0044] Step 202: If the data connection mode is passive mode, determine whether the address returned by the server in passive mode is consistent with the server's public IP address.

[0045] If it is determined to be passive mode, then use passive mode for data connection. Further verify that the public IP address returned by the server in passive mode is consistent.

[0046] For example, in active mode, the client sends an address to the server, and the server actively connects to that address to conduct data transmission between the client and the server. Conversely, in passive mode, the client sends a data connection command, and the server returns an address connection; the client and server connect based on the returned address to conduct data transmission.

[0047] In passive mode, it's necessary to further verify whether the address returned by the server matches the server's public IP address. In one example, the server might return its public IP address, confirming that the returned address matches and can be recognized by the client; therefore, data transmission between the client and server can be based on this address. In another example, the server might return a private address, which does not match the server's public IP address; this private address cannot be recognized by the client.

[0048] Step 203: If the address returned by the server is inconsistent with the server's public IP address, replace the address returned by the server with the server's public IP address, and perform data transmission between the client and the server based on the server's public IP address.

[0049] Optionally, if the address returned by the server does not match the server's public IP address, the address returned by the server is a private address, which can be converted to a public address. Data transmission between the client and server is then based on this public address.

[0050] In this example, under passive transmission mode, when the address returned by the server is inconsistent with the server's public IP address, the address returned by the server is replaced with the server's public IP address so that the client can identify the server's public IP address and perform data transmission between the client and the server based on the server's public IP address, thereby improving the reliability of data transmission.

[0051] Optionally, the data connection mode between the client and the server can be determined, including:

[0052] In response to a passive-mode command sent by the client, generate a response code for the server.

[0053] If the server's response code includes an address and port number, the data connection mode between the client and the server is passive mode; otherwise, the data connection mode between the client and the server is active mode.

[0054] Optionally, the client can send a passive-mode command to the server to test whether passive-mode data transmission is possible between the client and the server. Based on the passive-mode command, the server will generate a corresponding response code, which will be returned to the client. If the response code includes an address and port number, the data connection mode between the client and the server is determined to be passive mode; otherwise, if the response code does not include an address and port, the data connection mode between the client and the server is active mode.

[0055] In this example, by probing the connection mode between the client and the server, the system determines that it is in passive mode when the returned response code includes the address and port number, and in active mode otherwise, thus improving the accuracy of connection mode identification.

[0056] Optionally, determine whether the address returned by the server in passive mode is consistent with the server's public IP address, including:

[0057] Parse the address returned by the server in passive mode. If the address returned by the server is a public IP address, then the address returned by the server is consistent with the server's public IP address.

[0058] If the address returned by the server is a private network address, then the address returned by the server is inconsistent with the server's public network address.

[0059] Optionally, the server's public IP address is a known address, which includes the IP address and the corresponding port number. If the IP address and port number in the returned address match the public IP address, then the address returned by the server is consistent with the server's public IP address.

[0060] If the address returned by the server is the server's private address, then the private address cannot be recognized by the client, indicating that the address returned by the server is inconsistent with the server's public address.

[0061] In this example, the address returned by the server is compared with the server's public address to determine whether the address returned by the server is consistent with the server's public IP address, thereby improving the accuracy of address resolution.

[0062] Optionally, the method also includes:

[0063] If the data connection mode between the client and the server is active mode, then data transmission between the client and the server is based on the address sent by the client.

[0064] Optionally, if the data connection mode between the client and server does not support passive mode and only supports active mode, then data transmission between the client and server can be directly performed based on the address sent by the client. For example, in active mode, the client sends a connection address, and the server can actively connect to this address to establish a data connection between the client and server.

[0065] In this example, if the data connection between the server and the client does not support passive mode, the active mode can be actively selected for data transmission, which improves the reliability of data transmission and the compatibility of data transmission in complex networks.

[0066] Optionally, the method also includes:

[0067] If data transmission between the client and server fails in passive mode, the system will switch to active mode to transmit data.

[0068] For example, if in passive mode, when the address returned by the server is a private address, and the connection still fails and data transmission cannot be performed after replacing the private address with the server's public address, then the system can switch to active mode to perform data transmission.

[0069] In this example, when the passive mode connection fails, it will not be judged as a data transmission failure. Instead, it will automatically switch to active mode and attempt to transmit data in active mode, thus improving the accuracy of data transmission.

[0070] The selected methods also include:

[0071] Based on data size and data list instructions, integrity checks are performed on data during the data transmission process.

[0072] Optionally, after a successful data connection and data transmission between the client and server, the integrity of the transmitted files can be verified. For example, the integrity of the transmitted files can be confirmed through the server's response, the file list (MLST), and the file size (SIZE) instruction, supporting message digest (MD5) hash integrity verification.

[0073] In one example, before starting file transfer, the client queries the server for detailed information about the source file, including its size, using the MLST or SIZE command to obtain a baseline value before transfer. The client then sends the file data to the server via a data connection. After data transfer, integrity verification is performed. The client again uses the SIZE command to retrieve the file size of the file just transferred from the server. The transferred file size is compared with the recorded source file size. If they match perfectly, it means the file transfer was uninterrupted or without data loss, and the file is "complete." If they don't match, it indicates a transfer error, and retransmission is required. Alternatively, content comparison (MD5 hash verification) can be performed. The client calculates the MD5 hash value of the source file before transfer. After transfer, the client can request the server to calculate the MD5 hash value of the received file (this requires server-side support). The two MD5 values ​​are compared. If they match perfectly, it proves the file is not only complete but also 100% correct, with no errors in any bits.

[0074] In this example, the reliability and accuracy of data transmission are improved by verifying the integrity of the transmitted data.

[0075] Optionally, the method also includes:

[0076] If both passive and active modes fail to transmit, data transmission between the client and server will be performed based on the User Datagram Protocol (UDP).

[0077] For example, when a connection fails, a UDP packet containing the file identifier and size is sent to probe or wake up the server. If both the passive and active mode transmissions fail, data transmission failure is not considered a failure; in this case, the client can send a UDP packet containing the file identifier and size to the server to see if the server supports UDP transmission. If the server supports UDP transmission, then UDP transmission is used for data transmission between the client and server.

[0078] In this example, when both active and passive modes fail to transmit data, a data transmission protocol can be selected to transmit data, thus improving the reliability of data transmission.

[0079] Figure 3 Here is a flowchart illustrating an example data transmission method; such as Figure 3As shown, the client first sends a connection mode command to the server, and the server returns a response. If the response indicates that a passive connection is possible, the probing module attempts to establish a data connection with the network address translation (NAT) module. If the connection fails, the NAT device is considered faulty, and the system switches to active mode. If the handshake between the client and server is successful, data transmission occurs based on active mode. If the data connection established between the probing module and the NAT module in passive mode is successful, data transmission occurs based on passive mode. If both passive and active mode connections fail, the client sends a User Datagram Protocol (UDP) packet to the UDP module, including file size, hash value, timestamp, etc., to determine whether data transmission can be achieved via UDP. The UDP module then determines whether the file has been delivered or initiates negotiation.

[0080] The data transmission method provided in this embodiment determines the data connection mode between the client and the server. The data connection mode includes passive mode and active mode. If the data connection mode is passive mode, it determines whether the address returned by the server in passive mode is consistent with the server's public IP address. If the address returned by the server is inconsistent with the server's public IP address, the address returned by the server is replaced with the server's public IP address, and data transmission between the client and the server is based on the server's public IP address. In the passive mode, when the address returned by the server is inconsistent with the server's public IP address, the solution replaces the address returned by the server with the server's public IP address, enabling the client to identify the server's public IP address and perform data transmission between the client and the server based on the server's public IP address, thus improving the reliability of data transmission.

[0081] Example 2

[0082] Figure 4 An exemplary schematic diagram of a data transmission device is shown; as follows: Figure 4 As shown, the device includes:

[0083] The first determining module 21 is used to determine the data connection mode between the client and the server; the data connection mode includes passive mode and active mode.

[0084] The second determining module 22 is used to determine whether the address returned by the server in passive mode is consistent with the server's public network address if the data connection mode is passive mode.

[0085] The transmission module 23 is used to replace the address returned by the server with the server's public network address if the address returned by the server is inconsistent with the server's public network address, and to perform data transmission between the client and the server based on the server's public network address.

[0086] The data transmission device provided in this embodiment can execute the data transmission method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0087] Example 3

[0088] Figure 5 The diagram above illustrates the structure of an electronic device, which includes:

[0089] The device includes a processor 291 and a memory 292; it may also include a communication interface 293 and a bus 294. The processor 291, memory 292, and communication interface 293 can communicate with each other via the bus 294. The communication interface 293 can be used for information transmission. The processor 291 can invoke logical instructions stored in the memory 292 to execute the methods described in the example above.

[0090] Furthermore, the logic instructions in the aforementioned memory 292 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.

[0091] The memory 292, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this application. The processor 291 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 292, that is, it implements the methods in the above method examples.

[0092] The memory 292 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 292 may include high-speed random access memory and may also include non-volatile memory.

[0093] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method in any of the embodiments.

[0094] This application also provides a computer program product, including a computer program that, when executed by a processor, is used to implement the method in any of the embodiments.

[0095] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0096] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0097] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.

[0098] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.

[0099] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.

[0100] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0101] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.

[0102] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0103] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A data transmission method, characterized in that, include: Determine the data connection mode between the client and the server; The data connection modes include passive mode and active mode; If the data connection mode is passive mode, then determine whether the address returned by the server in passive mode is consistent with the public network address of the server; If the address returned by the server is inconsistent with the server's public IP address, the address returned by the server will be replaced with the server's public IP address, and data transmission between the client and the server will be performed based on the server's public IP address.

2. The method according to claim 1, characterized in that, Determining the data connection mode between the client and the server includes: In response to the passive mode command sent by the client, the server generates a response code; If the server's response code includes an address and a port number, then the data connection mode between the client and the server is passive mode; otherwise, the data connection mode between the client and the server is active mode.

3. The method according to claim 2, characterized in that, Determining whether the address returned by the server in passive mode is consistent with the server's public IP address includes: Parse the address returned by the server in passive mode. If the address returned by the server is a public IP address, then the address returned by the server is consistent with the public IP address of the server. If the address returned by the server is a private network address, then the address returned by the server is inconsistent with the public network address of the server.

4. The method according to claim 1, characterized in that, The method further includes: If the data connection mode between the client and the server is active mode, then data transmission between the client and the server is performed based on the address sent by the client.

5. The method according to claim 1, characterized in that, The method further includes: If data transmission between the client and the server fails in passive mode, the system switches to active mode to transmit data.

6. The method according to claim 1, characterized in that, The method further includes: Based on data size and data list instructions, integrity checks are performed on data during the data transmission process.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: If both the passive mode and the active mode fail to transmit, data transmission between the client and the server is performed based on the User Datagram Protocol (UDP).

8. A data transmission device, characterized in that, include: The first determining module is used to determine the data connection mode between the client and the server; The data connection modes include passive mode and active mode; The second determining module is used to determine whether the address returned by the server in the passive mode is consistent with the public network address of the server if the data connection mode is passive mode. The transmission module is used to replace the address returned by the server with the public network address of the server if the address returned by the server is inconsistent with the public network address of the server, and to perform data transmission between the client and the server based on the public network address of the server.

9. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 7.

11. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 7.