CN116775538A - File transmission method, device, equipment, system, medium and product - Google Patents

File transmission method, device, equipment, system, medium and product Download PDF

Info

Publication number
CN116775538A
CN116775538A CN202310671671.XA CN202310671671A CN116775538A CN 116775538 A CN116775538 A CN 116775538A CN 202310671671 A CN202310671671 A CN 202310671671A CN 116775538 A CN116775538 A CN 116775538A
Authority
CN
China
Prior art keywords
transmission
client
file
transmission instruction
instruction
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
CN202310671671.XA
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.)
Shanghai Youkun Information Technology Co ltd
Original Assignee
Shanghai Youkun Information Technology 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 Shanghai Youkun Information Technology Co ltd filed Critical Shanghai Youkun Information Technology Co ltd
Priority to CN202310671671.XA priority Critical patent/CN116775538A/en
Publication of CN116775538A publication Critical patent/CN116775538A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The application provides a method, a device, equipment, a system, a medium and a product for file transmission. The method is applied to the first client and specifically comprises the following steps: receiving a file transmission request sent by a second client, wherein the file transmission request comprises a file to be transmitted and a transmission protocol; searching a transmission instruction corresponding to the transmission protocol in the object pool, wherein the transmission instruction is generated based on the transmission protocol, and the transmission instruction corresponds to the transmission protocol one by one; and under the condition that the transmission instruction is found in the object pool, the transmission instruction is sent to the second client side, so that the second client side calls the target transmission interface according to the transmission instruction, and the file to be transmitted is transmitted based on the target transmission interface. According to the embodiment of the application, when the file transmission request is received, the target transmission interface can be called to transmit the file to be transmitted, so that the file transmission efficiency is improved.

Description

