CN112491976A - File transmission method, device, server and storage medium - Google Patents

File transmission method, device, server and storage medium Download PDF

Info

Publication number
CN112491976A
CN112491976A CN202011257603.1A CN202011257603A CN112491976A CN 112491976 A CN112491976 A CN 112491976A CN 202011257603 A CN202011257603 A CN 202011257603A CN 112491976 A CN112491976 A CN 112491976A
Authority
CN
China
Prior art keywords
file
equipment
transmit
resource link
controlling
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
CN202011257603.1A
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.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN202011257603.1A priority Critical patent/CN112491976A/en
Publication of CN112491976A publication Critical patent/CN112491976A/en
Pending legal-status Critical Current

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]
    • 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/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1046Joining mechanisms
    • 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/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1048Departure or maintenance mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention relates to a file transmission method, a file transmission device, a server and a storage medium, wherein the method comprises the following steps: when determining that a first device needs to collect files, generating a resource link corresponding to the first device; and when a file transmission request sent by the second equipment based on the resource link is received, controlling the second equipment to transmit the file to the first equipment.

Description

File transmission method, device, server and storage medium
Technical Field
The embodiment of the invention relates to the field of file transmission, in particular to a file transmission method, a file transmission device, a server and a storage medium.
Background
At present, enterprises, teams and the like often have various conferences, various files may need to be displayed on a display device in the conference, and the files need to be transmitted to the display device in advance, and the display device may not have an input function, such as: a projection screen or a conference panel. The current file transmission mode between devices mainly comprises: service transmission such as USB flash disk copy, bluetooth, WIFI transmission, data line transmission, network sharing duplication, opening ftp temporarily, transmit through social tools, if: WeChat, QQ, office system, mail are transmitted through various mutual transmission software, such as: fast transmission, fast tooth transmission and flash transmission of dairy cows.
However, the conventional file transmission method has the problems of requiring more hardware to participate, having more early setting steps, being inconvenient to input and the like, so that the conventional file transmission method cannot realize the purpose of quickly and conveniently transmitting the file to the device without the input function.
Disclosure of Invention
In view of this, in order to solve the technical problem that the device without the input function has difficulty in transferring the file, embodiments of the present invention provide a file transfer method, device, server and storage medium.
In a first aspect, an embodiment of the present invention provides a file transmission method, including:
when determining that a first device needs to collect files, generating a resource link corresponding to the first device;
and controlling the second equipment to transmit the file to the first equipment when receiving a file transmission request sent by the second equipment based on the resource link.
In one possible embodiment, the method further comprises:
when a file collection request sent by first equipment is received, determining that the first equipment needs to collect files;
or the like, or, alternatively,
determining a file collection status of the first device;
and if the file collection state represents that files are to be collected, determining that the first equipment needs to collect the files.
In one possible embodiment, the method further comprises:
determining whether the second IP address and the acquired first IP address of the first device belong to the same network segment;
if yes, controlling the second equipment to establish a point-to-point communication connection with the first equipment, and controlling the second equipment to transmit a file to the first equipment through the point-to-point communication connection;
and if not, controlling the second equipment to transmit the file to the equipment, and forwarding the file to the first equipment based on the first IP address.
In one possible embodiment, the method further comprises:
when a file downloading request sent by a third device based on the resource link is received, determining whether a third IP address of the third device and the first IP address carried in the file downloading request belong to the same network segment;
if yes, controlling the first device to transmit the file to the third device;
and if not, controlling the equipment to transmit the file to the third equipment.
In one possible embodiment, the method further comprises:
and sending the element containing the resource link to the first device for the first device to show the element.
In one possible embodiment, the method further comprises:
and after the resource link corresponding to the first device is generated, if the file transmission request is not received within a first preset time, deleting the resource link.
In one possible embodiment, the method further comprises:
and after controlling the second equipment to transmit the file to the equipment, if the file downloading request is not received within a second preset time, deleting the file.
In a second aspect, an embodiment of the present invention provides a file transfer apparatus, including:
the receiving module is used for generating a resource link corresponding to the first equipment when the first equipment is determined to need to collect files;
and the control module is used for controlling the second equipment to transmit the file to the first equipment when receiving a file transmission request sent by the second equipment based on the resource link.
In a third aspect, an embodiment of the present invention provides a server, including: a processor and a memory, wherein the processor is configured to execute a file transfer program stored in the memory to implement the file transfer method in the first aspect.
In a fourth aspect, an embodiment of the present invention provides a storage medium, including: the storage medium stores one or more programs that are executable by one or more processors to implement the file transfer method described in the above first aspect.
The file transmission scheme provided by the embodiment of the invention is applied to file transmission among devices, wherein some devices may not have an input function, and when other devices need to transmit files to the devices without the input function, a resource link corresponding to a first device is generated by determining that the first device needs to collect the files; when a file transmission request sent by a second device based on the resource link is received, the second device is controlled to transmit a file to the first device, so that the file can be conveniently and quickly transmitted to the device without the input function by other devices, the device without the input function can be used as a display screen display file, and the file can be downloaded from the device by other devices, and the mutual transmission of the files among various devices is realized.
Drawings
FIG. 1 is a diagram of a system architecture according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a file transmission method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating an embodiment of step S21 according to the present invention;
FIG. 4 is a flowchart illustrating an embodiment of step S22 according to the present invention;
fig. 5 is a schematic flowchart of the process after step S22 according to the embodiment of the present invention;
fig. 6 is a schematic structural diagram of a file transfer device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For the convenience of understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
Fig. 1 is a system architecture diagram according to an embodiment of the present invention, where fig. 1 includes: 101-103 and a server 104. The devices 101-103 are in communication connection with the server 104 respectively. Optionally, the devices 101 to 103 may be located in the same local area network or located in different local area networks, for example, the device 101 and the device 102 are located in the same local area network, and the device 103 is located in another local area network.
In practice, devices 101-103 may be supported with various electronic devices having display screens, including but not limited to: a conference whiteboard, a smart television, a desktop computer, a tablet computer, a notebook computer or a smart phone, etc.
It will be understood that the number of networks and devices in fig. 1 is merely illustrative. Embodiments of the present invention may be applied to any number of networks and devices, depending on the actual needs.
Based on the system architecture shown in fig. 1, in an exemplary application scenario, the device 101 is a conference whiteboard, and the devices 102 to 103 are smartphones held by participants respectively. In this exemplary application scenario, the device 102 or 103 may be implemented to transmit a local file, such as a PPT file, to the device 101 for presentation by the device 101 by applying the file transmission method provided by the present invention. The file transmission method provided by the invention can also be applied to realize that the device 102 transmits the local file to the device 101, and the device 103 can download the file from the device 101, at this time, the device 101 is used as a file transmission media device.
The file transmission method provided by the embodiment of the present invention will be further explained with specific embodiments in conjunction with the drawings, and the embodiments do not limit the embodiment of the present invention.
Fig. 2 is a flowchart illustrating a file transmission method according to an embodiment of the present invention, where the method is applicable to a server, in an example, the server is the server 104 illustrated in fig. 1. As shown in fig. 2, the method specifically includes:
and S21, when the file collection requirement of the first equipment is determined, generating a resource link corresponding to the first equipment.
In the system architecture shown in fig. 1, the first device refers to device 101 and the second device refers to device 102.
As an embodiment, in an application, when it is determined that a first device needs to collect a file, a resource link corresponding to the first device is generated, where the resource link corresponding to the first device refers to a storage address where the file is collected and stored in the first device, and the resource link points to the first device.
Further, how the manner of determining whether the first device needs to collect the file is implemented is exemplified by the embodiment of fig. 3, and will not be described in detail here.
And S22, controlling the second device to transmit the file to the first device when receiving the file transmission request sent by the second device based on the resource link.
For one embodiment, after step S21 is completed, the server may send the element including the resource link to the first device, so that the first device can expose the element. Optionally, the element includes at least one of: two-dimensional code, pick-up code, URL address.
As an alternative implementation, the second device may scan the two-dimensional code to access a file transfer service web page provided by the server 104. As another alternative implementation, the URL address and the pickup code may be input by the user in a browser installed on the second device, and the second device accesses the file transfer service web page provided by the server 104 based on the URL address and the pickup code input by the user.
Further, the user can click the 'upload file' icon on the file transfer service webpage, and when the second device detects that the 'upload file' icon is triggered, the second device displays a file selection interface so that the user can select the file to be transferred. Furthermore, after the user selects the file to be transmitted, the user clicks the "submit" icon, and when the second device detects that the "submit" icon is triggered, the second device can send a file transmission request to the server.
In step S22, the server 104 controls the second device to transfer the file to the first device when receiving a file transfer request sent by the second device based on the resource link. How to control the second device to transmit the file to the first device is described below by the embodiment shown in fig. 3, and will not be described in detail here.
S23, after the resource link corresponding to the first device is generated, if the file transmission request is not received within a first preset time period, deleting the resource link.
After the file is stored locally in the first device, corresponding storage address information is generated and fed back to the server 104, the server 104 adds the storage address to a url address suffix and generates a digital combined pickup code, and other devices can enter a file transmission service through a resource link and download the file according to the pickup code.
Optionally, if no file transmission request sent by any device is received within a first preset time (for example, 10 minutes), the resource link is invalidated and deleted.
According to the file transmission method provided by the embodiment of the invention, when a server determines that a first device needs to collect files, a resource link corresponding to the first device is generated; when a file transmission request sent by the second device based on the resource link is received, the second device is controlled to transmit the file to the first device, so that the first device can receive the file transmitted by other devices without inputting the resource link and other operations at the first device end by a user, and therefore the file can be conveniently and quickly transmitted to the first device under the condition that the second device is not convenient for the user to input. Meanwhile, too much hardware is not needed to participate, and communication friends are not needed to be established, so that the file transmission process is simplified, and the file transmission is more convenient and faster.
Fig. 3 is a flowchart of an embodiment of step S21 according to an embodiment of the present invention, and as shown in fig. 3, the method specifically includes:
and S31, receiving the file collection request sent by the first device.
As an embodiment, in the application, a corresponding client application may be installed on the first device to provide the file transfer service. Based on this, the user may launch a client application installed on the first device, clicking a "collect files" icon on a display interface of the client application. The first device, upon detecting that a "collect file" icon on the client application display interface is triggered, may then send a file collection request to the server to request collection of the file. In this manner, the server may receive the file collection request sent by the first device.
Steps S32 to S34 are explained in a unified manner as follows:
and S32, determining the file collection state of the first device.
And S33, if the file collection state indicates that the file is to be collected.
And S34, determining that the first device needs to collect files.
As an optional embodiment, in the application, if the first device does not have any input function, such as an outdoor advertisement screen, based on this, the file collection state of the first device may be set to be in the file to-be-collected state at every moment in advance, and the server may change the resource link corresponding to the first device according to the preset time; the file collection state of the first device can be actively acquired through the server according to the preset time. And if the file collection state of the first equipment is to be collected, determining that the first equipment needs to collect the files.
The embodiment of the invention can respectively determine whether the first equipment needs to collect files or not aiming at the first equipment with the input function and the first equipment without the input function.
Fig. 4 is a flowchart of an embodiment of step S22 according to an embodiment of the present invention, and as shown in fig. 4, the method specifically includes:
s41, determining whether the second IP address and the acquired first IP address of the first device belong to the same network segment, if so, executing the step S42, and if not, executing the step S43.
And S42, if yes, controlling the second device to establish a point-to-point communication connection with the first device, and controlling the second device to transmit a file to the first device through the point-to-point communication connection.
S43, if not, controlling the second device to transmit the file to the device, and forwarding the file to the first device based on the first IP address.
Steps S41 to S43 are explained in a unified manner as follows:
as can be seen from the above description, in the embodiment of the present invention, after receiving the file transmission request sent by the second device based on the resource link, the server does not directly control the second device to transmit the file to the server, and then transmits the file to the first device, but first determines whether the first device and the second device are in the same lan. It can be understood that, if the first device and the second device are in the same lan, it means that the first device and the second device can directly communicate with each other, and further, the second device can directly transmit files to the first device through the communication connection with the first device, so that the transmission efficiency can be improved. If the first device and the second device are not in the same local area network, the second device transfers the files to the server, and then the server transmits the files to the first device, so that remote transmission of different networks is achieved.
For one embodiment, the server may determine whether the first device and the second device are within the same local area network by: and determining whether the IP address (for convenience of description, hereinafter referred to as a second IP address) of the second device carried in the file uploading request and the IP address of the first device belong to the same local area network. If yes, it means that the first device and the second device are in the same local area network, and if no, it means that the first device and the second device are not in the same local area network.
Wherein, the server may obtain the IP address of the first device (hereinafter, referred to as the first IP address for convenience of description) in the following manner: and (6) registering.
As an embodiment, in case the first device and the second device are on the same local area network, the peer-to-peer communication connection of the first device and the second device may be controlled. As an alternative implementation, the server may send the IP address and the device information of the second device to the first device, and the first device establishes a peer-to-peer communication connection with the second device based on the received information.
Alternatively, a point-to-point communication connection may be established between the two devices based on a Transmission Control Protocol (TCP), a User Datagram Protocol (UDP), or the like.
Further, the second device is controlled to transmit the file to the first device through the peer-to-peer communication connection established with the first device. The file transmission may be instructing the first device to download the file from the second device, or instructing the second device to actively send the file to the first device.
Further, the first device saves the file in a local storage address.
As an embodiment, in case that the first device and the second device are not in the same local area network, the second device is controlled to transmit the file to the server. The transmission method may be that the server downloads the file directly from the second device, or the server sends a file transmission address to the second device, and the second device uploads the file to the server according to the file transmission address.
Further, the server forwards the file to the first device according to the IP address and the device information of the first device, and the first device stores the file in the local storage address after receiving the file.
For example, if the first device is connected to an intranet of a company and the second device uses a 4G network, the first device and the second device are not in the same lan; or, if the first device and the second device are not in the same city, the first device and the second device are not in the same local area network.
According to the file transmission method provided by the embodiment of the invention, the point-to-point communication connection between the second device and the first device is established by judging whether the second device and the first device are in the same local area network or not, so that the file is directly transmitted, or the second device transmits the file to the server, and then the server transmits the file to the first device; therefore, the file can be rapidly transmitted, and time is saved.
Currently, in a conference scenario, files are also transferred between conference participants, such as the device 102 transmitting the files to the device 103. This is illustrated by the embodiment shown in fig. 5.
Fig. 5 is a schematic flowchart of a process after step S22 according to an embodiment of the present invention, as shown in fig. 5:
s51, when a file downloading request sent by a third device based on the resource link is received, determining whether a third IP address of the third device and the first IP address carried in the file downloading request belong to the same network segment. If so, go to step S52, otherwise, go to step S53.
And S52, if yes, controlling the first device to transmit the file to the third device.
And S53, if not, controlling the device to transmit the file to the third device.
As one example, an element of the resource link may be exposed on the first device, and as such, the third device may scan the two-dimensional code in the resource link element to access the file transfer service web page provided by the server. As another alternative implementation, the URL address and the pickup code may be entered by the user in a browser installed on the third device, and the third device accesses the file transfer service web page provided by the server 104 based on the URL address and the pickup code entered by the user.
Further, the user can click a 'download file' icon on the file transfer service webpage, and the second device displays a file selection interface when detecting that the 'download file' icon is triggered, so that the user can select a file to be downloaded. Furthermore, after the user selects the file to be downloaded, the user clicks the download icon, and when the second device detects that the download icon is triggered, the second device can send a file download request to the server.
In step S51, after receiving the file download request sent by the third device based on the resource link, the server first determines whether the third device and the first device are in the same lan, instead of immediately transmitting the file. If the third device and the first device are in the same local area network, it means that the third device and the first device can communicate directly, and further, the first device can directly transmit files to the third device through the communication connection between the first device and the third device, so that the transmission efficiency can be improved. If the third device and the first device are not in the same local area network, the first device transfers the file to the server, and then the server transfers the file to the third device, so that remote transmission of different networks is realized.
In an alternative of the embodiment of the present invention, after the second device is controlled to transmit the file to the device, if the file download request is not received within a second preset time period, the file is deleted.
After the second device transmits the file to the server and the server transmits the file to the first device, if a file downloading request sent by other devices through the resource link is not received within a second preset time (for example, 5 minutes), the resource link is invalid and the resource link is deleted.
In the file transmission method provided by the embodiment of the invention, the point-to-point communication connection between the third device and the first device is established by judging whether the third device and the first device are in the same local area network, and the file is directly transmitted, or the aunt device transmits the file to the server and then the server transmits the file to the third device; therefore, the file can be rapidly transmitted, and time is saved.
Fig. 6 is a schematic structural diagram of a file transfer device according to an embodiment of the present invention, which specifically includes:
a receiving module 601, configured to generate a resource link corresponding to a first device when it is determined that the first device needs to collect a file;
a control module 602, configured to control a second device to transmit a file to the first device when a file transmission request sent by the second device based on the resource link is received.
In a possible embodiment, the control module 602 is specifically configured to determine that a file needs to be collected by a first device when a file collection request sent by the first device is received; or, determining a file collection status of the first device; and if the file collection state represents that files are to be collected, determining that the first equipment needs to collect the files.
In a possible embodiment, the control module 602 is further configured to determine whether the second IP address and the acquired first IP address of the first device belong to the same network segment; if yes, controlling the second equipment to establish a point-to-point communication connection with the first equipment, and controlling the second equipment to transmit a file to the first equipment through the point-to-point communication connection; and if not, controlling the second equipment to transmit the file to the equipment, and forwarding the file to the first equipment based on the first IP address.
In a possible implementation manner, the control module 602 is further configured to determine, when a file download request sent by a third device based on the resource link is received, whether a third IP address of the third device and the first IP address carried in the file download request belong to the same network segment; if yes, controlling the first device to transmit the file to the third device; and if not, controlling the equipment to transmit the file to the third equipment.
In a possible implementation manner, the control module 602 is further configured to send an element including the resource link to the first device, so that the first device presents the element.
In a possible implementation manner, the control module 602 is further configured to delete the resource link if the file transmission request is not received within a first preset time period after the resource link corresponding to the first device is generated based on the file identifier.
In a possible implementation manner, the control module 602 is further configured to delete the file if the file download request is not received within a second preset time period after the second device is controlled to transmit the file to the device.
The file transmission apparatus provided in this embodiment may be the file transmission apparatus shown in fig. 6, and may perform all the steps of the file transmission method shown in fig. 2 to 5, so as to achieve the technical effects of the file transmission method shown in fig. 2 to 5, and for brevity, it is specifically described with reference to fig. 2 to 5, which is not described herein again.
Fig. 7 is a schematic structural diagram of a server according to an embodiment of the present invention, where the server 700 shown in fig. 7 includes: at least one processor 701, memory 702, at least one network interface 704, and other user interfaces 703. The various components in server 700 are coupled together by a bus system 705. It is understood that the bus system 705 is used to enable communications among the components. The bus system 705 includes a power bus, a control bus, and a status signal bus in addition to a data bus. But for clarity of illustration the various busses are labeled in figure 7 as the bus system 705.
The user interface 703 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It is to be understood that the memory 702 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (PROM), an erasable programmable Read-only memory (erasabprom, EPROM), an electrically erasable programmable Read-only memory (EEPROM), or a flash memory. The volatile memory may be a Random Access Memory (RAM) which functions as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (staticiram, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (syncronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM ), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DRRAM). The memory 702 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 702 stores the following elements, executable units or data structures, or a subset thereof, or an expanded set thereof: an operating system 7021 and application programs 7022.
The operating system 7021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application 7022 includes various applications, such as a media player (MediaPlayer), a Browser (Browser), and the like, for implementing various application services. Programs that implement methods in accordance with embodiments of the present invention can be included within application program 7022.
In the embodiment of the present invention, the processor 701 is configured to execute the method steps provided by the method embodiments by calling a program or an instruction stored in the memory 702, specifically, a program or an instruction stored in the application 7022, for example, and includes:
when determining that a first device needs to collect files, generating a resource link corresponding to the first device; and controlling the second equipment to transmit the file to the first equipment when receiving a file transmission request sent by the second equipment based on the resource link.
In one possible implementation, when a file collection request sent by a first device is received, it is determined that the first device needs to collect a file; or, determining a file collection status of the first device; and if the file collection state represents that files are to be collected, determining that the first equipment needs to collect the files.
In one possible implementation, determining whether the second IP address and the acquired first IP address of the first device belong to the same network segment; if yes, controlling the second equipment to establish a point-to-point communication connection with the first equipment, and controlling the second equipment to transmit a file to the first equipment through the point-to-point communication connection; and if not, controlling the second equipment to transmit the file to the equipment, and forwarding the file to the first equipment based on the first IP address.
In a possible implementation manner, when a file downloading request sent by a third device based on the resource link is received, determining whether a third IP address of the third device carried in the file downloading request and the first IP address belong to the same network segment; if yes, controlling the first device to transmit the file to the third device; and if not, controlling the equipment to transmit the file to the third equipment.
In one possible embodiment, an element containing the resource link is sent to the first device for the first device to expose the element.
In a possible implementation manner, after the resource link corresponding to the first device is generated, if the file transmission request is not received within a first preset time period, the resource link is deleted.
In a possible implementation manner, after the second device is controlled to transmit the file to the device, if the file download request is not received within a second preset time period, the file is deleted.
The method disclosed in the above embodiments of the present invention may be applied to the processor 701, or implemented by the processor 701. The processor 701 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 701. The processor 701 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702 and performs the steps of the above method in combination with the hardware thereof.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The server provided in this embodiment may be the server shown in fig. 7, and may execute all the steps of the file transmission method shown in fig. 2 to 5, so as to achieve the technical effect of the file transmission method shown in fig. 2 to 5, which is described with reference to fig. 2 to 5 for brevity and will not be described herein again.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium are executable by one or more processors to implement the file transfer method described above as being performed on the server side.
The processor is used for executing the file transmission program stored in the memory to realize the following steps of the file transmission method executed on the server side:
when determining that a first device needs to collect files, generating a resource link corresponding to the first device; and controlling the second equipment to transmit the file to the first equipment when receiving a file transmission request sent by the second equipment based on the resource link.
In one possible implementation, when a file collection request sent by a first device is received, it is determined that the first device needs to collect a file; or, determining a file collection status of the first device; and if the file collection state represents that files are to be collected, determining that the first equipment needs to collect the files.
In one possible implementation, determining whether the second IP address and the acquired first IP address of the first device belong to the same network segment; if yes, controlling the second equipment to establish a point-to-point communication connection with the first equipment, and controlling the second equipment to transmit a file to the first equipment through the point-to-point communication connection; and if not, controlling the second equipment to transmit the file to the equipment, and forwarding the file to the first equipment based on the first IP address.
In a possible implementation manner, when a file downloading request sent by a third device based on the resource link is received, determining whether a third IP address of the third device carried in the file downloading request and the first IP address belong to the same network segment; if yes, controlling the first device to transmit the file to the third device; and if not, controlling the equipment to transmit the file to the third equipment.
In one possible embodiment, an element containing the resource link is sent to the first device for the first device to expose the element.
In a possible implementation manner, after the resource link corresponding to the first device is generated, if the file transmission request is not received within a first preset time period, the resource link is deleted.
In a possible implementation manner, after the second device is controlled to transmit the file to the device, if the file download request is not received within a second preset time period, the file is deleted.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A file transmission method is applied to a server and comprises the following steps:
when determining that a first device needs to collect files, generating a resource link corresponding to the first device;
and controlling the second equipment to transmit the file to the first equipment when receiving a file transmission request sent by the second equipment based on the resource link.
2. The method of claim 1, wherein determining that the first device needs to collect files comprises:
when a file collection request sent by first equipment is received, determining that the first equipment needs to collect files;
or the like, or, alternatively,
determining a file collection status of the first device;
and if the file collection state represents that files are to be collected, determining that the first equipment needs to collect the files.
3. The method of claim 1, wherein the file transfer request carries at least a second IP address of the second device;
the controlling the second device to transmit the file to the first device includes:
determining whether the second IP address and the acquired first IP address of the first device belong to the same network segment;
if yes, controlling the second equipment to establish a point-to-point communication connection with the first equipment, and controlling the second equipment to transmit a file to the first equipment through the point-to-point communication connection;
and if not, controlling the second equipment to transmit the file to the equipment, and forwarding the file to the first equipment based on the first IP address.
4. The method of claim 3, further comprising:
when a file downloading request sent by a third device based on the resource link is received, determining whether a third IP address of the third device and the first IP address carried in the file downloading request belong to the same network segment;
if yes, controlling the first device to transmit the file to the third device;
and if not, controlling the equipment to transmit the file to the third equipment.
5. The method of claim 1, further comprising:
sending an element containing the resource link to the first device for the first device to expose the element, the element including at least one of:
two-dimensional code, pick-up code, URL address.
6. The method of claim 1, further comprising:
and after the resource link corresponding to the first device is generated, if the file transmission request is not received within a first preset time, deleting the resource link.
7. The method of claim 4, further comprising:
and after controlling the second equipment to transmit the file to the equipment, if the file downloading request is not received within a second preset time, deleting the file.
8. A file transfer apparatus, comprising:
the receiving module is used for generating a resource link corresponding to the first equipment when the first equipment is determined to need to collect files;
and the control module is used for controlling the second equipment to transmit the file to the first equipment when receiving a file transmission request sent by the second equipment based on the resource link.
9. A server, comprising: a processor and a memory, the processor being configured to execute a file transfer program stored in the memory to implement the file transfer method of any one of claims 1 to 7.
10. A storage medium storing one or more programs executable by one or more processors to implement the file transfer method of any one of claims 1 to 7.
CN202011257603.1A 2020-11-11 2020-11-11 File transmission method, device, server and storage medium Pending CN112491976A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011257603.1A CN112491976A (en) 2020-11-11 2020-11-11 File transmission method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011257603.1A CN112491976A (en) 2020-11-11 2020-11-11 File transmission method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN112491976A true CN112491976A (en) 2021-03-12

