CN114745367B - Data transmission method, device, electronic equipment and storage medium - Google Patents

Data transmission method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114745367B
CN114745367B CN202210298979.XA CN202210298979A CN114745367B CN 114745367 B CN114745367 B CN 114745367B CN 202210298979 A CN202210298979 A CN 202210298979A CN 114745367 B CN114745367 B CN 114745367B
Authority
CN
China
Prior art keywords
terminal
file
data transmission
server
transmission request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210298979.XA
Other languages
Chinese (zh)
Other versions
CN114745367A (en
Inventor
陈博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202210298979.XA priority Critical patent/CN114745367B/en
Publication of CN114745367A publication Critical patent/CN114745367A/en
Application granted granted Critical
Publication of CN114745367B publication Critical patent/CN114745367B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a data transmission method, a data transmission device, electronic equipment and a storage medium, and relates to the technical field of computers. One embodiment of the method comprises the following steps: receiving a first data transmission request sent by a first terminal, acquiring a transmission file and a target address of the first data transmission request, and inquiring a second terminal corresponding to the target address; inquiring a file server corresponding to the second terminal to send the transmission file to the file server; inquiring a request format corresponding to the second terminal to generate a second data transmission request based on the first data transmission request, and adding an identification of a transmission file for the second data transmission request; and sending the second data transmission request with the added identifier to a second terminal so that the second terminal obtains the transmission file from the file server. The embodiment can solve the problems that the server for transferring can only be used for request transfer, has single function and can not meet the transmission requirements of systems in different network areas.

Description

Data transmission method, device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data transmission method, a data transmission device, an electronic device, and a storage medium.
Background
With the development of the business field, interaction between systems is unavoidable. In a system interaction scenario across network areas, because network access is limited, when systems in different network areas interact, network requests cannot be directly sent to interact, so that a server for switching needs to be set to realize data transmission between the systems in different network areas. However, the server for forwarding in the prior art can only be used for forwarding requests, has a single function, and cannot meet the transmission requirements of systems in different network areas.
Disclosure of Invention
In view of this, the embodiments of the present invention provide a data transmission method, apparatus, electronic device, and storage medium, which can solve the problem that a server for transferring can only be used for forwarding requests, has a single function, and cannot meet the transmission requirements of systems in different network areas.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a data transmission method.
The data transmission method of the embodiment of the invention is used for the transfer server and comprises the following steps: receiving a first data transmission request sent by a first terminal, acquiring a transmission file and a target address of the first data transmission request, and inquiring a second terminal corresponding to the target address; responding to the fact that the first terminal and the second terminal belong to different network areas, inquiring a file server corresponding to the second terminal, and sending the transmission file to the file server; inquiring a request format corresponding to the second terminal to generate a second data transmission request based on the first data transmission request, and adding an identification of the transmission file for the second data transmission request; and sending the second data transmission request added with the identifier to a second terminal so that the second terminal obtains the transmission file from the file server.
In one embodiment, obtaining the transmission file of the first data transmission request includes:
acquiring a communication protocol of the first data transmission request to judge whether the communication protocol is a target protocol or not;
if yes, extracting a transmission file identifier from the first data transmission request to acquire the transmission file from a server corresponding to the first terminal; if not, extracting a transmission file from the first data transmission request.
In yet another embodiment, before extracting the transmission file from the first data transmission request, the method further includes:
Identifying a message header format of the first data transmission request to judge whether the message header format is a target format or not;
If yes, extracting a transmission file from the first data transmission request; if not, inquiring a request format corresponding to the target address, generating a second data transmission request based on the target address, and sending the generated second data transmission request to a second terminal.
In yet another embodiment, the transfer server includes a first transfer server corresponding to the first terminal and a second transfer server corresponding to the second terminal;
querying a file server corresponding to the second terminal to send the transmission file to the file server, including:
the first transfer server inquires an intermediate file server associated with the first transfer server and the second transfer server so as to upload the transmission file to the intermediate file server;
the first transfer server sends the transmission request to the second transfer server, so that the second transfer server obtains the transmission file from the intermediate file server;
And the second transfer server inquires a file server corresponding to the second terminal so as to send the transmission file to the file server.
In yet another embodiment, sending the second data transmission request after adding the identifier to a second terminal, so that the second terminal obtains the transmission file from the file server, including:
The first transfer server sends the second data transmission request added with the identifier to the second transfer server;
and the second transfer server sends the second data transmission request added with the identifier to a second terminal so that the second terminal obtains the transmission file from the file server.
In yet another embodiment, after sending the second data transmission request after adding the identifier to the second terminal, the method further includes:
Receiving a first response message sent by the second terminal, and inquiring a request format corresponding to the first terminal so as to convert the response message into a corresponding second response message;
And sending the second response message to the first terminal.
In yet another embodiment, querying a request format corresponding to the target address to generate a second data transfer request based on the first data transfer request includes:
Extracting a parameter value of a target parameter from the first data transmission request to call a request template corresponding to the request format to generate a second data transmission request based on the parameter value of the target parameter.
In yet another embodiment, sending the identified second data transmission request to the second terminal includes:
Inquiring a preset routing strategy based on the target address;
And calling the routing strategy, and sending the second data transmission request added with the identifier to a second terminal.
To achieve the above object, according to another aspect of an embodiment of the present invention, there is provided a data transmission apparatus.
The data transmission device of the embodiment of the invention is arranged at a transfer server and comprises: the receiving unit is used for receiving a first data transmission request sent by a first terminal, acquiring a transmission file and a target address of the data transmission request, and inquiring a second terminal corresponding to the target address; the sending unit is used for responding that the first terminal and the second terminal belong to different network areas, inquiring a file server corresponding to the second terminal and sending the transmission file to the file server; the generating unit is used for inquiring a request format corresponding to the target address so as to generate a second data transmission request based on the target address, and adding the identification of the transmission file for the second data transmission request; the sending unit is further configured to send the second data transmission request after the identifier is added to a second terminal, so that the second terminal obtains the transmission file from the file server.
In an embodiment, the receiving unit is further configured to:
acquiring a communication protocol for transmitting the data transmission request to judge whether the communication protocol is a target protocol or not;
If yes, extracting a transmission file identifier from the transmission request to acquire the transmission file from a server corresponding to the first terminal; if not, extracting the transmission file from the transmission request.
In a further embodiment, the receiving unit is further configured to:
identifying a message header format of the data transmission request to judge whether the message header format is a target format or not;
If yes, extracting a transmission file from the transmission request; if not, inquiring a request format corresponding to the target address, generating a second data transmission request based on the target address, and sending the generated second data transmission request to a second terminal.
In yet another embodiment, the transfer server includes a first transfer server corresponding to the first terminal and a second transfer server corresponding to the second terminal;
the sending unit is specifically configured to:
the first transfer server inquires an intermediate file server associated with the first transfer server and the second transfer server so as to upload the transmission file to the intermediate file server;
the first transfer server sends the transmission request to the second transfer server, so that the second transfer server obtains the transmission file from the intermediate file server;
And the second transfer server inquires a file server corresponding to the second terminal so as to send the transmission file to the file server.
In a further embodiment, the sending unit is specifically configured to:
The first transfer server sends the second data transmission request added with the identifier to the second transfer server;
and the second transfer server sends the second data transmission request added with the identifier to a second terminal so that the second terminal obtains the transmission file from the file server.
In yet another embodiment, the receiving unit is further configured to receive a first response message sent by the second terminal, and query a corresponding request format of the first terminal, so as to convert the response message into a corresponding second response message;
The sending unit is further configured to send the second response message to the first terminal.
In a further embodiment, the generating unit is specifically configured to:
Extracting a parameter value of a target parameter from the first data transmission request to call a request template corresponding to the request format to generate a second data transmission request based on the parameter value of the target parameter.
In a further embodiment, the sending unit is specifically configured to:
Inquiring a preset routing strategy based on the target address;
And calling the routing strategy, and sending the second data transmission request added with the identifier to a second terminal.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus.
An electronic device according to an embodiment of the present invention includes: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the data transmission method provided by the embodiment of the invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, a computer-readable medium is provided.
A computer readable medium of an embodiment of the present invention stores a computer program thereon, which when executed by a processor implements the data transmission method provided by the embodiment of the present invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer program product.
The computer program product of the embodiment of the invention comprises a computer program, and the program is executed by a processor to realize the data transmission method provided by the embodiment of the invention.
One embodiment of the above invention has the following advantages or benefits: in the embodiment of the invention, after receiving the first data transmission request sent by the first terminal, the transfer server can acquire the transmission file and the target address of the data transmission request, and inquire the second terminal corresponding to the target address; when the first terminal and the second terminal belong to different network areas, the file server corresponding to the second terminal can be queried to send the transmission file to the file server; inquiring a request format corresponding to the target address to generate a second data transmission request based on the target address, and adding an identification of a transmission file for the second data transmission request; and further sending the second data transmission request with the added identifier to a second terminal so that the second terminal obtains the transmission file from the file server. In the embodiment of the invention, when the first terminal and the second terminal do not belong to the same network area, the transfer server can transmit the transmission file of the first terminal to the second terminal through the file server, so that the file transmission is realized on the basis of the request forwarding between the first terminal and the second terminal, the functions of requesting and transmitting the file between different network areas are realized, and the data transmission requirement between systems is met.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
Fig. 1 is a schematic diagram of an architecture of a data transmission system according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a main flow of a data transmission method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of yet another main flow of a data transmission method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of another architecture of a data transmission system according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of yet another main flow of a data transmission method according to an embodiment of the present invention;
Fig. 6 is a schematic diagram of main units of a data transmission apparatus according to an embodiment of the present invention;
FIG. 7 is a diagram of yet another exemplary system architecture in which embodiments of the present invention may be applied;
FIG. 8 is a schematic diagram of a computer system suitable for use in implementing embodiments of the present invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It is noted that embodiments of the application and features of the embodiments may be combined with each other without conflict. The technical scheme of the application obtains, stores, uses, processes and the like the data, which all meet the relevant regulations of national laws and regulations.
The embodiment of the invention provides a data transmission system which can be used for data transmission among devices in different network areas.
In the embodiment of the invention, in the scenario of data transmission among devices in a cross-network area, due to the limitation of network access, when the network area is divided, a part of the network area is generally set to connect two different network areas, which is called an external connection area. And a transit server can be arranged in the external connection area so as to realize data transmission among devices in different network areas. Fig. 1 is a schematic diagram of an architecture of a data transmission system according to an embodiment of the present invention, in which a first terminal belongs to a first network area, a second terminal belongs to a second network area, and a transit server is disposed in an external connection area. In order to facilitate file transfer between different network areas, a first file server may be set in the first network area to store files required by the first terminal, and a second file server may be set in the second network area to store files required by the second terminal. The transfer server can respectively perform data transmission with the first terminal, the second terminal, the first server and the second server.
The embodiment of the invention provides a data transmission method, which can be executed by a transit server in the system architecture shown in fig. 1, as shown in fig. 2, and comprises the following steps:
S201: and receiving a first data transmission request sent by the first terminal, acquiring a transmission file and a target address of the first data transmission request, and inquiring a second terminal corresponding to the target address.
After receiving the first data transmission request sent by the first terminal, the transfer server can analyze the model of the first data transmission request to obtain a transmission file and a target address of the data transmission request, and the corresponding second terminal, namely the terminal equipment which needs to be interacted by the first terminal, can be determined through the target address.
When the transmission file is larger, the data transmission request is inconvenient to carry, at the moment, the first terminal can store the transmission file to the first file server and inform the transfer server through the first data transmission request, so that the transfer server obtains the transmission file from the first file server, and when the transmission file is smaller, the transmission file can be carried to the first data transmission request. Since the communication protocol used by the first terminal to send the first data transmission request when the transmission file is large and the communication protocol used by the first terminal to send the first data transmission request when the transmission file is small are different, how to acquire the transmission file can be determined by the communication protocol of the first data transmission file. The acquiring of the transmission file of the first data transmission request in this step may be performed as: acquiring a communication protocol of a first data transmission request to judge whether the communication protocol is a target protocol or not; if yes, extracting a transmission file identifier from the first data transmission request to acquire a transmission file from a server corresponding to the first terminal; if not, extracting the transmission file from the first data transmission request.
The target protocol may be a protocol used to send the first data transmission request when the transmission file is large, and specifically may be SFTP, NFT, and the like. The communication protocol used by the first terminal to send the first data transmission request when the transmission file is small may be HTTP or the like.
It should be noted that, based on the above processing procedure, when the transmission file is smaller or no transmission file is transmitted, the first terminal may use the same communication protocol to send the first data transmission request, so after determining that the communication protocol of the first data transmission request is not the target protocol in the above process, the transit server may also determine whether the first data transmission request carries the transmission file or not. In the embodiment of the invention, the data transmission request sent by the first terminal to the second terminal may or may not include the transmission file. Since the transmission file is required to be transmitted through the file server, the transfer server processes the first data transmission request including the transmission file and the first data transmission request excluding the transmission file differently.
Because the first data transmission request carries the transmission file through the encoding in the message header, in this step, after receiving the first data transmission request, the transfer server can identify the message header format of the first data transmission request to determine whether the message header format is a target format, where the target format may be the format of the message header when the data transmission request includes the transmission file; therefore, if the message header format of the first data transmission request is the target format, determining that the first data transmission request includes the transmission file, so that the transmission file can be extracted from the first data transmission request, and further executing the subsequent steps; if the message header format of the first data transmission request is not the target format, it is determined that the first data transmission request does not include a transmission file, so that a request format corresponding to the target address can be queried to generate a corresponding second data transmission request, and the second data transmission request is sent to the second terminal, so that data transmission of the first terminal and the second terminal is achieved.
S202: and responding to the fact that the first terminal and the second terminal belong to different network areas, inquiring a file server corresponding to the second terminal, and sending the transmission file to the file server.
After determining that the first terminal and the second terminal belong to different network areas, the transfer server can query a file server corresponding to the second terminal, namely, the second file server, so as to send the transmission file to the file server. The transfer server sends the transmission file to the file server corresponding to the second terminal, so that the second terminal can directly obtain the transmission file sent by the first terminal from the second server.
S203: and inquiring a request format corresponding to the second terminal to generate a second data transmission request based on the first data transmission request, and adding an identification of a transmission file for the second data transmission request.
The request formats during data transmission are different due to different implementation technical frameworks of different service systems. Therefore, in this step, the transfer server may first query the request format corresponding to the second terminal, and then convert the first data transmission request into the second data transmission request, that is, generate the second data transmission request. The transfer server may add an identifier of the transmission file to the second data transmission request, because the second data transmission request transmits data to the second terminal, and the second terminal needs to be notified to acquire the transmission file. Specifically, the identification of the transmission file may include a name of the transmission file, a storage path, and so on, which are parameters that are convenient for the second terminal to acquire.
Specifically, in the implementation of the present invention, various request formats may be preset to correspond to the request templates, so that corresponding data transmission requests may be generated based on the request templates. The generation of the second data transmission request in this step may be performed as: extracting a parameter value of a target parameter from the first data transmission request, and calling a request template corresponding to the request format to generate a second data transmission request based on the parameter value of the target parameter. Where the target parameter may be a parameter required for the data transfer request, e.g., source address, target address, etc.
S204: and sending the second data transmission request with the added identifier to a second terminal so that the second terminal obtains the transmission file from the file server.
The second terminal can acquire the identification of the transmission file from the second terminal, and further can acquire the file from the file server for processing.
After the second terminal obtains the transmission file, response information, namely first response information, can be returned to the first terminal, and after the transfer server receives the first response information, the transfer server can inquire about a request format corresponding to the first terminal, and then converts the response information into a corresponding second response information to be sent to the first terminal.
It should be noted that, in order to send the data transmission request, the relay server may configure a routing policy in advance, so when the relay server sends the second data transmission request to the second terminal in this step, the relay server may first invoke the routing policy based on the target, and then send the second data transmission request with the identifier added to the second terminal according to the routing policy.
In order to ensure the security of data transmission, in the embodiment of the invention, encryption and decryption operations can be performed on the transmitted data transmission request, and encryption and decryption keys can be preconfigured.
In the embodiment of the invention, when the first terminal and the second terminal do not belong to the same network area, the transfer server can transmit the transmission file of the first terminal to the second terminal through the file server, so that the file transmission is realized on the basis of the request forwarding between the first terminal and the second terminal, the functions of requesting and transmitting the file between different network areas are realized, and the data transmission requirement between systems is met.
In combination with the system architecture shown in fig. 1 and the embodiment shown in fig. 2, taking a smaller transmission file as an example, a data transmission method in the embodiment of the present invention is specifically described, as shown in fig. 3, where the method includes:
S301: the first terminal sends a first data transmission request to the transfer server.
S302: the transfer server extracts the transmission file from the message header of the first data transmission request.
S303: and the transfer server inquires a corresponding second terminal based on the target address in the first data transmission request, and acquires a corresponding second file server.
S304: and the transfer server sends the transmission file to the second file server.
S305: the transfer server side inquires a request format corresponding to the second terminal to generate a corresponding second data transmission request, and adds an identification of a transmission file for the second data transmission request.
S306: and the transfer server side sends the second data transmission request with the added identifier to the second terminal.
S307: and the second terminal acquires the transmission file from the second file server based on the second data transmission request.
S308: and the second terminal sends the first response information to the transfer server.
S309: the transfer server side inquires the corresponding request format of the first terminal, converts the response message into a corresponding second response message and sends the second response message to the first terminal.
In the embodiment of the invention, when the first terminal and the second terminal do not belong to the same network area, the transfer server can transmit the transmission file of the first terminal to the second terminal through the file server, so that the file transmission is realized on the basis of the request forwarding between the first terminal and the second terminal, the functions of requesting and transmitting the file between different network areas are realized, and the data transmission requirement between systems is met.
When the transmission file is too large or too many, the transfer server may set, for convenience of file transmission, that the transfer server includes a first transfer server corresponding to the first terminal, a second transfer server corresponding to the second terminal, and an intermediate file server associated with the first transfer server and the second transfer server. Fig. 4 is a schematic diagram of an architecture of a data transmission system according to an embodiment of the invention. Based on the embodiment shown in fig. 4, the first terminal may send a first data transmission request to the first transfer server, and the first transfer server may obtain, based on the first data transmission request, a transmission file from the first file server, and further query an intermediate file server associated with the first transfer server and the second transfer server, so as to send the transmission file to the transfer server for storage; then the first service end can convert the first transmission request into a format, generate a second data transmission request and send the second data transmission request to the second transfer service end, and the second transfer service end can acquire a transmission file from the intermediate file service end based on the second transfer service end after receiving the second data transmission request; and then the second transfer server can transmit the transmission file to the second file server and send a second data transmission request to the second terminal so that the second terminal can acquire the transmission file from the second file server.
In connection with the system architecture shown in fig. 4 and the embodiment shown in fig. 2, taking a larger transmission file as an example, a data transmission method in the embodiment of the present invention is specifically described, as shown in fig. 5, where the method includes:
S501: the first terminal sends a first data transmission request to the transfer server.
S502: the first transfer server obtains a transmission file from the first file server based on the first data transmission request.
S503: the first transfer server inquires a corresponding second transfer server based on a target address in the first data transmission request so as to acquire a corresponding intermediate file server.
S504: the first transfer server sends the transmission file to the intermediate file server.
S505: the first transfer server inquires a request format corresponding to the second transfer server to generate a corresponding second data transmission request, and adds an identification of a transmission file for the second data transmission request.
S506: the first transfer server sends the second data transmission request with the added identifier to the second transfer server.
S507: the second transfer server acquires the transmission file from the intermediate file server based on the second data transmission request, and sends the transmission file to a second file server corresponding to the second terminal.
S508: and the second transfer server sends the second data transmission request with the added identifier to the second terminal.
S509: and the second terminal acquires the transmission file from the second file server based on the second data transmission request.
S510: the second terminal sends the first response information to the second transfer server.
S511: the second transfer server inquires the first transfer server to correspond to the request format, converts the response message into a corresponding second response message, and sends the corresponding second response message to the first transfer server.
S512: the first transfer server side sends a second response message to the first terminal.
In the embodiment of the invention, when the first terminal and the second terminal do not belong to the same network area, the transfer server can transmit the transmission file of the first terminal to the second terminal through the file server, so that the file transmission is realized on the basis of the request forwarding between the first terminal and the second terminal, the functions of requesting and transmitting the file between different network areas are realized, and the data transmission requirement between systems is met.
In order to solve the problems in the prior art, an embodiment of the present invention provides a data transmission device 600, which is disposed at a transit server, as shown in fig. 6, the device 600 includes:
A receiving unit 601, configured to receive a first data transmission request sent by a first terminal, obtain a transmission file and a target address of the data transmission request, and query a second terminal corresponding to the target address;
A sending unit 602, configured to query a file server corresponding to the second terminal to send the transmission file to the file server in response to the first terminal and the second terminal belonging to different network areas;
A generating unit 603, configured to query a request format corresponding to the target address, so as to generate a second data transmission request based on the target address, and add an identifier of the transmission file to the second data transmission request;
the sending unit 602 is further configured to send the identified second data transmission request to a second terminal, so that the second terminal obtains the transmission file from the file server.
It should be understood that the manner of implementing the embodiment of the present invention is the same as that of implementing the embodiment shown in fig. 2, and will not be described herein.
In one embodiment, the receiving unit 601 is further configured to:
acquiring a communication protocol for transmitting the data transmission request to judge whether the communication protocol is a target protocol or not;
If yes, extracting a transmission file identifier from the transmission request to acquire the transmission file from a server corresponding to the first terminal; if not, extracting the transmission file from the transmission request.
In yet another embodiment, the receiving unit 601 is further configured to:
identifying a message header format of the data transmission request to judge whether the message header format is a target format or not;
If yes, extracting a transmission file from the transmission request; if not, inquiring a request format corresponding to the target address, generating a second data transmission request based on the target address, and sending the generated second data transmission request to a second terminal.
In yet another embodiment, the transfer server includes a first transfer server corresponding to the first terminal and a second transfer server corresponding to the second terminal;
the sending unit 602 is specifically configured to:
the first transfer server inquires an intermediate file server associated with the first transfer server and the second transfer server so as to upload the transmission file to the intermediate file server;
the first transfer server sends the transmission request to the second transfer server, so that the second transfer server obtains the transmission file from the intermediate file server;
And the second transfer server inquires a file server corresponding to the second terminal so as to send the transmission file to the file server.
In yet another embodiment, the sending unit 602 is specifically configured to:
The first transfer server sends the second data transmission request added with the identifier to the second transfer server;
and the second transfer server sends the second data transmission request added with the identifier to a second terminal so that the second terminal obtains the transmission file from the file server.
In yet another embodiment, the receiving unit 601 is further configured to receive a first response message sent by the second terminal, and query a corresponding request format of the first terminal, so as to convert the response message into a corresponding second response message;
The sending unit is further configured to send the second response message to the first terminal.
In yet another embodiment, the generating unit 603 is specifically configured to:
Extracting a parameter value of a target parameter from the first data transmission request to call a request template corresponding to the request format to generate a second data transmission request based on the parameter value of the target parameter.
In yet another embodiment, the sending unit 602 is specifically configured to:
Inquiring a preset routing strategy based on the target address;
And calling the routing strategy, and sending the second data transmission request added with the identifier to a second terminal.
It should be understood that the manner of implementing the embodiments of the present invention is the same as that of implementing the embodiments shown in fig. 2, 3 or 5, and will not be described herein.
In the embodiment of the invention, when the first terminal and the second terminal do not belong to the same network area, the transfer server can transmit the transmission file of the first terminal to the second terminal through the file server, so that the file transmission is realized on the basis of the request forwarding between the first terminal and the second terminal, the functions of requesting and transmitting the file between different network areas are realized, and the data transmission requirement between systems is met.
According to an embodiment of the present invention, an electronic device and a readable storage medium are also provided.
The electronic equipment of the embodiment of the invention comprises: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor, so that the at least one processor executes the data transmission method provided by the embodiment of the invention.
Fig. 7 illustrates an exemplary system architecture 700 to which the data transmission method or data transmission apparatus of embodiments of the present invention may be applied.
As shown in fig. 7, a system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 is the medium used to provide communication links between the terminal devices 701, 702, 703 and the server 705. The network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 705 via the network 704 using the terminal devices 701, 702, 703 to receive or send messages or the like. Various client applications may be installed on the terminal devices 701, 702, 703.
The terminal devices 701, 702, 703 may be, but are not limited to, smartphones, tablets, laptop and desktop computers, and the like.
The server 705 may be a server that provides various services, and may perform processing such as analysis on received data such as a product information query request, and feed back processing results (e.g., product information—just an example) to the terminal device.
It should be noted that, the data transmission method provided in the embodiment of the present invention is generally executed by the server 705, and accordingly, the data transmission device is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, there is illustrated a schematic diagram of a computer system 800 suitable for use in implementing embodiments of the present invention. The computer system shown in fig. 8 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU) 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 801.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a unit, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present invention may be implemented in software or in hardware. The described units may also be provided in a processor, for example, described as: a processor includes a receiving unit, a transmitting unit, and a generating unit. The names of these units do not in any way constitute a limitation of the unit itself, for example, the receiving unit may also be described as "unit requesting the receiving function".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by one of the devices, cause the device to perform the data transmission method provided by the present invention.
As another aspect, the present invention also provides a computer program product, including a computer program, where the program when executed by a processor implements a data transmission method provided by an embodiment of the present invention.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (13)

