CN112653760B - Cross-server file transmission method and device, electronic equipment and storage medium - Google Patents

Cross-server file transmission method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112653760B
CN112653760B CN202011528896.2A CN202011528896A CN112653760B CN 112653760 B CN112653760 B CN 112653760B CN 202011528896 A CN202011528896 A CN 202011528896A CN 112653760 B CN112653760 B CN 112653760B
Authority
CN
China
Prior art keywords
file
domain name
server
address
files
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
CN202011528896.2A
Other languages
Chinese (zh)
Other versions
CN112653760A (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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202011528896.2A priority Critical patent/CN112653760B/en
Publication of CN112653760A publication Critical patent/CN112653760A/en
Application granted granted Critical
Publication of CN112653760B publication Critical patent/CN112653760B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session

Abstract

The invention relates to a cloud transmission technology, and discloses a cross-server file transmission method, which comprises the following steps: the method comprises the steps of classifying files to be transmitted to obtain class transmission files, storing the class transmission files to a source server, generating a storage address, performing marking operation on the storage address to obtain a marking address, determining a domain name server according to a received file transmission request, performing domain name resolution operation on the marking address by using the domain name server to obtain a domain name resolution response instruction, sending the domain name resolution response instruction to a pre-constructed target server, and transmitting the class transmission files to the target server when the target server responds to the domain name resolution response instruction. The invention also relates to a block chain technology, and files to be transmitted, class transmission files and the like can be stored in the block chain nodes. The invention also provides a cross-server file transmission device, electronic equipment and a storage medium. The invention can solve the problems that cross-server direct connection is not stable enough and file transmission interruption is easy to occur.

Description

Cross-server file transmission method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of cloud transmission, and in particular, to a method and an apparatus for file transmission across servers, an electronic device, and a computer-readable storage medium.
Background
The existing cross-server file transmission mainly depends on direct connection transmission, the stateless direct connection transmission is generally connected once or once and cannot be continuously used, and the transmission interruption phenomenon easily occurs due to the fact that the cross-server direct connection transmission is not stable enough.
Disclosure of Invention
The invention provides a cross-server file transmission method and device, electronic equipment and a computer readable storage medium, and mainly aims to solve the problems that cross-server direct connection is not stable enough and file transmission interruption is easy to occur.
In order to achieve the above object, the present invention provides a cross-server file transfer method, including:
the method comprises the steps of obtaining a plurality of files to be transmitted, classifying the files to be transmitted according to the size of the files to obtain class transmission files, storing the class transmission files to a pre-constructed source server and generating storage addresses;
executing marking operation on the storage address to obtain a marked address;
receiving a file transmission request input by a user, determining a domain name server according to the file transmission request, performing domain name resolution operation on the marked address by using the domain name server to obtain a domain name resolution response instruction, and sending the domain name resolution response instruction to a pre-constructed target server;
and when the target server responds to the domain name resolution response instruction, transmitting the class transmission file to the target server.
Optionally, the performing a tag operation on the storage address to obtain a tag address includes:
carrying out encryption operation on the generation time of the storage address and the file size value of the class transmission file to generate a mark field;
and adding the mark field in the storage address to obtain the mark address.
Optionally, the receiving a file transmission request input by a user, and determining a domain name server according to the file transmission request includes:
determining a cache fragment area of the file transmission request according to the IP address of the target server carried in the file transmission request;
and determining the domain name server by utilizing the cache area according to a pre-constructed polling sequence.
Optionally, the performing, by using the domain name server, a domain name resolution operation on the labeled address to obtain a domain name resolution response instruction includes:
searching whether a domain name resolution response instruction corresponding to the file transmission request exists in a cache of the target server;
if the cache has a domain name resolution response instruction corresponding to the file transmission request, extracting the domain name resolution response instruction from the cache;
and if the cache does not have a domain name resolution response instruction corresponding to the file transmission request, performing domain name resolution operation on the marked address based on a mark record resolution method and the domain name server to obtain the domain name resolution response instruction.
Optionally, the classifying the file to be transmitted according to the size of the file to obtain a category transmission file includes:
calculating the memory occupied by each file to be transmitted to obtain a memory set;
performing descending or ascending arrangement on the memory sets to obtain memory arrangement sets;
according to a preset memory interval, performing interval division on the memory arrangement set to obtain a memory interval set;
and classifying the files to be transmitted by using the memory interval set to obtain the class transmission files.
Optionally, the storing the category transfer file to a pre-constructed source server and generating a storage address includes:
opening a corresponding storage space from the source server according to the memory interval of the class transmission file;
and storing the class transmission file into the storage space, and generating the storage address according to the file size value of the class transmission file and the IP address of the source server when the storage is successful.
Optionally, the transmitting the category transmission file to the target server includes:
extracting the class transmission file according to the IP address of the source server;
and acquiring the IP address of a target server from the file transmission request, and transmitting the class transmission file to the target server according to the IP address of the target server.
In order to solve the above problem, the present invention further provides a cross-server file transfer apparatus, including:
the transmission file generation module is used for acquiring a plurality of files to be transmitted, classifying the files to be transmitted according to the sizes of the files to obtain class transmission files, storing the class transmission files to a pre-constructed source server and generating storage addresses;
the marking address generating module is used for executing marking operation on the storage address to obtain a marking address;
the domain name resolution module is used for receiving a file transmission request input by a user, determining a domain name server according to the file transmission request, executing domain name resolution operation on the marked address by using the domain name server to obtain a domain name resolution response instruction, and sending the domain name resolution response instruction to a pre-constructed target server;
and the file transmission module is used for transmitting the class transmission file to the target server when the target server responds to the domain name resolution response instruction.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one instruction; and
a processor executing instructions stored in the memory to implement the cross-server file transfer method of any of the above.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, comprising a storage data area and a storage program area, wherein the storage data area stores the created data, and the storage program area stores a computer program; wherein the computer program when executed by a processor implements a cross-server file transfer method as described in any of the above.
The method comprises the steps of classifying a plurality of files to be transmitted according to file sizes, storing the files to be transmitted to a pre-constructed source server to generate a storage address, executing marking operation on the storage address to obtain a marked address, determining a domain name server, executing domain name resolution operation on the marked address to obtain a domain name resolution response instruction, sending the domain name resolution response instruction to a pre-constructed target server, and transmitting the class transmission files to the target server when the target server responds to the domain name resolution response instruction. Therefore, the cross-server file transmission method, the cross-server file transmission device and the computer readable storage medium can solve the problems that cross-server direct connection is not stable enough and file transmission interruption is easy to occur.
Drawings
Fig. 1 is a schematic flowchart of a cross-server file transfer method according to an embodiment of the present invention;
fig. 2 is a detailed flowchart of S1 in the cross-server file transfer method according to an embodiment of the present invention;
FIG. 3 is a block diagram of a cross-server file transfer device according to an embodiment of the present invention;
fig. 4 is a schematic internal structural diagram of an electronic device implementing a cross-server file transfer method according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
An embodiment of the present application provides a cross-server file transfer method, where an execution subject of the cross-server file transfer method includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the cross-server file transfer method may be performed by software or hardware installed in the terminal device or the server device, and the software may be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Fig. 1 is a schematic flowchart of a cross-server file transfer method according to an embodiment of the present invention. In this embodiment, the cross-server file transfer method includes:
s1, obtaining a plurality of files to be transmitted, classifying the files to be transmitted according to file sizes to obtain class transmission files, storing the class transmission files to a pre-constructed source server and generating storage addresses.
In a preferred embodiment of the present invention, the file to be transmitted is a file transmitted from an external network to an internal network or from the internal network to the external network based on the purpose and the requirement of a user. The file to be transmitted may include text data, image data, a computer executable program, and the like.
When file transmission is executed between an internal network and an external network, considering the safety of the internal network and the condition that network congestion is easy to occur between the internal network and the external network, in the embodiment of the invention, the files to be transmitted need to be classified according to the size of the files.
In detail, referring to fig. 2, the classifying the plurality of files to be transmitted according to the file size to obtain a category transmission file includes:
s11, calculating a memory occupied by each file to be transmitted to obtain a memory set;
s12, performing descending or ascending arrangement on the memory set to obtain a memory arrangement set;
s13, according to a preset memory interval, performing interval division on the memory arrangement set to obtain a memory interval set;
and S14, classifying the file to be transmitted by utilizing the memory interval set to obtain the class transmission file.
In the embodiment of the invention, the preset memory intervals are [0,0.5M ], [0.5m,1m ], [1m,5m ], [5m,15m ], [15m,50m ] and the like, so that the class transmission files in different memory intervals are obtained by performing interval division according to the memory corresponding to each file to be transmitted.
After obtaining the class transmission file, further storing the class transmission file, in detail, storing the class transmission file to a pre-constructed source server, and generating a storage address, including: opening a corresponding storage space from the source server according to the memory interval of the class transmission file; and storing the class transmission file into the storage space, and generating a storage address according to the file size of the class transmission file and the IP address of the source server when the storage is successful.
If the file size of one class transmission file A is 47M, the corresponding memory interval is [15M,50M ], so that 50M storage space is opened in the source server, the class transmission file A is stored in the source server, and the IP address of the source server is 123.456.7.8, so that the storage address including the file size of the class transmission file A is generated to be × -IP =123.456.7.8. Wherein, the file size of the class transmission file A is included.
And S2, performing marking operation on the storage address to obtain a marked address.
Because the file transmission of the intranet and the extranet has high requirements on security, the generated storage address needs to be marked so as to facilitate the tracking of subsequent files. In detail, the performing a tag operation on the storage address to obtain a tag address includes: and carrying out encryption operation on the generation time of the storage address and the file size value of the class transmission file to generate a mark field, and adding the mark field into the storage address to obtain the mark address.
If the storage address of the category transfer file a is set to be "x" ip =123.456.7.8, the file size of the category transfer file a is 47M, and the generation time of the corresponding storage address is 11/1/2020, then the flag field is obtained by encrypting 47M and 11/1/2020 by using methods such as symmetric encryption and MD5 algorithm encryption.
Further, after obtaining the tag field, placing the tag field at the head of the storage address, and obtaining the tag address in the form of tag field + storage address.
And S3, receiving a file transmission request input by a user, determining a domain name server according to the file transmission request, performing domain name resolution operation on the marked address by using the domain name server to obtain a domain name resolution response instruction, and sending the domain name resolution response instruction to a pre-constructed target server.
The obtained tagged address only comprises the IP address and the tagged field of the source server, so that the tagged address cannot be directly utilized to transmit the class transmission file, and the tagged address needs to be translated into a domain name through a domain name server, so that the class transmission file is transmitted from the source server to a target server. The Domain Name Server (Domain Name Server) is a Server for converting a Domain Name (Domain Name) and a corresponding IP address (IP address).
In detail, the receiving a file transmission request input by a user, and determining a domain name server according to the file transmission request includes: determining a cache area of the file transmission request according to the IP address and domain name information of the target server carried in the file transmission request; and determining the domain name server by utilizing the cache fragment area.
In a preferred embodiment of the present invention, when a user needs to transmit the class transmission file to the target server, a file transmission request is sent to the target server, where the file transmission request carries not only an IP address of the source server but also domain name information and an IP address of the target server.
The cache segment is also called a cache server, and is a server for determining which domain name server performs domain name resolution operation.
Further, in the embodiment of the present invention, a pre-constructed polling sequence is adopted, and the IP address and the domain name information of the target server are utilized to determine the cache slice area of the file transmission request, for example, the IP address and the domain name information of the target server are sent to the cache slice area, and 3 domain name servers corresponding to the cache slice area are a domain name server 1, a domain name server 2, and a domain name server 3, respectively, where the polling sequence is: the domain name server 1 → the domain name server 2 → the domain name server 3 → the domain name server 1, that is, if the domain name server 1 is busy at the present moment, the domain name server 2 is used, and so on, if the domain name server 1, the domain name server 2 and the domain name server 3 are all busy, the domain name server 1 is determined to be the domain name server when waiting for the domain name server 1 not to be busy.
After the domain name server is determined, performing domain name resolution operation by using the domain name server, in detail, performing domain name resolution operation on the labeled address by using the domain name server to obtain a domain name resolution response instruction, including: and searching a cache of the target server by using the domain name server to determine whether a domain name resolution response instruction corresponding to the file transmission request exists, if so, extracting the domain name resolution response instruction from the cache, and if not, executing domain name resolution operation on the marked address based on a mark record resolution method and the domain name server to obtain the domain name resolution response instruction.
In detail, if the cache has a domain name resolution response instruction corresponding to the file transmission request, indicating that the source server and the target server are connected before, the domain name resolution response instruction can be directly obtained, and if the cache does not have the domain name resolution response instruction corresponding to the file transmission request, the domain name resolution response instruction is generated and obtained by using the label record resolution method. The label record parsing method is also called as A record parsing method, and is a parsing method capable of creating a record without www.
And after the domain name resolution response instruction is generated, sending the domain name resolution response instruction to a pre-constructed target server, and executing S4.
And S4, when the target server responds to the domain name resolution response instruction, transmitting the class transmission file to the target server.
In this embodiment of the present invention, when the target server responds to the domain name resolution response instruction, indicating that the target server can accept the class transmission file, in detail, the transmitting the class transmission file to the target server includes: extracting the class transmission file according to the IP address of the source server; and acquiring the IP address of a target server from the file transmission request, and transmitting the class transmission file to the target server according to the IP address of the target server.
In detail, the storage address includes the IP address of the source server, and the IP address of the source server can be obtained through parsing from the storage address, so that the class transmission file is extracted from the source server according to the IP address of the source server, and further the class transmission file is transmitted to the target server, thereby completing the file transmission across servers.
The method comprises the steps of classifying a plurality of files to be transmitted according to file sizes, storing the files to be transmitted to a pre-constructed source server to generate a storage address, executing marking operation on the storage address to obtain a marked address, determining a domain name server, executing domain name resolution operation on the marked address to obtain a domain name resolution response instruction, sending the domain name resolution response instruction to a pre-constructed target server, and transmitting the class transmission files to the target server when the target server responds to the domain name resolution response instruction. Therefore, the cross-server file transmission method, the cross-server file transmission device and the computer readable storage medium can solve the problems that cross-server direct connection is not stable enough and file transmission interruption is easy to occur.
Fig. 3 is a schematic block diagram of a cross-server file transfer apparatus according to the present invention.
The cross-server file transfer device 100 of the present invention may be installed in an electronic device. According to the implemented functions, the cross-server file transmission apparatus may include a transmission file generation module 101, a tag address generation module 102, a domain name resolution module 103, and a file transmission module 104. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the transmission file generation module 101 is configured to acquire a plurality of files to be transmitted, classify the files to be transmitted according to file sizes to obtain category transmission files, store the category transmission files in a pre-constructed source server, and generate storage addresses;
the tag address generating module 102 is configured to perform a tag operation on the storage address to obtain a tag address;
the domain name resolution module 103 is configured to receive a file transmission request input by a user, determine a domain name server according to the file transmission request, perform domain name resolution operation on the tagged address by using the domain name server to obtain a domain name resolution response instruction, and send the domain name resolution response instruction to a pre-constructed target server;
the file transmission module 104 is configured to transmit the class transmission file to the target server when the target server responds to the domain name resolution response instruction.
In detail, the specific operation process of each module is as follows:
the transmission file generation module 101 is configured to acquire a plurality of files to be transmitted, classify the files to be transmitted according to file sizes to obtain category transmission files, and store the category transmission files in a pre-constructed source server to generate a storage address.
In a preferred embodiment of the present invention, the file to be transmitted is a file transmitted from an external network to an internal network or from the internal network to the external network based on the purpose and the requirement of a user. The file to be transmitted may include text data, image data, a computer executable program, and the like.
When file transmission is executed between an internal network and an external network, considering the safety of the internal network and the condition that network congestion is easy to occur between the internal network and the external network, in the embodiment of the invention, the files to be transmitted need to be classified according to the size of the files.
In detail, the classifying the plurality of files to be transmitted according to the file size to obtain a category transmission file includes: calculating the memory occupied by each file to be transmitted to obtain a memory set; performing descending or ascending arrangement on the memory sets to obtain memory arrangement sets; according to a preset memory interval, performing interval division on the memory arrangement set to obtain a memory interval set; and classifying the files to be transmitted by using the memory interval set to obtain the class transmission files.
In the embodiment of the present invention, the preset memory intervals are [0,0.5M ], [0.5m,1m ], [1m,5m ], [5m,15m ], [15m,50m ], and the like, and therefore, the class transmission files of different memory intervals are obtained by performing interval division according to the memory corresponding to each file to be transmitted.
After obtaining the class transmission file, further storing the class transmission file, in detail, storing the class transmission file to a pre-constructed source server, and generating a storage address, including: opening a corresponding storage space from the source server according to the memory interval of the class transmission file; and storing the class transmission file into the storage space, and generating a storage address according to the file size of the class transmission file and the IP address of the source server when the storage is successful.
If the file size of one class transmission file A is 47M, the corresponding memory interval is [15M,50M ], so that 50M of storage space is opened in the source server, the class transmission file A is stored in the source server, the IP address of the source server is 123.456.7.8, and the storage address comprising the file size of the class transmission file A is generated to be 5363 zxft-IP =123.456.7.8. Wherein, the file size of the class transmission file A is included.
The tag address generating module 102 is configured to perform a tag operation on the storage address to obtain a tag address.
Because the file transmission of the intranet and the extranet has high requirements on security, the generated storage address needs to be marked so as to facilitate the tracking of subsequent files. In detail, the performing a tag operation on the storage address to obtain a tag address includes: and carrying out encryption operation on the generation time of the storage address and the file size value of the class transmission file to generate a mark field, and adding the mark field into the storage address to obtain the mark address.
If the storage address of the category transmission file a is set to be 47M, and the generation time of the corresponding storage address is 2020, 11, month and 1 days, the storage address of the category transmission file a is set to be 123.456.7.8, then the storage address is encrypted by using methods such as symmetric encryption and MD5 algorithm encryption, so as to obtain a mark field after 47M and 2020, 11, month and 1 days.
Further, after obtaining the tag field, placing the tag field at the head of the storage address, and obtaining the tag address in the form of tag field + storage address.
The domain name resolution module 103 is configured to receive a file transmission request input by a user, determine a domain name server according to the file transmission request, perform domain name resolution operation on the tagged address by using the domain name server to obtain a domain name resolution response instruction, and send the domain name resolution response instruction to a pre-constructed target server.
The obtained tagged address only comprises the IP address and the tagged field of the source server, so that the tagged address cannot be directly utilized to transmit the class transmission file, and the tagged address needs to be translated into a domain name through a domain name server, so that the class transmission file is transmitted from the source server to a target server. The Domain Name Server (Domain Name Server) is a Server for converting a Domain Name (Domain Name) and a corresponding IP address (IP address).
In detail, the receiving a file transmission request input by a user, and determining a domain name server according to the file transmission request includes: determining a cache area of the file transmission request according to the IP address and the domain name information of the target server carried in the file transmission request; and determining the domain name server by utilizing the cache fragment area.
In a preferred embodiment of the present invention, when a user needs to transmit the class transmission file to the target server, a file transmission request is sent to the target server, where the file transmission request carries not only an IP address of the source server but also domain name information and an IP address of the target server.
The cache segment is also called a cache server, and is a server for determining which domain name server performs domain name resolution operation.
Further, in the embodiment of the present invention, a pre-constructed polling sequence is adopted, and the IP address and the domain name information of the target server are utilized to determine the cache slice area of the file transmission request, for example, the IP address and the domain name information of the target server are sent to the cache slice area, and 3 domain name servers corresponding to the cache slice area are a domain name server 1, a domain name server 2, and a domain name server 3, respectively, where the polling sequence is: the domain name server 1 → the domain name server 2 → the domain name server 3 → the domain name server 1, that is, if the domain name server 1 is busy at the present moment, the domain name server 2 is used, and so on, if the domain name server 1, the domain name server 2 and the domain name server 3 are all busy, the domain name server 1 is determined to be the domain name server when waiting for the domain name server 1 not to be busy.
After the domain name server is determined, performing domain name resolution operation by using the domain name server, in detail, performing domain name resolution operation on the labeled address by using the domain name server to obtain a domain name resolution response instruction, including: and searching a cache of the target server by using the domain name server to determine whether a domain name resolution response instruction corresponding to the file transmission request exists, if so, extracting the domain name resolution response instruction from the cache, and if not, executing domain name resolution operation on the marked address based on a mark record resolution method and the domain name server to obtain the domain name resolution response instruction.
In detail, if the cache has a domain name resolution response instruction corresponding to the file transmission request, indicating that the source server and the target server are connected before, the domain name resolution response instruction can be directly obtained, and if the cache does not have the domain name resolution response instruction corresponding to the file transmission request, the domain name resolution response instruction is generated and obtained by using the label record resolution method. The label record parsing method is also called as A record parsing method, and is a parsing method capable of creating a record without www.
The file transmission module 104 is configured to transmit the class transmission file to the target server when the target server responds to the domain name resolution response instruction.
In this embodiment of the present invention, when the target server responds to the domain name resolution response instruction, indicating that the target server can accept the class transmission file, in detail, the transmitting the class transmission file to the target server includes: extracting the class transmission file according to the IP address of the source server; and acquiring the IP address of a target server from the file transmission request, and transmitting the class transmission file to the target server according to the IP address of the target server.
In detail, the storage address includes the IP address of the source server, and the IP address of the source server can be obtained through parsing from the storage address, so that the class transmission file is extracted from the source server according to the IP address of the source server, and further the class transmission file is transmitted to the target server, thereby completing the file transmission across servers.
Fig. 4 is a schematic structural diagram of an electronic device implementing the cross-server file transfer method according to the present invention.
The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program, such as a cross-server file transfer program 12, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of the file transfer program 12 across servers, but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules stored in the memory 11 (for example, executing a file transfer program across servers, etc.), and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 4 only shows an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 4 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The cross-server file transfer program 12 stored in the memory 11 of the electronic device 1 is a combination of a plurality of instructions, which when executed in the processor 10, can implement:
the method comprises the steps of obtaining a plurality of files to be transmitted, classifying the files to be transmitted according to the size of the files to obtain class transmission files, storing the class transmission files to a pre-constructed source server and generating storage addresses;
executing marking operation on the storage address to obtain a marked address;
receiving a file transmission request input by a user, determining a domain name server according to the file transmission request, performing domain name resolution operation on the marked address by using the domain name server to obtain a domain name resolution response instruction, and sending the domain name resolution response instruction to a pre-constructed target server;
and when the target server responds to the domain name resolution response instruction, transmitting the class transmission file to the target server.
Further, the integrated modules/units of the electronic device 1 may be stored in a computer readable storage medium if they are implemented in the form of software functional units and sold or used as independent products. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM).
Further, the computer usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any accompanying claims should not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (9)

1. A method for file transfer across servers, the method comprising:
the method comprises the steps of obtaining a plurality of files to be transmitted, classifying the files to be transmitted according to the size of the files to obtain class transmission files, storing the class transmission files to a pre-constructed source server and generating storage addresses;
executing marking operation on the storage address to obtain a marked address;
receiving a file transmission request input by a user, determining a domain name server according to the file transmission request, performing domain name resolution operation on the marked address by using the domain name server to obtain a domain name resolution response instruction, sending the domain name resolution response instruction to a pre-constructed target server, determining the domain name server according to the file transmission request, wherein the step of determining a cache fragment area of the file transmission request according to an IP address of the target server, and the step of determining the domain name server by using the cache fragment area according to a pre-constructed polling sequence, wherein the file transmission request carries the IP address of the source server, domain name information and the IP address of the target server;
and when the target server responds to the domain name resolution response instruction, transmitting the class transmission file to the target server.
2. The method for file transfer across servers according to claim 1, wherein said performing a tag operation on said storage address to obtain a tag address comprises:
carrying out encryption operation on the generation time of the storage address and the file size value of the class transmission file to generate a mark field;
and adding the mark field in the storage address to obtain the mark address.
3. The method for file transfer across servers according to claim 1, wherein the performing, by using the domain name server, a domain name resolution operation on the tagged address to obtain a domain name resolution response instruction includes:
searching whether a domain name resolution response instruction corresponding to the file transmission request exists in a cache of the target server;
if the cache has a domain name resolution response instruction corresponding to the file transmission request, extracting the domain name resolution response instruction from the cache;
and if the cache does not have a domain name resolution response instruction corresponding to the file transmission request, performing domain name resolution operation on the marked address based on a mark record resolution method and the domain name server to obtain the domain name resolution response instruction.
4. The method for file transmission across servers according to claim 1, wherein the classifying the file to be transmitted according to the size of the file to obtain a category transmission file comprises:
calculating the memory occupied by each file to be transmitted to obtain a memory set;
performing descending or ascending arrangement on the memory sets to obtain memory arrangement sets;
according to a preset memory interval, performing interval division on the memory arrangement set to obtain a memory interval set;
and classifying the files to be transmitted by using the memory interval set to obtain the class transmission files.
5. The cross-server file transfer method of claim 1, wherein storing the class transfer file to a pre-built source server and generating a storage address comprises:
opening a corresponding storage space from the source server according to the memory interval of the class transmission file;
and storing the class transmission file into the storage space, and generating the storage address according to the file size value of the class transmission file and the IP address of the source server when the storage is successful.
6. The cross-server file transfer method according to any one of claims 1 to 5, wherein the transferring the class-transfer file to the target server includes:
extracting the class transmission file according to the IP address of the source server;
and acquiring the IP address of a target server from the file transmission request, and transmitting the class transmission file to the target server according to the IP address of the target server.
7. An apparatus for file transfer across servers, the apparatus comprising:
the transmission file generation module is used for acquiring a plurality of files to be transmitted, classifying the files to be transmitted according to the sizes of the files to obtain class transmission files, storing the class transmission files to a pre-constructed source server and generating storage addresses;
the marking address generating module is used for executing marking operation on the storage address to obtain a marking address;
the domain name resolution module is used for receiving a file transmission request input by a user, determining a domain name server according to the file transmission request, executing domain name resolution operation on the marked address by using the domain name server to obtain a domain name resolution response instruction, sending the domain name resolution response instruction to a pre-constructed target server, receiving the file transmission request input by the user, determining the domain name server according to the file transmission request, and comprises the steps of determining a cache slice area of the file transmission request according to the IP address of the target server, determining the domain name server according to a pre-constructed polling sequence by using the cache slice area, wherein the file transmission request carries the IP address of the source server, the domain name information and the IP address of the target server;
and the file transmission module is used for transmitting the class transmission file to the target server when the target server responds to the domain name resolution response instruction.
8. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the cross-server file transfer method of any of claims 1-6.
9. A computer-readable storage medium comprising a storage data area and a storage program area, wherein the storage data area stores created data, and the storage program area stores a computer program; wherein the computer program when executed by a processor implements a cross-server file transfer method as claimed in any one of claims 1 to 6.
CN202011528896.2A 2020-12-22 2020-12-22 Cross-server file transmission method and device, electronic equipment and storage medium Active CN112653760B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011528896.2A CN112653760B (en) 2020-12-22 2020-12-22 Cross-server file transmission method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011528896.2A CN112653760B (en) 2020-12-22 2020-12-22 Cross-server file transmission method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112653760A CN112653760A (en) 2021-04-13
CN112653760B true CN112653760B (en) 2023-03-24

Family

ID=75359135

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011528896.2A Active CN112653760B (en) 2020-12-22 2020-12-22 Cross-server file transmission method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112653760B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113282854A (en) * 2021-06-01 2021-08-20 平安国际智慧城市科技股份有限公司 Data request response method and device, electronic equipment and storage medium
CN113704109B (en) * 2021-08-30 2023-10-20 康键信息技术(深圳)有限公司 Front-end and back-end data interaction method and device, electronic equipment and storage medium
CN114006885A (en) * 2021-11-17 2022-02-01 印象(山东)大数据有限公司 Data acquisition method and device based on intelligent equipment and electronic equipment
CN114124835A (en) * 2021-11-22 2022-03-01 招商局金融科技有限公司 Interface-based data transmission method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102484652A (en) * 2009-08-28 2012-05-30 苹果公司 Chunked downloads over a content delivery network
CN109842652A (en) * 2017-11-27 2019-06-04 中兴通讯股份有限公司 A kind of method for uploading of file, terminal, Cloud Server and computer storage medium
CN110099104A (en) * 2019-04-12 2019-08-06 平安科技(深圳)有限公司 Document transmission method, system and storage medium
CN111475704A (en) * 2020-03-17 2020-07-31 平安科技(深圳)有限公司 Intelligent domain name resolution method and device and computer readable storage medium
CN111600957A (en) * 2020-05-20 2020-08-28 中国工商银行股份有限公司 File transmission method, device and system and electronic equipment
CN111666514A (en) * 2020-04-28 2020-09-15 平安科技(深圳)有限公司 Data processing method and device for realizing cross-domain request at webpage end and related equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101419436B1 (en) * 2012-12-14 2014-08-13 (주)씨디네트웍스 Method and apparatus for Domain name service
US9503508B2 (en) * 2014-09-29 2016-11-22 International Business Machines Corporation Declarative and adaptive content management

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102484652A (en) * 2009-08-28 2012-05-30 苹果公司 Chunked downloads over a content delivery network
CN109842652A (en) * 2017-11-27 2019-06-04 中兴通讯股份有限公司 A kind of method for uploading of file, terminal, Cloud Server and computer storage medium
CN110099104A (en) * 2019-04-12 2019-08-06 平安科技(深圳)有限公司 Document transmission method, system and storage medium
CN111475704A (en) * 2020-03-17 2020-07-31 平安科技(深圳)有限公司 Intelligent domain name resolution method and device and computer readable storage medium
CN111666514A (en) * 2020-04-28 2020-09-15 平安科技(深圳)有限公司 Data processing method and device for realizing cross-domain request at webpage end and related equipment
CN111600957A (en) * 2020-05-20 2020-08-28 中国工商银行股份有限公司 File transmission method, device and system and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
扩展Oracle Spatial实现跨服务器的空间数据管理;蒋新等;《计算机应用研究》;20041128(第11期);全文 *

Also Published As

Publication number Publication date
CN112653760A (en) 2021-04-13

Similar Documents

Publication Publication Date Title
CN112653760B (en) Cross-server file transmission method and device, electronic equipment and storage medium
CN112347042A (en) File uploading method and device, electronic equipment and storage medium
CN111625252A (en) Cluster upgrading maintenance method and device, electronic equipment and storage medium
CN113890712A (en) Data transmission method and device, electronic equipment and readable storage medium
CN113806434A (en) Big data processing method, device, equipment and medium
CN112702228A (en) Service current limiting response method and device, electronic equipment and readable storage medium
CN112256783A (en) Data export method and device, electronic equipment and storage medium
CN115081016A (en) Log desensitization method and device, electronic equipment and storage medium
CN114491646A (en) Data desensitization method and device, electronic equipment and storage medium
CN111932413B (en) Case element extraction method, case element extraction device, case element extraction equipment and case element extraction medium
CN113051224A (en) File transmission method and device, electronic equipment and computer readable storage medium
CN115002062B (en) Message processing method, device, equipment and readable storage medium
CN114201466B (en) Anti-cache breakdown method, device, equipment and readable storage medium
CN115145870A (en) Method and device for positioning reason of failed task, electronic equipment and storage medium
CN114691782A (en) Database table increment synchronization method and device and storage medium
CN114547011A (en) Data extraction method and device, electronic equipment and storage medium
CN114611046A (en) Data loading method, device, equipment and medium
CN114268559A (en) Directional network detection method, device, equipment and medium based on TF-IDF algorithm
CN114185588A (en) Incremental package generation method, device, equipment and storage medium
CN115002100B (en) File transmission method and device, electronic equipment and storage medium
CN113347451B (en) Video uploading method and device, electronic equipment and computer readable storage medium
CN113885874A (en) Java class file conflict management method and device, electronic equipment and medium
CN114416575A (en) Method, device and equipment for generating Mock data and storage medium
CN114942855A (en) Interface calling method and device, electronic equipment and storage medium
CN115174555A (en) File transmission method and 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