Family

ID=74929800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011257603.1A Pending CN112491976A (en) 2020-11-11 2020-11-11 File transmission method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN112491976A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104333598A (en) * 2014-11-06 2015-02-04 北京安奇智联科技有限公司 Two-dimension code and network adaption based mobile terminal and web terminal interconnection method
US20160042004A1 (en) * 2014-08-07 2016-02-11 Konica Minolta, Inc. Information processing device, non-transitory computer readable recording medium and information processing method
WO2017166522A1 (en) * 2016-03-29 2017-10-05 乐视控股(北京)有限公司 Method for transmitting file between terminal devices, terminal device and file transmission system
US20170310747A1 (en) * 2016-04-26 2017-10-26 International Business Machines Corporation Autonomous decentralized peer-to-peer telemetry
CN110022329A (en) * 2018-01-08 2019-07-16 腾讯科技(深圳)有限公司 Document transmission method, device, computer readable storage medium and computer equipment
CN110191046A (en) * 2019-05-31 2019-08-30 成都依能科技股份有限公司 Document transmission system and method based on wechat
US20200026688A1 (en) * 2018-03-16 2020-01-23 South University Of Science And Technology File sharing method based on two-dimensional code, server and terminal device
CN111182021A (en) * 2019-10-22 2020-05-19 腾讯科技(深圳)有限公司 File sharing method and device, electronic equipment and computer readable storage medium
CN111368173A (en) * 2020-03-05 2020-07-03 五八有限公司 File transmission method and device, electronic equipment and readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160042004A1 (en) * 2014-08-07 2016-02-11 Konica Minolta, Inc. Information processing device, non-transitory computer readable recording medium and information processing method
CN104333598A (en) * 2014-11-06 2015-02-04 北京安奇智联科技有限公司 Two-dimension code and network adaption based mobile terminal and web terminal interconnection method
WO2017166522A1 (en) * 2016-03-29 2017-10-05 乐视控股(北京)有限公司 Method for transmitting file between terminal devices, terminal device and file transmission system
US20170310747A1 (en) * 2016-04-26 2017-10-26 International Business Machines Corporation Autonomous decentralized peer-to-peer telemetry
CN110022329A (en) * 2018-01-08 2019-07-16 腾讯科技(深圳)有限公司 Document transmission method, device, computer readable storage medium and computer equipment
US20200026688A1 (en) * 2018-03-16 2020-01-23 South University Of Science And Technology File sharing method based on two-dimensional code, server and terminal device
CN110191046A (en) * 2019-05-31 2019-08-30 成都依能科技股份有限公司 Document transmission system and method based on wechat
CN111182021A (en) * 2019-10-22 2020-05-19 腾讯科技(深圳)有限公司 File sharing method and device, electronic equipment and computer readable storage medium
CN111368173A (en) * 2020-03-05 2020-07-03 五八有限公司 File transmission method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US20210037110A1 (en) Platform-Independent Application Publishing to a Front-End Interface by Encapsulating Published Content in a Web Container
CN103782541A (en) Non-invasive remote access to an application program
JP6375705B2 (en) Information processing system, terminal device, and program
US9307010B2 (en) Data upload method using shortcut
US20150058397A1 (en) Information processing system, information processing apparatus, terminal apparatus and information transmission method
JP2016162286A (en) Information processing system, information processing method, information processing device and program
WO2018041087A1 (en) Method and device for screenshot
JP6711235B2 (en) Information processing system, information processing device, program, and questionnaire operation method
JP6413686B2 (en) Information processing system, information processing apparatus, and information processing method
JP6331296B2 (en) Information processing terminal, transmission system, and program
CN110740118A (en) Protocol for initiating sessions with partner sites
JP7400316B2 (en) Communication systems, data sharing methods, programs, communication terminals
JP2016177463A (en) Information processing apparatus, data sharing method, program, and information processing system
US20200177743A1 (en) Information processing apparatus, information processing system and method of processing information
JP2015156209A (en) information processing system
CN111475761A (en) Client, server and content sharing control method
US20200104024A1 (en) Communication terminal, information sharing system, display control method, and non-transitory computer-readable medium
JP6326785B2 (en) Information processing system, terminal device, program, and method
CN112491976A (en) File transmission method, device, server and storage medium
JP6578701B2 (en) Information processing system, information processing device, terminal device, and program
Kotkar et al. Android Based Remote Desktop Client
RU2610266C2 (en) Method and system for providing access to file for web resource
JP6158667B2 (en) Server device, terminal device, communication method, and computer program
JP7039903B2 (en) Information processing system, information processing device, program and screen sharing terminal control method
KR102198799B1 (en) Conferencing apparatus and method for sharing content thereof

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co., Ltd