CN117834611A - File transmission method, device and system, electronic equipment and storage medium - Google Patents

File transmission method, device and system, electronic equipment and storage medium Download PDF

Info

Publication number
CN117834611A
CN117834611A CN202311575218.5A CN202311575218A CN117834611A CN 117834611 A CN117834611 A CN 117834611A CN 202311575218 A CN202311575218 A CN 202311575218A CN 117834611 A CN117834611 A CN 117834611A
Authority
CN
China
Prior art keywords
file
transmission
file transmission
party
configuration information
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.)
Pending
Application number
CN202311575218.5A
Other languages
Chinese (zh)
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.)
Postal Savings Bank of China Ltd
Original Assignee
Postal Savings Bank of China Ltd
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 Postal Savings Bank of China Ltd filed Critical Postal Savings Bank of China Ltd
Priority to CN202311575218.5A priority Critical patent/CN117834611A/en
Publication of CN117834611A publication Critical patent/CN117834611A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a file transmission method, a device and a system, electronic equipment and a storage medium, wherein the method is executed by a file transmission party, the file transmission party comprises a file sender and a file receiver, and the method comprises the following steps: sending a file transmission request to a file transmission management and control platform; receiving a response result of the file transmission management and control platform to the file transmission request, and determining file transmission configuration information according to the response result, wherein the file transmission configuration information comprises a file transmission path and transmission node information in a distributed cluster configured by the file transmission party; and transmitting the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information. The file transmission method of the embodiment of the application is based on a distributed cluster architecture, realizes point-to-point file transmission between the file sender and the file receiver through RPC call, simplifies file transmission flow, and improves file transmission efficiency and success rate.

Description