File transmission method, device, equipment, system, medium and product
Technical Field
The application belongs to the technical field of computers, and particularly relates to a method, a device, equipment, a system, a medium and a product for file transmission.
Background
With the rapid development of internet technology, there may be a need for transmitting files between clients of different enterprises, and common files are all transmitted through transmission protocols, but the transmission protocols required by different files are usually different, and different transmission protocols are usually developed by different software, so that software development kits of different protocols are different. Therefore, for a technician maintaining the client, the application program interfaces corresponding to different transmission protocols need to be developed by using different software development kits to realize file transmission facing file transmission of different protocols.
When transmitting a file, a client serving as a receiver needs to be connected according to the creation of a new transmission interface, and the transmission interface is disconnected and destroyed after the transmission is completed, so that the transmission efficiency is low.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment, a system, a medium and a product for file transmission, which can call a target transmission interface to transmit a file to be transmitted when a file transmission request is received, and improve the efficiency of file transmission.
In a first aspect, an embodiment of the present application provides a method for file transfer, including:
receiving a file transmission request sent by a second client, wherein the file transmission request comprises a file to be transmitted and a transmission protocol;
searching a transmission instruction corresponding to the transmission protocol in the object pool, wherein the transmission instruction is generated based on the transmission protocol, and the transmission instruction corresponds to the transmission protocol one by one;
and under the condition that the transmission instruction is found in the object pool, the transmission instruction is sent to the second client side, so that the second client side calls the target transmission interface according to the transmission instruction, and the file to be transmitted is transmitted based on the target transmission interface.
In some possible implementations, before sending the transmission instruction to the second client, the method further includes:
creating a corresponding transmission instruction according to a transmission protocol;
and storing the transmission instruction into an object pool.
In some possible implementations, after sending the transmission instruction to the second client, the method further includes:
after the second client transmits the file to be transmitted, receiving a transmission instruction sent by the second client;
and storing the transmission instruction into an object pool.
In some possible implementations, after searching the object pool for a transmission instruction corresponding to the transmission protocol, the method further includes:
under the condition that the transmission instruction is not found in the object pool, creating a corresponding transmission instruction according to a transmission protocol;
and sending the transmission instruction to the second client so that the second client calls the target transmission interface according to the transmission instruction to transmit the file to be transmitted based on the target transmission interface.
In a second aspect, an embodiment of the present application provides a device for file transfer, including:
the receiving module is used for receiving a file transmission request sent by the second client, wherein the file transmission request comprises a file to be transmitted and a transmission protocol;
the searching module is used for searching a transmission instruction corresponding to the transmission protocol in the object pool, wherein the transmission instruction is generated based on the transmission protocol, and the transmission instruction corresponds to the transmission protocol one by one;
and the sending module is used for sending the transmission instruction to the second client under the condition that the transmission instruction is found in the object pool, so that the second client calls the target transmission interface according to the transmission instruction, and the file to be transmitted is transmitted based on the target transmission interface.
In some possible implementations, the apparatus further includes:
the creation module is used for creating a corresponding transmission instruction according to the transmission protocol.
And the storage module is used for storing the transmission instruction into the object pool.
In some possible implementations, the receiving module may be further configured to receive a transmission instruction sent by the second client after the second client finishes transmitting the file to be transmitted;
the storage module is also used for storing the transmission instruction into the object pool.
In some possible implementations, the creating module may be further configured to create a corresponding transmission instruction according to the transmission protocol in a case where no transmission instruction is found in the object pool.
The sending module is further configured to send a transmission instruction to the second client, so that the second client invokes the target transmission interface according to the transmission instruction, so as to transmit the file to be transmitted based on the target transmission interface.
In a third aspect, an embodiment of the present application provides a system for file transfer, where the system includes a first client and a second client;
the second client is used for sending the transmission request to the first client, wherein the transmission request comprises a file to be transmitted and a transmission protocol;
the first client is used for searching a corresponding transmission instruction based on a transmission protocol and sending the transmission instruction to the second client;
and the second client is used for calling the target transmission interface based on the transmission instruction and transmitting the file to be transmitted.
In a fourth aspect, an embodiment of the present application provides an electronic device, including:
a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, is configured to perform the method of file transfer of the first aspect described above.
In a fifth aspect, an embodiment of the present application provides a computer storage medium having stored thereon computer program instructions which, when executed by a processor, implement a method of file transfer according to the first aspect described above.
In a sixth aspect, an embodiment of the present application provides a computer program product comprising a computer program which, when processed by a processor, implements the method of file transfer of the first aspect described above.
According to the method, the device, the equipment, the system, the medium and the product for file transmission applied to the first client, after the file transmission request sent by the second client is received, the corresponding transmission instruction is determined according to the transmission protocol in the file transmission request, and the transmission instruction is sent to the second client to be used for the second client to call the target transmission interface according to the speaking instruction to transmit the file, so that the first client is prevented from creating a new transmission interface according to different transmission protocols to transmit the file, and the efficiency of file transmission is improved.
Drawings
In order to more clearly illustrate the technical solution of the embodiments of the present application, the drawings that are needed to be used in the embodiments of the present application will be briefly described, and it is possible for a person skilled in the art to obtain other drawings according to these drawings without inventive effort.
Fig. 1 is a schematic structural diagram of a system for file transfer according to an embodiment of the present application.
Fig. 2 is a flowchart of a system for file transfer according to an embodiment of the present application.
Fig. 3 is a flowchart of a method for file transfer 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 hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application will be described in detail below, and in order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail below with reference to the accompanying drawings and the detailed embodiments. It should be understood that the particular embodiments described herein are meant to be illustrative of the application only and not limiting. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the application by showing examples of the application.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, 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 … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
With the rapid development of internet information technology, enterprises are in the wave of digital transformation, in this context, enterprises often want to seek cooperation to realize win-win, so different enterprises often perform data exchange, for example, data resource sharing through file transmission, in the face of a large data volume interaction scenario. Currently, the most common way of file transfer is through an application program interface (Application Programming Interface, API). Specifically, an API interface service waiting request is started through a data receiving end, a data sending end calls the API interface service to initiate the request, and the API interface service sends data to a data receiving end.
Since different files have different transmission protocols and different software development kits of different transmission protocols, the above-mentioned data receiving end needs to develop a large amount of different kinds of application program interfaces, so that development cost is high.
In addition, at present, when the file is transmitted, a new transmission interface needs to be created each time and then started, and the transmission interface is destroyed after the file is transmitted, so that the transmission efficiency is low and the system resources are wasted.
In order to solve the above problems, embodiments of the present application provide a method, an apparatus, a device, a system, a medium, and a product for file transmission, where a transmission interface is set in a first client, when the first client receives a file transmission request of a second client, a corresponding transmission instruction is determined based on a transmission protocol in the file transmission request and sent to the second client, so that the second client invokes a target transmission interface to transmit a file to be transmitted based on the transmission instruction, which realizes a complicated step of file transmission without creating a new interface, and improves file transmission efficiency.
The method for file transfer provided by the embodiment of the application is specifically described below.
In some examples, a user may configure the first client based on Java, abstract the first client by using Java, and set a class corresponding to a different transport protocol, for example, may create a Boot class Spring Boot, where different Boot classes may provide different API interfaces.
In some examples, after creating the corresponding boot class according to different transport protocols, the different boot classes may be stored in the object pool for unified management.
After the configuration is realized, the first client can use the API interface provided by the guide class as a transmission interface of the file to be transmitted, so that the configuration of the transmission interface at the first client is realized.
As shown in fig. 1, an embodiment of the present application provides a system for file transfer, including: a first client 101 and a second client 102.
The second client is used for sending the transmission request to the first client, wherein the transmission request comprises a file to be transmitted and a transmission protocol;
the first client is used for searching a corresponding transmission instruction based on a transmission protocol and sending the transmission instruction to the second client;
and the second client is used for calling the target transmission interface based on the transmission instruction and transmitting the file to be transmitted.
The method for integrating the real-time execution system provided by the embodiment of the application is described in detail below through specific embodiments and application scenes thereof with reference to the accompanying drawings.
As shown in fig. 2, an embodiment of the present application provides a method for file transfer, where an execution body of the method is a system for file transfer shown in fig. 1, and the method includes:
s210: the first client receives a file transmission request sent by the second client, wherein the file transmission request comprises a file to be transmitted and a transmission protocol.
S220: the first client searches the object pool for a guide class corresponding to the transmission protocol.
S230: and sending the guide class to the second client side under the condition that the guide class is found in the object pool.
S240: the second client uses the function provided by the guide class as a transmission interface to transmit the file to be transmitted.
By configuring the first client, the second client can directly use Java API of the guide class to transmit the file to be transmitted, the defect that a new interface needs to be created when the file is transmitted each time is overcome, the transmission efficiency is improved, and when the transmission interface is set, the first client is only required to be simply configured, development of the transmission interface based on a development kit corresponding to a transmission protocol is not required, and the development cost is reduced.
As shown in fig. 3, an embodiment of the present application provides a method for file transfer, which is applied to the first client 101 shown in fig. 1, and includes:
s310: and receiving a file transmission request sent by the second client, wherein the file transmission request comprises a file to be transmitted and a transmission protocol.
The file transfer request is a request to transfer a file generated based on the first client, and the file to be transferred and a transfer protocol, which may be a file transfer protocol (File Transfer Protocol, FTP) or a secure file transfer protocol (Secure File Transfer Protocol, SFTP), are often included in the file transfer request. Here, the first client and the second client may be clients or servers, respectively, used by an enterprise to store files.
In some examples, the format of the file to be transmitted may be various, such as a binary file or a text file, which is not limited herein.
S320: and searching a transmission instruction corresponding to the transmission protocol in the object pool, wherein the transmission instruction is generated based on the transmission protocol, and the transmission instruction corresponds to the transmission protocol one by one.
After receiving the transmission protocol, the first client can search the object pool for a transmission instruction corresponding to the transmission protocol. Here, the object pool may store a specified number of objects, so in this embodiment, the object pool may store a specified number of transfer instructions, where the transfer instructions are generated based on a transfer protocol, the transfer instructions may be used to invoke a target transfer interface, and different transfer protocols all correspond to different transfer instructions. For example, FTP corresponds to a first transfer instruction, SFTP corresponds to a second transfer instruction, and different transfer instructions may invoke different transfer interfaces, where there is also a one-to-one correspondence between transfer instructions and transfer interfaces.
In some examples, a table of correspondence between the transmission protocol and the transmission instruction may be preset, where the correspondence between the transmission protocol and the transmission instruction is stored in the table of correspondence, so when the first client receives the transmission protocol, the first client may find the transmission instruction corresponding to the transmission protocol by searching the table of correspondence.
S330: and under the condition that the transmission instruction is found in the object pool, the transmission instruction is sent to the second client side, so that the second client side calls the target transmission interface according to the transmission instruction, and the file to be transmitted is transmitted based on the transmission interface.
Here, if the transmission instruction corresponding to the transmission protocol found in the object pool by the first client side is sent to the second client side, the second client side may call the target transmission interface corresponding to the transmission instruction based on the transmission instruction, so that the first client side transmits the file to be transmitted based on the transmission interface.
Taking the above transmission protocol as an example of FTP, after the first client finds the corresponding first transmission instruction in the object pool, the first client sends the first transmission instruction to the second client, so that the second client uses the first transmission instruction to call the target transmission interface corresponding to the first transmission instruction to transmit the file to be transmitted. Similarly, when the transmission protocol is SFTP, if the second client receives the second transmission instruction sent by the first client, the second client invokes the target transmission interface corresponding to the second transmission instruction to transmit the file to be transmitted, which is not described herein.
In this embodiment, by setting the transmission instructions respectively corresponding to different transmission protocols in the first client, when the first client receives a transmission request including a file to be transmitted and a transmission protocol, the first client searches for the transmission instruction corresponding to the transmission protocol in the object pool and sends the transmission instruction to the second client, so that the second client calls the target transmission interface to transmit the file to be transmitted based on the transmission instruction.
In some embodiments, step S330, before sending the transmission instruction to the second client, the method further comprises:
creating a corresponding transmission instruction according to a transmission protocol; and storing the transmission instruction into an object pool.
Since the first client searches the corresponding transmission instruction in the object pool based on the transmission protocol, before that, the first client needs to create the corresponding transmission instruction according to the transmission protocol and store the transmission instruction in the object pool. Here, a corresponding relation table of the transmission protocol and the transmission instruction can be created at the same time, and the corresponding relation table is also stored in the object pool, so that the efficiency of searching the transmission instruction is improved.
By creating the transmission instructions corresponding to the transmission protocol and storing the transmission instructions into the object pool, different transmission instructions can be managed in a unified way, and the system performance is improved.
In some embodiments, after the transmission instruction is sent to the second client in S330, the method further includes:
after the second client transmits the file to be transmitted, receiving a transmission instruction sent by the second client; and storing the transmission instruction into an object pool.
After the second client finishes transmitting the file to be transmitted, the transmission instruction can be returned and sent to the first client, so that the first client stores the transmission instruction into the object pool.
In this embodiment, by receiving the transmission instruction sent after the second client finishes transmitting the file to be transmitted and storing the transmission instruction in the object pool, the first client can continuously find the transmission instruction from the object pool and send the transmission instruction to the third client when receiving the transmission request including the same transmission protocol sent by the third client next time, so that the third client continuously calls the target transmission interface to transmit the file to be transmitted based on the transmission instruction, thereby realizing multiple multiplexing of the same transmission instruction and the unified target transmission interface and saving the resources of the system.
In some embodiments, after searching the object pool for the transmission instruction corresponding to the transmission protocol, the method further includes:
under the condition that the transmission instruction is not found in the object pool, creating a corresponding transmission instruction according to a transmission protocol; and sending the transmission instruction to the second client so that the second client calls the transmission interface according to the transmission instruction to transmit the file to be transmitted based on the transmission interface.
If the first client side does not find the transmission instruction in the object pool, the corresponding transmission instruction can be created according to the transmission protocol, and the transmission instruction is sent to the second client side, so that the second client side calls the transmission interface to transmit the file to be transmitted based on the transmission instruction. For example, taking the above-mentioned object pool including the first transmission instruction corresponding to the FTP and the second transmission instruction corresponding to the SFTP as an example, if the transmission protocol included in the transmission request sent by the second client is a simple file transmission protocol (Trivial File Transfer Protocol, TFTP), the first client does not find the transmission instruction corresponding to the TFTP in the object pool, and therefore creates a third transmission instruction based on the TFTP and sends the third transmission instruction to the second client.
In some embodiments, after the second client finishes transmitting the file to be transmitted based on the third transmission instruction, the third transmission instruction is returned to the first client, so that the first client stores the third transmission instruction in the object pool.
In this embodiment, when no transmission instruction is queried, by creating a corresponding transmission instruction and sending the transmission instruction, file transmission can still be implemented when the first client receives a new type of transmission protocol.
As an implementation manner, when the first client side of the embodiment of the application receives the transmission request sent by the second client side, the corresponding transmission instruction is searched according to the transmission protocol, and the transmission instruction is sent to the second client side, so that the second client side can call the target transmission interface based on the transmission instruction to transmit the file to be transmitted, and the file to be transmitted is transmitted without creating a new transmission interface, thereby improving the transmission efficiency of the file.
As shown in fig. 4, an embodiment of the present application provides a device for file transmission, including:
the receiving module 401 is configured to receive a file transfer request sent by the second client, where the file transfer request includes a file to be transferred and a transfer protocol.
The searching module 402 is configured to search the object pool for a transmission instruction corresponding to the transmission protocol, where the transmission instruction is generated based on the transmission protocol, and the transmission instruction corresponds to the transmission protocol one by one.
And the sending module 403 is configured to send the transmission instruction to the second client, so that the second client invokes the target transmission interface according to the transmission instruction, so as to transmit the file to be transmitted based on the target transmission interface, when the transmission instruction is found in the object pool.
In some embodiments, the apparatus further comprises:
the creation module is used for creating a corresponding transmission instruction according to the transmission protocol.
And the storage module is used for storing the transmission instruction into the object pool.
In some embodiments, the receiving module may be further configured to receive a transmission instruction sent by the second client after the second client finishes transmitting the file to be transmitted;
the storage module is also used for storing the transmission instruction into the object pool.
In some embodiments, the creating module may be further configured to create a corresponding transmission instruction according to the transmission protocol in a case where no transmission instruction is found in the object pool.
The sending module is further configured to send a transmission instruction to the second client, so that the second client invokes the target transmission interface according to the transmission instruction, so as to transmit the file to be transmitted based on the target transmission interface.
The device of the foregoing embodiment is used to implement the corresponding method for file transmission in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which is not described herein.
Fig. 5 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the application.
The electronic device 500 may include a processor 501 and a memory 502 storing computer program instructions.
In particular, the processor 401 described above may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured as one or more integrated circuits implementing embodiments of the present application.
Memory 502 may include mass storage for data or instructions. By way of example, and not limitation, memory 502 may comprise a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. Memory 502 may include removable or non-removable (or fixed) media, where appropriate. Memory 502 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 502 is a non-volatile solid state memory.
In a particular embodiment, the memory 502 includes Read Only Memory (ROM). The ROM may be mask programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these, where appropriate.
The memory may include Read Only Memory (ROM), random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices. Thus, in general, the memory comprises one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors) it is operable to perform the operations described with reference to the method according to the first aspect of the application.
The processor 501 implements the method of any one of the above embodiments by reading and executing the computer program instructions stored in the memory 502.
In one example, the electronic device may also include a communication interface 503 and a bus 504. In fig. 5, a processor 501, a memory 502, and a communication interface 503 are connected to each other via a bus 504 and perform communication with each other.
The communication interface 503 is mainly used to implement communication between each module, apparatus, unit and/or device in the embodiments of the present application.
Bus 504 includes hardware, software, or both, that couple the components of the online data flow billing device to each other. By way of example, and not limitation, the buses may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a micro channel architecture (MCa) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus, or a combination of two or more of the above. Bus 504 may include one or more buses, where appropriate. Although embodiments of the application have been described and illustrated with respect to a particular bus, the application contemplates any suitable bus or interconnect.
The electronic device of the foregoing embodiment is configured to implement the corresponding method for file transfer in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which is not described herein.
In addition, in combination with the method for file transfer in the above embodiment, the embodiment of the present application may be implemented by providing a computer storage medium. The computer storage medium has stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement a method of file transfer in any of the above embodiments.
In addition, in conjunction with the method for file transfer in the foregoing embodiments, embodiments of the present application may be implemented by providing a computer program product. The computer program product instructions, when executed by a processor of an electronic device, implement a method of file transfer in any of the above embodiments.
Those of ordinary skill in the art will appreciate that: the discussion of any of the embodiments above is merely exemplary and is not intended to suggest that the scope of the application (including the claims) is limited to these examples; the technical features of the above embodiments or in the different embodiments may also be combined within the idea of the application, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the application as described above, which are not provided in detail for the sake of brevity.
The functional blocks shown in the above-described structural block diagrams may be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine readable medium or transmitted over transmission media or communication links by a data signal carried in a carrier wave. A "machine-readable medium" may include any medium that can store or transfer information. Examples of machine-readable media include electronic circuitry, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio Frequency (RF) links, and the like. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should also be noted that the exemplary embodiments mentioned in this disclosure describe some methods or apparatuses based on a series of steps or apparatuses. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, or may be performed in a different order from the order in the embodiments, or several steps may be performed simultaneously.
Aspects of the present application are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (means) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of 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, 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, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to being, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware which performs the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the foregoing, only the specific embodiments of the present application are described, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the apparatus, modules and units described above may refer to the corresponding processes in the foregoing method embodiments, which are not repeated herein. It should be understood that the scope of the present application is not limited thereto, and any equivalent modifications or substitutions can be easily made by those skilled in the art within the technical scope of the present application, and they should be included in the scope of the present application.