1. The data transmission method is characterized by comprising the following steps of:
Receiving a first data transmission request sent by a first terminal, acquiring a transmission file and a target address of the first data transmission request, and inquiring a second terminal corresponding to the target address;
responding to the fact that the first terminal and the second terminal belong to different network areas, inquiring a file server corresponding to the second terminal, and sending the transmission file to the file server;
Inquiring a request format corresponding to the second terminal to generate a second data transmission request based on the first data transmission request, and adding an identification of the transmission file for the second data transmission request;
transmitting the second data transmission request added with the identifier to a second terminal so that the second terminal obtains the transmission file from the file server;
The transfer service end comprises a first transfer service end corresponding to the first terminal and a second transfer service end corresponding to the second terminal;
querying a file server corresponding to the second terminal to send the transmission file to the file server, including:
the first transfer server inquires an intermediate file server associated with the first transfer server and the second transfer server so as to upload the transmission file to the intermediate file server;
the first transfer server sends the transmission request to the second transfer server, so that the second transfer server obtains the transmission file from the intermediate file server;
And the second transfer server inquires a file server corresponding to the second terminal so as to send the transmission file to the file server.
2. The method of claim 1, wherein obtaining the transmission file of the first data transmission request comprises:
acquiring a communication protocol of the first data transmission request to judge whether the communication protocol is a target protocol or not;
if yes, extracting a transmission file identifier from the first data transmission request to acquire the transmission file from a server corresponding to the first terminal; if not, extracting a transmission file from the first data transmission request.
3. The method of claim 2, further comprising, prior to extracting a transfer file from the first data transfer request:
Identifying a message header format of the first data transmission request to judge whether the message header format is a target format or not;
If yes, extracting a transmission file from the first data transmission request; if not, inquiring a request format corresponding to the target address, generating a second data transmission request based on the target address, and sending the generated second data transmission request to a second terminal.
4. The method according to claim 1, wherein sending the identified second data transmission request to a second terminal to enable the second terminal to obtain the transmission file from the file server includes:
The first transfer server sends the second data transmission request added with the identifier to the second transfer server;
and the second transfer server sends the second data transmission request added with the identifier to a second terminal so that the second terminal obtains the transmission file from the file server.
5. The method according to claim 1, further comprising, after transmitting the identified second data transmission request to the second terminal:
Receiving a first response message sent by the second terminal, and inquiring a request format corresponding to the first terminal so as to convert the response message into a corresponding second response message;
And sending the second response message to the first terminal.
6. The method of claim 1, wherein querying a request format corresponding to the target address to generate a second data transfer request based on the first data transfer request comprises:
Extracting a parameter value of a target parameter from the first data transmission request to call a request template corresponding to the request format to generate a second data transmission request based on the parameter value of the target parameter.
7. The method of claim 1, wherein sending the identified second data transmission request to the second terminal comprises:
Inquiring a preset routing strategy based on the target address;
And calling the routing strategy, and sending the second data transmission request added with the identifier to a second terminal.
8. The utility model provides a data transmission device which characterized in that sets up in the transfer server, includes:
The receiving unit is used for receiving a first data transmission request sent by a first terminal, acquiring a transmission file and a target address of the data transmission request, and inquiring a second terminal corresponding to the target address;
The sending unit is used for responding that the first terminal and the second terminal belong to different network areas, inquiring a file server corresponding to the second terminal and sending the transmission file to the file server;
The generating unit is used for inquiring a request format corresponding to the target address so as to generate a second data transmission request based on the target address, and adding the identification of the transmission file for the second data transmission request;
The sending unit is further configured to send a second data transmission request after the identifier is added to a second terminal, so that the second terminal obtains the transmission file from the file server;
The transfer service end comprises a first transfer service end corresponding to the first terminal and a second transfer service end corresponding to the second terminal;
the sending unit is specifically configured to:
the first transfer server inquires an intermediate file server associated with the first transfer server and the second transfer server so as to upload the transmission file to the intermediate file server;
the first transfer server sends the transmission request to the second transfer server, so that the second transfer server obtains the transmission file from the intermediate file server;
And the second transfer server inquires a file server corresponding to the second terminal so as to send the transmission file to the file server.
9. The apparatus of claim 8, wherein the receiving unit is further configured to:
acquiring a communication protocol for transmitting the data transmission request to judge whether the communication protocol is a target protocol or not;
If yes, extracting a transmission file identifier from the transmission request to acquire the transmission file from a server corresponding to the first terminal; if not, extracting the transmission file from the transmission request.
10. The apparatus of claim 9, wherein the receiving unit is further configured to:
identifying a message header format of the data transmission request to judge whether the message header format is a target format or not;
If yes, extracting a transmission file from the transmission request; if not, inquiring a request format corresponding to the target address, generating a second data transmission request based on the target address, and sending the generated second data transmission request to a second terminal.
11. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
When executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
12. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
13. A computer program product comprising a computer program, characterized in that the program, when executed by a processor, implements the method according to any of claims 1-7.
CN202210298979.XA 2022-03-25 2022-03-25 Data transmission method, device, electronic equipment and storage medium Active CN114745367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210298979.XA CN114745367B (en) 2022-03-25 2022-03-25 Data transmission method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210298979.XA CN114745367B (en) 2022-03-25 2022-03-25 Data transmission method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114745367A CN114745367A (en) 2022-07-12
CN114745367B true CN114745367B (en) 2024-04-19