File transmission method, device and system, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of file transmission technologies, and in particular, to a method, an apparatus, a system, an electronic device, and a storage medium for file transmission.
Background
In order to realize unified management of file data transmission among systems, ensure safe and reliable file data transmission, and decouple transmission relations among systems, the current mainstream method is that each system realizes asynchronous data sharing among systems through a data transmission center, and the main flow comprises:
1) The file sending system uploads the file to the data transmission center through the message middleware;
2) The data transmission center stores the file information into a database and the file data into a storage;
3) The data transmission center transmits a file message to inform a file receiving system;
4) And the file receiving system actively applies for downloading files to the data transmission center after receiving the file message.
The efficiency of the whole transmission flow can meet the timeliness requirement of common batch file transmission, but under certain quasi-real-time business scenes, the problems of low file transmission efficiency and low success rate caused by complex flow of the method are exposed.
Disclosure of Invention
The embodiment of the application provides a file transmission method, a file transmission device, a file transmission system, electronic equipment and a storage medium, so that file transmission flow is simplified, and file transmission efficiency and success rate are improved.
The embodiment of the application adopts the following technical scheme:
in a first aspect, an embodiment of the present application provides a file transmission method, where the method is performed by a file transmitter, where the file transmitter includes a file sender and a file receiver, and the method includes:
sending a file transmission request to a file transmission management and control platform;
receiving a response result of the file transmission management and control platform to the file transmission request, and determining file transmission configuration information according to the response result, wherein the file transmission configuration information comprises a file transmission path and transmission node information in a distributed cluster configured by the file transmission party;
and transmitting the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information.
Optionally, the sending the file transfer request to the file transfer management platform includes:
acquiring connection configuration information of a file transmission management and control platform, wherein the connection configuration information comprises an IP address and a port of the file transmission management and control platform;
establishing connection with the file transmission management and control platform according to the connection configuration information;
and under the condition of successful connection, sending a file transmission request to the file transmission management and control platform.
Optionally, the transmitting the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information includes:
checking the file transmission path;
and under the condition that the verification is passed, transmitting the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information.
Optionally, the verifying the file transmission path includes:
determining whether the file transmission path exists in a transmission node corresponding to the file transmission party;
if yes, checking to pass;
otherwise, checking that the file does not pass, and outputting a log that the file transmission path does not exist.
Optionally, the transmitting the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information includes:
determining the corresponding relation between a file sender and a file receiver according to the transmission node information;
determining whether connection exists between a transmission node corresponding to the file sender and a transmission node corresponding to the file receiver according to the corresponding relation between the file sender and the file receiver;
if so, transmitting the file to be transmitted from the file sender to the file receiver through connection between the transmission node corresponding to the file sender and the transmission node corresponding to the file receiver;
Otherwise, a new connection between the transmission node corresponding to the file sender and the transmission node corresponding to the file receiver is created.
Optionally, the method further comprises:
monitoring the connection state between the transmission node corresponding to the file sender and the transmission node corresponding to the file receiver;
and under the condition that the connection state is an idle state and the duration of the idle state exceeds a preset duration threshold, disconnecting the connection between the transmission node corresponding to the file sender and the transmission node corresponding to the file receiver.
Optionally, the file transmission path includes a file uploading path and a file downloading path, the file uploading path is used for a file sender to obtain a file to be transmitted, and the file downloading path is used for a file receiver to save the file to be transmitted.
In a second aspect, an embodiment of the present application further provides a file transfer method, where the method is performed by a file transfer management platform, and the method includes:
receiving a file transmission request of a file transmitting party;
acquiring file transmission configuration information according to the file transmission request, wherein the file transmission configuration information comprises a file transmission path and transmission node information in a distributed cluster configured by the file transmission party;
And returning the file transmission configuration information to the file transmission party so that the file transmission party can perform file transmission according to the file transmission configuration information.
Optionally, the file transmission request carries system information of a file transmitting party, and the acquiring file transmission configuration information according to the file transmission request includes:
verifying the system information of the file transmitting party;
under the condition that the verification is passed, establishing connection with a file transmission configuration database;
and under the condition of successful connection, acquiring file transmission configuration information corresponding to the file transmission request from the file transmission configuration database.
Optionally, the method further comprises:
receiving a file transmission configuration request of a file transmitter;
generating file transmission configuration information according to the file transmission configuration request;
and storing the file transmission configuration information into a file transmission configuration database.
In a third aspect, an embodiment of the present application further provides a file transmitting apparatus, where the apparatus is applied to a file transmitting party, and the file transmitting party includes a file transmitting party and a file receiving party, and the apparatus includes:
the sending unit is used for sending a file transmission request to the file transmission management and control platform;
The determining unit is used for receiving a response result of the file transmission management and control platform to the file transmission request, and determining file transmission configuration information according to the response result, wherein the file transmission configuration information comprises a file transmission path and transmission node information in a distributed cluster configured by the file transmission party;
and the transmission unit is used for transmitting the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information.
In a fourth aspect, an embodiment of the present application further provides a file transfer device, where the device is applied to a file transfer management and control platform, and the device includes:
a first receiving unit, configured to receive a file transmission request from a file transmitting party;
an obtaining unit, configured to obtain file transmission configuration information according to the file transmission request, where the file transmission configuration information includes a file transmission path and transmission node information in a distributed cluster configured by the file transmitter;
and the returning unit is used for returning the file transmission configuration information to the file transmission party so that the file transmission party can perform file transmission according to the file transmission configuration information.
In a fifth aspect, embodiments of the present application further provide a file transfer system, where the file transfer system includes a file transfer party for performing any of the methods of the first aspect and a file transfer management platform for performing any of the methods of the second aspect.
In a sixth aspect, embodiments of the present application further provide an electronic device, including:
a processor; and
a memory arranged to store computer executable instructions which, when executed, cause the processor to perform any of the methods described hereinbefore.
In a seventh aspect, embodiments of the present application also provide a computer-readable storage medium storing one or more programs that, when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform any of the methods described above.
The above-mentioned at least one technical scheme that this application embodiment adopted can reach following beneficial effect: the file transmission method is executed by a file transmission party, and a file transmission request is sent to a file transmission management and control platform; then receiving a response result of the file transmission management and control platform to the file transmission request, and determining file transmission configuration information according to the response result, wherein the file transmission configuration information comprises a file transmission path and transmission node information in a distributed cluster configured by a file transmission party; and finally, transmitting the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information. The file transmission method of the embodiment of the application is based on a distributed cluster architecture, realizes point-to-point file transmission between the file sender and the file receiver through RPC call, simplifies file transmission flow, and improves file transmission efficiency and success rate.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
fig. 1 is a flow chart of a file transmission method in an embodiment of the present application;
FIG. 2 is a flowchart illustrating another method for file transfer according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a file transfer process according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a file transfer device according to an embodiment of the present application;
FIG. 5 is a schematic structural diagram of another file transfer device according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a file transfer system according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
For the purposes, technical solutions and advantages of the present application, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The following describes in detail the technical solutions provided by the embodiments of the present application with reference to the accompanying drawings.
The current file transmission implementation scheme mainly uses RabbitMQ, hbase, hdfs and other various open source components to realize file transmission between associated systems. RabbitMQ is open source information proxy software based on an advanced communication protocol, and has the advantages of high reliability, high expansibility and the like. Hbase is an open-source non-relational distributed database realized by Java programming language, and has the advantages of high reliability, high performance, alignment, scalability and the like. Hdfs is a file system, and files are positioned through a directory tree, so that the method has the advantages of high fault tolerance, suitability for processing big data and the like.
The scheme has 3 core modules:
1) And a file uploading module: the association system uploads file data to a queue of the file RabbitMQ through a client, the data transmission center consumes a queue message and stores large file data into Hdfs, and small file data is stored into Hbase;
2) And a message sending module: after the file is stored successfully, the data transmission center sends a file notification message, and the file information is uploaded to an associated system queue in the RabbitMQ;
3) And a file downloading module: the file receiver receives and analyzes the file information from the queue of the RabbitMQ through the client, and then actively downloads and acquires the file through the data transmission center.
The above-mentioned related system file transmission mode meets the transmission requirements of most files, but the file transmission flow is complex, and each process of uploading, sending message and downloading is asynchronous processing. In a service scenario with high timeliness requirement, the file transmission mode may have the condition that efficiency and success rate cannot meet the requirement.
Based on this, the embodiment of the present application provides a file transmission method, as shown in fig. 1, and provides a flowchart of the file transmission method in the embodiment of the present application, where the method is performed by a file transmitter, and the file transmitter includes a file sender and a file receiver, and the method at least includes steps S110 to S130 as follows:
step S110, a file transmission request is sent to a file transmission management and control platform.
The file transmission method of the embodiment of the application is executed by a file transmission party, wherein the file transmission party comprises a file sender and a file receiver, the file sender refers to the party sending the file, and the file receiver refers to the party receiving the file.
When the file transmission is carried out, the file transmission request is required to be sent to the file transmission management and control platform, and the file transmission management and control platform can be regarded as a platform for uniformly managing and maintaining related information of file transmission configuration related to the file transmission flow, so that the file transmission request is required to carry information such as identity identification and the like related to acquiring the file transmission configuration information.
Step S120, receiving a response result of the file transmission management and control platform to the file transmission request, and determining file transmission configuration information according to the response result, where the file transmission configuration information includes a file transmission path and transmission node information in the distributed cluster configured by the file transmission party.
The file transmission management and control platform can inquire the file transmission configuration information associated with the file transmission management and control platform according to the file transmission request, and the file transmission configuration information is packaged and then returned as a response result to the file transmission request. After receiving the response result returned by the file transmission management and control platform, the file transmission party analyzes the response result to obtain file transmission configuration information.
The file transmission configuration information may specifically include a file transmission path, where the file transmission path may include a file upload path and a file download path, where the file upload path refers to a path of a file sender obtaining a file to be transmitted, and the file download path refers to a path of a file receiver storing the file to be transmitted, so that the file transmission path information may be used as a basis for peer-to-peer file transmission between the file sender and the file receiver.
The file transmission configuration information may further include transmission node information in a distributed cluster configured by a file transmission party, and in order to achieve unified management and file transmission efficiency of file transmission between systems, in this embodiment of the present application, a distributed cluster architecture may be used to deploy file transmission nodes, for example, a central Proxy (Proxy) cluster may be based on a Zookeeper distributed cooperative control center, where the gateway Proxy functions such as data caching, event distribution, routing forwarding and the like provided by the central Proxy (Proxy) cluster for a main development object and API client function encapsulation matched with the gateway Proxy functions. The transmission Node information may specifically include information such as a Node list configured by the file transmitter, a Node exchange ID, and the like.
And step S130, transmitting the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information.
Because the file uploading path in the file transmission path characterizes the path of the file sender for acquiring the file to be transmitted, the file downloading path characterizes the path of the file receiver for storing the file to be transmitted, and the transmission node information reflects the node information currently configured by the file sender and the corresponding node connection state, synchronous file transmission can be carried out by calling through RPC (Remote Procedure Call Protocol) based on the file transmission path and the transmission node information, namely, the file to be transmitted is directly transmitted from the file sender to the file receiver.
The file transmission method of the embodiment of the application is based on a distributed cluster architecture, realizes point-to-point file transmission between the file sender and the file receiver through RPC call, simplifies file transmission flow, and improves file transmission efficiency and success rate.
In some embodiments of the present application, the sending the file transfer request to the file transfer management platform includes: acquiring connection configuration information of a file transmission management and control platform, wherein the connection configuration information comprises an IP address and a port of the file transmission management and control platform; establishing connection with the file transmission management and control platform according to the connection configuration information; and under the condition of successful connection, sending a file transmission request to the file transmission management and control platform.
When a file transmission party sends a file transmission request to a file transmission management and control platform, connection configuration information of the file transmission management and control platform can be obtained from a local configuration file, wherein the connection configuration information mainly comprises information such as an IP address and a port of the file transmission management and control platform, the file transmission party can establish connection with the file transmission management and control platform based on the connection configuration information of the file transmission management and control platform, and after connection is successful, the file transmission request can be sent to the file transmission management and control platform.
The file transmission request may specifically include system information of the file transmission party, for example, may include information such as a system identifier and a login password of the file transmission party, and the file transmission management and control platform may verify the information such as the system identifier and the login password of the file transmission party, where the verification is passed, and then the corresponding file transmission configuration information may be returned.
In some embodiments of the present application, the transmitting the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information includes: checking the file transmission path; and under the condition that the verification is passed, transmitting the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information.
When the file is transmitted according to the file transmission path and the transmission node information, the file transmission path returned by the file transmission management and control platform can be checked first, wherein the check mainly checks whether the file transmission path exists in the file transmission node, and the subsequent file transmission can be performed only when the file transmission path exists.
In some embodiments of the present application, the verifying the file transmission path includes: determining whether the file transmission path exists in a transmission node corresponding to the file transmission party; if yes, checking to pass; otherwise, checking that the file does not pass, and outputting a log that the file transmission path does not exist.
The checking of the file transmission path in the embodiment of the present application is mainly to check whether the file transmission node has the file transmission path, for example, for a file sender, it needs to determine whether the file transmission node corresponding to the file sender has a file upload path, and for a file receiver, it needs to determine whether the file transmission node corresponding to the file receiver has a corresponding file download path. If the log exists, the log passes the verification, and further file transmission can be carried out according to the file transmission path and the transmission node information, and if the log does not exist, the log which does not exist in the file transmission path is printed.
In some embodiments of the present application, the transmitting the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information includes: determining the corresponding relation between a file sender and a file receiver according to the transmission node information; determining whether connection exists between a transmission node corresponding to the file sender and a transmission node corresponding to the file receiver according to the corresponding relation between the file sender and the file receiver; if so, transmitting the file to be transmitted from the file sender to the file receiver through connection between the transmission node corresponding to the file sender and the transmission node corresponding to the file receiver; otherwise, a new connection between the transmission node corresponding to the file sender and the transmission node corresponding to the file receiver is created.
As described above, the transmission node information mainly includes information such as a node list configured by the file transmitting party and a node connection state, and the correspondence between the file transmitting party and the file receiving party, that is, which party the file to be transmitted is transmitted to, can be determined according to the node list information configured by the file transmitting party. Based on the corresponding relation between the file sender and the file receiver, whether connection is established between the file transmission nodes corresponding to the two sides is further judged according to the node connection state, if the connection is established, the connection between the corresponding file transmission nodes is directly called for point-to-point file transmission without repeated establishment, and if the connection is not established, new connection between the file transmission nodes corresponding to the two sides can be established so as to carry out file transmission through the new connection.
In some embodiments of the present application, the method further comprises: monitoring the connection state between the transmission node corresponding to the file sender and the transmission node corresponding to the file receiver; and under the condition that the connection state is an idle state and the duration of the idle state exceeds a preset duration threshold, disconnecting the connection between the transmission node corresponding to the file sender and the transmission node corresponding to the file receiver.
In order to reduce excessive occupation of transmission resources by idle connection, the embodiment of the application can monitor the connection state between nodes in a timing task mode, when the connection state between the nodes is in the idle state and reaches a certain time threshold, the file transmission requirement between the two nodes is smaller, the connection can be temporarily disconnected, certain transmission resources are released, and a connection channel can be kept for the nodes in a busy state of the connection state between the nodes, so that flexible control of the connection state is realized, and file transmission efficiency and success rate are improved.
In some embodiments of the present application, the file transmission path includes a file upload path and a file download path, where the file upload path is used for a file sender to obtain a file to be transmitted, and the file download path is used for a file receiver to save the file to be transmitted.
As described above, the file transmission path in the embodiment of the present application may include a file upload path and a file download path, where the file upload path refers to a path of a file sender obtaining a file to be transmitted, and the file download path refers to a path of a file receiver storing the file to be transmitted after receiving the file to be transmitted.
The embodiment of the application also provides another file transmission method, as shown in fig. 2, and provides a flowchart of another file transmission method in the embodiment of the application, where the method is executed by a file transmission management platform, and the method at least includes steps S210 to S230 as follows:
step S210, receiving a file transmission request of a file transmission party;
step S220, file transmission configuration information is obtained according to the file transmission request, wherein the file transmission configuration information comprises a file transmission path and transmission node information in a distributed cluster configured by the file transmission party;
step S230, returning the file transmission configuration information to the file transmission party, so that the file transmission party performs file transmission according to the file transmission configuration information.
The file transmission method in the embodiment of the application is executed by a file transmission management and control platform, which is mainly used for uniformly managing and maintaining related information of file transmission configuration related to a file transmission flow, and specifically can comprise operations of registering, modifying, deleting and the like on nodes in a distributed cluster.
When the file transmission is carried out, the file transmission request of the file transmission party is required to be received first, the file transmission request is inquired in the file transmission configuration database according to the file transmission request, the file transmission configuration information is obtained and returned to the file transmission party, and the file transmission party carries out file transmission according to the file transmission configuration information.
In some embodiments of the present application, the file transfer request carries system information of a file transfer party, and the obtaining file transfer configuration information according to the file transfer request includes: verifying the system information of the file transmitting party; under the condition that the verification is passed, establishing connection with a file transmission configuration database; and under the condition of successful connection, acquiring file transmission configuration information corresponding to the file transmission request from the file transmission configuration database.
The file transmission request in the embodiment of the present application carries the system information of the file transmission party, after receiving the file transmission request, the system information of the file transmission party, such as the system identifier, the login password, and other information, may be checked first, and if the verification is passed, then a connection is established with the file transmission configuration database, and the file transmission configuration information corresponding to the file transmission request is queried and returned.
In some embodiments of the present application, the method further comprises: receiving a file transmission configuration request of a file transmitter; generating file transmission configuration information according to the file transmission configuration request; and storing the file transmission configuration information into a file transmission configuration database.
The file transmission side can configure relevant information in the file transmission management and control platform, including configuration of transmission nodes, file uploading paths, file downloading paths and the like, and the file transmission management and control platform can store information configured by the file transmission side into a file transmission configuration database for management and maintenance.
In order to facilitate understanding of the foregoing embodiments, as shown in fig. 3, a schematic diagram of a file transfer flow in an embodiment of the present application is provided. Firstly, a file sender and a file receiver start a file transmission tool, wherein the file transmission tool can be regarded as a defined Jar packet, and the file sender and the file receiver can start a file transmission flow of the embodiment of the application by calling the Jar packet.
And then, the file sender and the file receiver acquire connection configuration information of the file transmission management and control platform from the configuration file, connection is established with the file transmission management and control platform based on the connection configuration information of the file transmission management and control platform, after the connection is successfully established, a file transmission request is sent to the file transmission management and control platform, and the file transmission management and control platform inquires file transmission configuration information from a file transmission configuration database according to the file transmission request and returns the file transmission configuration information, wherein the file transmission management and control platform comprises information such as a transmission node list and exchange ID (identity) configured by the file sender and the file receiver.
And then, the file sender analyzes the result returned by the file transmission management and control platform to obtain a file uploading path, the file receiver analyzes the result returned by the file transmission management and control platform to obtain a file downloading path, and the file sender and the file receiver respectively verify the file uploading path and the file downloading path and judge whether a file uploading path and a file downloading path exist in the corresponding transmission node.
If so, further judging the connection state between the transmission nodes corresponding to the file sender and the file receiver, if so, directly acquiring the file to be transmitted from the file uploading path, transmitting the file to be transmitted to the file downloading path of the file receiver through the connection between the nodes, and if not, creating a new connection to transmit the file.
In summary, the main key points of the file transmission method of the present application are as follows:
1) Directly writing the file uploaded by the file sender into the local of the file receiver in a synchronous mode;
2) Based on a Zookeeper distributed cooperative control center, a center Proxy (Proxy) cluster encapsulates gateway Proxy functions such as data caching, event distribution, routing forwarding and the like provided by a main development object and API client functions matched with the gateway Proxy functions.
3) The Node cluster and the embedded Side end (Provider and Customer) can realize the encapsulation of the data transmission function through RPC call.
According to the file transmission method, the file is transmitted in the synchronous mode, the transfer storage of the data transmission center is not needed, the file transmission flow is simplified, the time consumption of file transmission is shortened, and the file transmission efficiency and success rate are improved.
The embodiment of the application further provides a file transmission device 400, as shown in fig. 4, and provides a schematic structural diagram of the file transmission device in the embodiment of the application, where the device is applied to a file transmitting party, and the file transmitting party includes a file transmitting party and a file receiving party, and the device 400 includes:
a sending unit 410, configured to send a file transfer request to a file transfer management and control platform;
a determining unit 420, configured to receive a response result of the file transmission management and control platform to the file transmission request, and determine file transmission configuration information according to the response result, where the file transmission configuration information includes a file transmission path and transmission node information in a distributed cluster configured by the file transmitter;
and a transmission unit 430, configured to transmit the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information.
In some embodiments of the present application, the sending unit 410 is specifically configured to: acquiring connection configuration information of a file transmission management and control platform, wherein the connection configuration information comprises an IP address and a port of the file transmission management and control platform; establishing connection with the file transmission management and control platform according to the connection configuration information; and under the condition of successful connection, sending a file transmission request to the file transmission management and control platform.
In some embodiments of the present application, the transmission unit 430 is specifically configured to: checking the file transmission path; and under the condition that the verification is passed, transmitting the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information.
In some embodiments of the present application, the transmission unit 430 is specifically configured to: determining whether the file transmission path exists in a transmission node corresponding to the file transmission party; if yes, checking to pass; otherwise, checking that the file does not pass, and outputting a log that the file transmission path does not exist.
In some embodiments of the present application, the transmission unit 430 is specifically configured to: determining the corresponding relation between a file sender and a file receiver according to the transmission node information; determining whether connection exists between a transmission node corresponding to the file sender and a transmission node corresponding to the file receiver according to the corresponding relation between the file sender and the file receiver; if so, transmitting the file to be transmitted from the file sender to the file receiver through connection between the transmission node corresponding to the file sender and the transmission node corresponding to the file receiver; otherwise, a new connection between the transmission node corresponding to the file sender and the transmission node corresponding to the file receiver is created.
In some embodiments of the present application, the apparatus further comprises: the monitoring unit is specifically used for monitoring the connection state between the transmission node corresponding to the file sender and the transmission node corresponding to the file receiver; and the connection unit is used for disconnecting the connection between the transmission node corresponding to the file sender and the transmission node corresponding to the file receiver under the condition that the connection state is an idle state and the duration of the idle state exceeds a preset duration threshold.
It can be understood that the above-mentioned file transfer device can implement the steps of the file transfer method provided by the file transfer party in the foregoing embodiment, and the relevant explanation about the file transfer method is applicable to the file transfer device, which is not repeated herein.
The embodiment of the present application further provides a file transfer device 500, as shown in fig. 5, and a schematic structural diagram of another file transfer device in the embodiment of the present application is provided, where the device is applied to a file transfer management and control platform, and the device 500 includes:
a first receiving unit 510, configured to receive a file transmission request from a file transmitting party;
an obtaining unit 520, configured to obtain file transmission configuration information according to the file transmission request, where the file transmission configuration information includes a file transmission path and transmission node information in a distributed cluster configured by the file transmitter;
And a returning unit 530, configured to return the file transmission configuration information to the file transmitting party, so that the file transmitting party performs file transmission according to the file transmission configuration information.
In some embodiments of the present application, the file transmission request carries system information of a file transmitting party, and the obtaining unit 520 is specifically configured to: verifying the system information of the file transmitting party; under the condition that the verification is passed, establishing connection with a file transmission configuration database; and under the condition of successful connection, acquiring file transmission configuration information corresponding to the file transmission request from the file transmission configuration database.
In some embodiments of the present application, the apparatus further comprises: a second receiving unit, configured to receive a file transmission configuration request of a file transmitting party; the generating unit is used for generating file transmission configuration information according to the file transmission configuration request; and the storage unit is used for storing the file transmission configuration information into a file transmission configuration database.
It can be understood that the above-mentioned file transfer device can implement each step of the file transfer method provided by the file transfer management and control platform in the foregoing embodiment, and the relevant explanation about the file transfer method is applicable to the file transfer device, which is not repeated herein.
An embodiment of the present application further provides a file transfer system, as shown in fig. 6, and provides an architecture schematic of the file transfer system in an embodiment of the present application, where the file transfer system includes a file transfer party for executing any of the methods in the first aspect and a file transfer management platform for executing any of the methods in the second aspect.
As shown in fig. 6, the file transmission system in the embodiment of the present application mainly involves the following procedure when performing file transmission:
s1: a file sender sends a file transmission request, in particular a file uploading request;
f1, F2, F3, F4: file transfer flow direction;
p1: the transmission tool sends a request to the file transmission management and control platform, wherein the request contains information such as a system identifier of a file sender;
p2: the control platform receives the uploading request and returns the information such as nodes connected with the system, uploading paths and the like;
l1: the management and control platform can register, modify and delete node information in the Zookeeper;
n1: saving system connection information, a file uploading path and a file downloading path;
r1: the downloading system uses a transmission tool to send a file transmission request, in particular a file downloading request;
D1: the transmission tool sends a request to the file transmission management and control platform, wherein the request contains information such as system identification of a file receiver and the like
D2: the file transmission management and control platform receives the file downloading request and returns the information such as the node connected with the system, the file downloading path and the like.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Referring to fig. 7, at the hardware level, the electronic device includes a processor, and optionally an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, network interface, and memory may be interconnected by an internal bus, which may be an ISA (Industry Standard Architecture ) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 7, but not only one bus or type of bus.
And the memory is used for storing programs. In particular, the program may include program code including computer-operating instructions. The memory may include memory and non-volatile storage and provide instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs, and forms a file transmission device on a logic level. And the processor executes the program stored in the memory.
The method performed by the file transfer device disclosed in the embodiment shown in fig. 1 of the present application may be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
The electronic device may also execute the method executed by the file transmission device in fig. 1, and implement the functions of the file transmission device in the embodiment shown in fig. 1, which is not described herein again.
The present embodiments also provide a computer-readable storage medium storing one or more programs, the one or more programs including instructions, which when executed by an electronic device comprising a plurality of application programs, enable the electronic device to perform the method performed by the file transfer apparatus in the embodiment shown in fig. 1.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (15)

1. A method of transmitting a file, the method being performed by a file transmitting party, the file transmitting party including a file transmitting party and a file receiving party, the method comprising:
sending a file transmission request to a file transmission management and control platform;
receiving a response result of the file transmission management and control platform to the file transmission request, and determining file transmission configuration information according to the response result, wherein the file transmission configuration information comprises a file transmission path and transmission node information in a distributed cluster configured by the file transmission party;
And transmitting the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information.
2. The method of claim 1, wherein the sending a file transfer request to a file transfer management platform comprises:
acquiring connection configuration information of a file transmission management and control platform, wherein the connection configuration information comprises an IP address and a port of the file transmission management and control platform;
establishing connection with the file transmission management and control platform according to the connection configuration information;
and under the condition of successful connection, sending a file transmission request to the file transmission management and control platform.
3. The file transmission method according to claim 1, wherein the transmitting the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information comprises:
checking the file transmission path;
and under the condition that the verification is passed, transmitting the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information.
4. A file transfer method according to claim 3, wherein said verifying the file transfer path comprises:
Determining whether the file transmission path exists in a transmission node corresponding to the file transmission party;
if yes, checking to pass;
otherwise, checking that the file does not pass, and outputting a log that the file transmission path does not exist.
5. The file transmission method according to claim 1, wherein the transmitting the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information comprises:
determining the corresponding relation between a file sender and a file receiver according to the transmission node information;
determining whether connection exists between a transmission node corresponding to the file sender and a transmission node corresponding to the file receiver according to the corresponding relation between the file sender and the file receiver;
if so, transmitting the file to be transmitted from the file sender to the file receiver through connection between the transmission node corresponding to the file sender and the transmission node corresponding to the file receiver;
otherwise, a new connection between the transmission node corresponding to the file sender and the transmission node corresponding to the file receiver is created.
6. The file transfer method of claim 5, further comprising:
Monitoring the connection state between the transmission node corresponding to the file sender and the transmission node corresponding to the file receiver;
and under the condition that the connection state is an idle state and the duration of the idle state exceeds a preset duration threshold, disconnecting the connection between the transmission node corresponding to the file sender and the transmission node corresponding to the file receiver.
7. The file transmission method according to any one of claims 1 to 6, wherein the file transmission path includes a file upload path for a file sender to acquire a file to be transmitted and a file download path for a file receiver to save the file to be transmitted.
8. A method of file transfer, the method performed by a file transfer management platform, the method comprising:
receiving a file transmission request of a file transmitting party;
acquiring file transmission configuration information according to the file transmission request, wherein the file transmission configuration information comprises a file transmission path and transmission node information in a distributed cluster configured by the file transmission party;
and returning the file transmission configuration information to the file transmission party so that the file transmission party can perform file transmission according to the file transmission configuration information.
9. The method of claim 8, wherein the file transfer request carries system information of a file transfer party, and the obtaining file transfer configuration information according to the file transfer request includes:
verifying the system information of the file transmitting party;
under the condition that the verification is passed, establishing connection with a file transmission configuration database;
and under the condition of successful connection, acquiring file transmission configuration information corresponding to the file transmission request from the file transmission configuration database.
10. The file transfer method of claim 8, wherein the method further comprises:
receiving a file transmission configuration request of a file transmitter;
generating file transmission configuration information according to the file transmission configuration request;
and storing the file transmission configuration information into a file transmission configuration database.
11. A file transfer apparatus, the apparatus being applied to a file transfer party, the file transfer party including a file sender and a file receiver, the apparatus comprising:
the sending unit is used for sending a file transmission request to the file transmission management and control platform;
the determining unit is used for receiving a response result of the file transmission management and control platform to the file transmission request, and determining file transmission configuration information according to the response result, wherein the file transmission configuration information comprises a file transmission path and transmission node information in a distributed cluster configured by the file transmission party;
And the transmission unit is used for transmitting the file to be transmitted from the file sender to the file receiver according to the file transmission path and the transmission node information.
12. A file transfer device, the device being applied to a file transfer management platform, the device comprising:
a first receiving unit, configured to receive a file transmission request from a file transmitting party;
an obtaining unit, configured to obtain file transmission configuration information according to the file transmission request, where the file transmission configuration information includes a file transmission path and transmission node information in a distributed cluster configured by the file transmitter;
and the returning unit is used for returning the file transmission configuration information to the file transmission party so that the file transmission party can perform file transmission according to the file transmission configuration information.
13. A file transfer system, characterized in that the file transfer system comprises a file transfer party for performing the method of any of claims 1-7 and a file transfer management platform for performing the method of any of claims 8-10.
14. An electronic device, comprising:
A processor; and
a memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of any of claims 1 to 7 or to perform the method of any of claims 8 to 10.
15. A computer readable storage medium storing one or more programs, which when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform the method of any of claims 1-7 or to perform the method of any of claims 8-10.
CN202311575218.5A 2023-11-23 2023-11-23 File transmission method, device and system, electronic equipment and storage medium Pending CN117834611A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311575218.5A CN117834611A (en) 2023-11-23 2023-11-23 File transmission method, device and system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311575218.5A CN117834611A (en) 2023-11-23 2023-11-23 File transmission method, device and system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117834611A true CN117834611A (en) 2024-04-05

Family

ID=90514080

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311575218.5A Pending CN117834611A (en) 2023-11-23 2023-11-23 File transmission method, device and system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117834611A (en)

Similar Documents

Publication Publication Date Title
CN114124451B (en) Data processing method and system for Internet of things equipment and computer storage medium
CN113612686A (en) Traffic scheduling method and device and electronic equipment
CN105450731A (en) Method and apparatus for realizing communication between web layer and native layer
CN115225709B (en) Data transmission system, method, electronic device and readable storage medium
CN110661673B (en) Heartbeat detection method and device
WO2023056713A1 (en) Cloud platform binding method and system for internet of things card, and device and medium
CN112087475B (en) Message pushing method and device for cloud platform component application and message server
CN110519388B (en) Processing method and device for block chain request, electronic equipment and readable storage medium
CN111309691A (en) Data sharing exchange system and exchange method based on bus architecture
CN108541000B (en) Method, medium and device for detecting network connection
CN112532714B (en) Data processing method, processing device, server and storage medium
CN112653716B (en) Service binding method and device
CN112437155A (en) Service data processing method and device and server equipment
CN116647580A (en) Data transmission method, device, medium and equipment based on MQTT protocol
CN117834611A (en) File transmission method, device and system, electronic equipment and storage medium
KR101264315B1 (en) Method, apparatus and record carrier for interworking between applications on a mobile platform
CN115567388A (en) Method, system, device and storage medium for automatically updating network slice configuration
CN114979985A (en) Indirect communication message transmission method, system and gateway equipment
CN112202914B (en) Message pushing method and device
CN114915656A (en) Internet of vehicles terminal access method, device, storage medium and electronic equipment
CN111459819B (en) Software testing method and device, electronic equipment and computer readable medium
WO2021247402A1 (en) Unidirectional gateway mediated multiplexing of concurrent data message streams
CN111131414B (en) Back-end platform, service calling method, first service module and server
US20230085632A1 (en) Unidirectional gateway mediated delivery of data messages
CN115480929A (en) Message processing method and device under same-city multi-activity data center

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