Claims (10)

1. A method for file transfer, applied to a first client, the method comprising:
receiving a file transmission request sent by a second client, wherein the file transmission request comprises a file to be transmitted and a transmission protocol;
searching a transmission instruction corresponding to the transmission protocol in an object pool, wherein the transmission instruction is generated based on the transmission protocol, and the transmission instruction corresponds to the transmission protocol one by one;
and under the condition that the transmission instruction is found in the object pool, sending the transmission instruction to the second client side, so that the second client side calls a target transmission interface according to the transmission instruction, and the file to be transmitted is transmitted based on the target transmission interface.
2. The method of file transfer according to claim 1, wherein before sending the transfer instruction to the second client, the method further comprises:
creating a corresponding transmission instruction according to the transmission protocol;
and storing the transmission instruction into the object pool.
3. The method of file transfer according to claim 1, wherein after said sending said transfer instruction to said second client, said method further comprises:
after the second client transmits the file to be transmitted, receiving the transmission instruction sent by the second client;
and storing the transmission instruction into the object pool.
4. The method of file transfer according to claim 1, wherein after searching for a transfer instruction corresponding to the transfer protocol in an object pool, the method further comprises:
under the condition that the transmission instruction is not found in the object pool, creating a corresponding transmission instruction according to the transmission protocol;
and sending the transmission instruction to the second client, so that the second client calls a target transmission interface according to the transmission instruction, and the file to be transmitted is transmitted based on the target transmission interface.
5. A system for file transfer, comprising a first client and a second client;
the second client is used for sending the transmission request to the first client, wherein the transmission request comprises a file to be transmitted and a transmission protocol;
the first client is used for searching a corresponding transmission instruction based on the transmission protocol and sending the transmission instruction to the second client;
and the second client is used for calling a target transmission interface based on the transmission instruction and transmitting the file to be transmitted.
6. An apparatus for file transfer, applied to a first client, the apparatus comprising:
the receiving module is used for receiving a file transmission request sent by the second client, wherein the file transmission request comprises a file to be transmitted and a transmission protocol;
the searching module is used for searching the transmission instruction corresponding to the transmission protocol in the object pool, the transmission instruction is generated based on the transmission protocol, and the transmission instruction corresponds to the transmission protocol one by one;
and the sending module is used for sending the transmission instruction to the second client side under the condition that the transmission instruction is found in the object pool, so that the second client side calls a target transmission interface according to the transmission instruction, and the file to be transmitted is transmitted based on the target transmission interface.
7. The apparatus for file transfer of claim 6, wherein the apparatus further comprises:
the creation module is used for creating a corresponding transmission instruction according to the transmission protocol;
and the storage module is used for storing the transmission instruction into the object pool.
8. An electronic device, the device comprising: a processor and a memory storing computer program instructions;
the processor reads and executes the computer program instructions to implement the method of file transfer as claimed in any one of claims 1 to 4.
9. A readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method of file transfer of any of claims 1 to 4.
10. A computer program product comprising a computer program which, when processed by a processor, implements the method of file transfer as claimed in any one of claims 1 to 4.
CN202310671671.XA 2023-06-07 2023-06-07 File transmission method, device, equipment, system, medium and product Pending CN116775538A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310671671.XA CN116775538A (en) 2023-06-07 2023-06-07 File transmission method, device, equipment, system, medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310671671.XA CN116775538A (en) 2023-06-07 2023-06-07 File transmission method, device, equipment, system, medium and product

Publications (1)

Publication Number Publication Date
CN116775538A true CN116775538A (en) 2023-09-19

Family

ID=87990593

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310671671.XA Pending CN116775538A (en) 2023-06-07 2023-06-07 File transmission method, device, equipment, system, medium and product

Country Status (1)

Country Link
CN (1) CN116775538A (en)

Similar Documents

Publication Publication Date Title
US20190274050A1 (en) Auto-provisioning device
CN109428773B (en) Communication method and device
EP4407960A1 (en) Data transmission method, apparatus and device, and computer-readable storage medium
CN106656998B (en) server communication method and device
CN117850753B (en) Method, device, equipment and medium for generating interface code based on someip matrix
CN116820865A (en) Board card testing method, device, system and equipment
CN110213795B (en) Method for simultaneously communicating double SIM cards, mobile terminal and storage medium
CN116775538A (en) File transmission method, device, equipment, system, medium and product
CN117354382A (en) Communication protocol conversion method, system, device and storage medium
CN116775110A (en) Data synchronization method, device, equipment, medium and product
CN115858320A (en) Operation log recording method, apparatus, medium and product
CN113688432B (en) Seed code number management method of identity recognition module of Internet of things
CN117667325A (en) Timer management method, device, equipment and computer storage medium
CN115202632A (en) Matlab/Simulink-based AUTOSAR software assembly function interface development method
CN114675822A (en) AUTOSAR software component development method, device, equipment and storage medium
CN111324382B (en) Instruction processing method and chip
CN107454021B (en) Communication method and device
CN108288135B (en) System compatibility method and device, computer readable storage medium and electronic equipment
CN111124445A (en) Home gateway upgrading method and home gateway
CN117270823A (en) Software development method, device, equipment, medium and product
CN112738207B (en) Keyword data transmission method and device, storage medium and electronic device
CN113553275B (en) Method, device, equipment and storage medium for determining connection relation
CN112887124B (en) Configuration management method and device of 5G base station
CN118035141A (en) Interrupt processing method, device and medium
CN117724777A (en) Interface calling method, device, electronic equipment and storage medium

Legal Events

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