Family

ID=82277198

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210298979.XA Active CN114745367B (en) 2022-03-25 2022-03-25 Data transmission method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114745367B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110099104A (en) * 2019-04-12 2019-08-06 平安科技(深圳)有限公司 Document transmission method, system and storage medium
CN112804202A (en) * 2020-12-30 2021-05-14 平安证券股份有限公司 Multi-internetwork data security interaction method and device, server and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11349755B2 (en) * 2020-07-21 2022-05-31 Bank Of America Corporation Routing data between computing entities using electronic data interchange

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110099104A (en) * 2019-04-12 2019-08-06 平安科技(深圳)有限公司 Document transmission method, system and storage medium
CN112804202A (en) * 2020-12-30 2021-05-14 平安证券股份有限公司 Multi-internetwork data security interaction method and device, server and storage medium

Also Published As

Publication number Publication date
CN114745367A (en) 2022-07-12

Similar Documents

Publication Publication Date Title
US10999377B2 (en) Method, device and computer program product for protocol selection
CN111447257B (en) Message conversion method and device
CN113382062B (en) Data transmission method, device and system
CN113364795B (en) Data transmission method and proxy server
CN108696899A (en) Sip message transmits and method of reseptance and transmission and reception device
CN114979295B (en) Gateway management method and device
CN114513552B (en) Data processing method, device, equipment and storage medium
CN113438256B (en) Data transmission method, system and proxy server based on double-layer SSL
CN108989157B (en) Method and device for controlling intelligent equipment
CN113992641A (en) Data processing method, device, equipment and storage medium
CN113778499B (en) Method, apparatus, device and computer readable medium for publishing services
CN108924773B (en) Message processing method and device
CN114745367B (en) Data transmission method, device, electronic equipment and storage medium
CN109005250B (en) Method and device for accessing server
CN113079055B (en) AGV operation data dynamic acquisition method and device
CN112732457A (en) Image transmission method, image transmission device, electronic equipment and computer readable medium
CN113779018A (en) Data processing method and device
CN110830584A (en) Access control device, control method, court trial host and readable storage medium
CN117170941B (en) Data backup method, device, electronic equipment and storage medium
CN112988408B (en) Multi-terminal interaction method and device
CN113132480B (en) Data transmission method, device and system
CN115118765B (en) Service processing method, device, electronic equipment and storage medium
US8738049B1 (en) Converged dialog in hybrid mobile applications
CN117201597A (en) Message processing method, device, electronic equipment and storage medium
CN118488068A (en) Data processing method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant