CN114024953B - File transmission method and device and electronic equipment - Google Patents

File transmission method and device and electronic equipment Download PDF

Info

Publication number
CN114024953B
CN114024953B CN202111237398.7A CN202111237398A CN114024953B CN 114024953 B CN114024953 B CN 114024953B CN 202111237398 A CN202111237398 A CN 202111237398A CN 114024953 B CN114024953 B CN 114024953B
Authority
CN
China
Prior art keywords
terminal
file
downloaded
identifier
downloading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111237398.7A
Other languages
Chinese (zh)
Other versions
CN114024953A (en
Inventor
刘硕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202111237398.7A priority Critical patent/CN114024953B/en
Publication of CN114024953A publication Critical patent/CN114024953A/en
Application granted granted Critical
Publication of CN114024953B publication Critical patent/CN114024953B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Abstract

The application provides a file transmission method, a file transmission device and electronic equipment, wherein the file transmission method, the file transmission device and the electronic equipment can receive a downloading request sent by a first terminal, wherein the downloading request comprises a target user identifier corresponding to a target user logged in the first terminal and a file identifier corresponding to a file to be downloaded; responding to the downloading request, and determining a second terminal for logging in by a target user corresponding to the target user identifier; and sending a downloading instruction corresponding to the file identifier to the second terminal, so that the second terminal obtains the file to be downloaded according to the downloading instruction, and therefore, a user can download the file to be downloaded to the second terminal logged in by the user only by operating the first terminal, and the user can immediately operate the file to be downloaded when switching to use the second terminal, thereby saving the user time and improving the user experience.

Description

File transmission method and device and electronic equipment
Technical Field
Embodiments of the present disclosure relate to the field of data transmission technologies, and in particular, to a file transmission method and apparatus, an electronic device, a computer readable storage medium, and a computer program product.
Background
With the continuous progress of technology, users can use different terminal devices under different use situations to improve the use experience, for example, outdoor users tend to use terminal devices such as mobile phones and tablet computers, and indoor users tend to use terminal devices such as notebook computers and desktop computers. Users often need to operate on the same file when using different terminal devices.
In the related art, after a user downloads or receives a file from one terminal device, if the user switches to another terminal device, the file will not exist in the other terminal device, and the user needs to download or receive the file again in the other terminal device, so that the user can continue to operate on the file in the other device.
However, in the current scheme, in order to operate the same file on different devices, after the user switches the used terminal device, the user needs to download or receive the same file again on the switched device, which is complex in operation, greatly influences the use experience of the user, and especially causes a great amount of time waste for the user under the condition of large file data volume.
Disclosure of Invention
The embodiment of the application provides a file transmission method and device, electronic equipment, a computer readable storage medium and a computer program product, so as to solve the problem that in the related art, after a client downloads a file, the client is switched to other logged-in clients, and the other logged-in clients do not have the file, so that the user experience is poor.
In a first aspect, an embodiment of the present application provides a file transmission method, applied to a server, where the method includes:
Receiving a downloading request sent by a first terminal, wherein the downloading request comprises a target user identifier corresponding to a target user logged in the first terminal and a file identifier corresponding to a file to be downloaded;
responding to the downloading request, and determining a second terminal which corresponds to the target user identifier and is logged in by the target user;
and sending a downloading instruction corresponding to the file identifier to the second terminal so that the second terminal obtains the file to be downloaded according to the downloading instruction.
In an optional implementation manner, the file to be downloaded is a terminal logged in by another user, a file included in an instant communication message sent to the first terminal, and the sending, to the second terminal, a download instruction corresponding to the file identifier includes:
analyzing the downloading request, and determining a dialogue user identifier, a message identifier and a resource locator corresponding to the file to be downloaded; the dialogue user identifier is used for representing an identifier corresponding to a user who sends the file to be downloaded to the first terminal, and the message identifier is used for representing an identifier of an instant communication message containing the file to be downloaded;
generating a downloading instruction according to the target user identifier, the dialogue user identifier, the message identifier and the resource locator corresponding to the file to be downloaded;
And sending a downloading instruction corresponding to the file identifier to the second terminal, so that the second terminal acquires the file to be downloaded from the content distribution network corresponding to the server according to the resource locator after verifying the downloading instruction through the target user identifier, the dialogue user identifier and the message identifier.
In an optional implementation manner, the sending, to the second terminal, a download instruction corresponding to the file identifier includes:
determining the state of the second terminal, wherein the state comprises an online state and an offline state;
and sending a downloading instruction corresponding to the file identifier to a second terminal with an online state.
In an optional implementation manner, the sending, to the second terminal, a download instruction corresponding to the file identifier further includes:
storing the downloading instruction in the local of the server under the condition that the second terminal in an offline state exists;
continuously detecting the state of the second terminal, and sending the downloading instruction to the second terminal which is converted into the online state from the offline state under the condition that the second terminal which is converted into the online state from the offline state is detected;
And deleting the downloading instruction after the downloading instruction is sent to all the second terminals.
In an alternative embodiment, the method further comprises:
and after determining that the first terminal deletes the file to be downloaded, sending a deleting instruction to the second terminal so that the second terminal deletes the file to be downloaded according to the deleting instruction.
In an alternative embodiment, the method further comprises:
and under the condition that the first terminal and the second terminal are in the same local area network, transmitting a transmission instruction to the first terminal so that the first terminal transmits the file to be downloaded to the second terminal through the local area network.
In an optional implementation manner, the receiving the download request sent by the first terminal includes:
and receiving a downloading request sent by the first terminal after responding to the clicking operation of the synchronous downloading options in an option menu, wherein the option menu is triggered by the long-pressing operation of the file identification of the file to be downloaded.
In a second aspect, an embodiment of the present application provides a file transmission device, where the device includes:
The receiving module is configured to receive a downloading request sent by a first terminal, wherein the downloading request comprises a target user identifier corresponding to a target user logged in the first terminal and a file identifier corresponding to a file to be downloaded;
the determining module is configured to respond to the downloading request and determine a second terminal which corresponds to the target user identifier and is logged in by the target user;
and the sending module is configured to send a downloading instruction corresponding to the file identifier to the second terminal so that the second terminal obtains the file to be downloaded according to the downloading instruction.
In an alternative embodiment, the transmitting module further includes:
the analysis sub-module is configured to analyze the downloading request and determine a dialogue user identifier, a message identifier and a resource locator corresponding to the file to be downloaded; the dialogue user identifier is used for representing an identifier corresponding to a user who sends the file to be downloaded to the first terminal, and the message identifier is used for representing an identifier of an instant communication message containing the file to be downloaded;
the generation sub-module is configured to generate a downloading instruction according to the target user identifier, the dialogue user identifier, the message identifier and the resource locator corresponding to the file to be downloaded;
And the first sending submodule is configured to send a downloading instruction corresponding to the file identifier to the second terminal, so that the second terminal acquires the file to be downloaded from a content distribution network corresponding to the server according to the resource locator after verifying the downloading instruction through the target user identifier, the dialogue user identifier and the message identifier.
In an alternative embodiment, the transmitting module further includes:
a determining sub-module configured to determine a state of the second terminal, the state including an online state and an offline state;
and the second sending submodule is configured to send a downloading instruction corresponding to the file identifier to a second terminal with an online state.
In an alternative embodiment, the transmitting module further includes:
the storage sub-module is configured to store the downloading instruction in the local of the server side under the condition that the second terminal in an offline state exists;
a third sending sub-module configured to continuously detect a state of the second terminal, and send the download instruction to the second terminal that is changed from the offline state to the online state if the second terminal that is changed from the offline state to the online state is detected;
And the deleting sub-module is configured to delete the downloading instructions after sending the downloading instructions to all the second terminals.
In an alternative embodiment, the apparatus further comprises:
and the deleting module is configured to send a deleting instruction to the second terminal after determining that the first terminal deletes the file to be downloaded, so that the second terminal deletes the file to be downloaded according to the deleting instruction.
In an alternative embodiment, the apparatus further comprises:
and the direct transmission module is configured to send a transmission instruction to the first terminal under the condition that the first terminal and the second terminal are determined to be in the same local area network, so that the first terminal sends the file to be downloaded to the second terminal through the local area network.
In an alternative embodiment, the receiving module further includes:
and the receiving sub-module is configured to receive a downloading request sent by the first terminal after responding to the click operation of the synchronous downloading option in an option menu, wherein the option menu is triggered by the long-press operation of the file identification of the file to be downloaded.
In a third aspect, embodiments of the present application further provide an electronic device including a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the file transfer method.
In a fourth aspect, embodiments of the present application further provide a computer-readable storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform the file transfer method.
In a fifth aspect, embodiments of the present application further provide a computer program product, including a computer program, which when executed by a processor implements the file transfer method.
In the embodiment of the application, a downloading request sent by a first terminal can be received, wherein the downloading request comprises a target user identifier corresponding to a target user logged in the first terminal and a file identifier corresponding to a file to be downloaded; responding to the downloading request, and determining a second terminal for logging in by a target user corresponding to the target user identifier; and sending a downloading instruction corresponding to the file identifier to the second terminal, so that the second terminal obtains the file to be downloaded according to the downloading instruction, and therefore, a user can download the file to be downloaded to the second terminal logged in by the user only by operating the first terminal, and the user can immediately operate the file to be downloaded when switching to use the second terminal, thereby saving the user time and improving the user experience.
The foregoing description is only an overview of the technical solutions of the present application, and may be implemented according to the content of the specification in order to make the technical means of the present application more clearly understood, and in order to make the above-mentioned and other objects, features and advantages of the present application more clearly understood, the following detailed description of the present application will be given.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
fig. 1 is a step flowchart of a file transmission method provided in an embodiment of the present application;
FIG. 2 is a flowchart illustrating steps of another method for file transfer according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of an instant messaging window according to an embodiment of the present application;
FIG. 4 is a diagram of a file transfer system architecture according to an embodiment of the present application;
FIG. 5 is a block diagram of a file transfer device according to an embodiment of the present application;
FIG. 6 is a logical block diagram of an electronic device of one embodiment of the present application;
Fig. 7 is a logic block diagram of an electronic device according to another embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 is a flowchart of steps of a file transmission method according to an embodiment of the present application, as shown in fig. 1, where the method includes:
step 101, receiving a downloading request sent by a first terminal, wherein the downloading request comprises a target user identifier corresponding to a target user logged in the first terminal and a file identifier corresponding to a file to be downloaded.
The first terminal may be any terminal device, such as a notebook computer, a desktop computer, a mobile phone, a tablet computer, etc. The first terminal may also be a program client running on any terminal device, such as a WeChat client, a spike client, etc.
The downloading request is a request initiated by the operation first terminal to the server, and the downloading request may specifically include a target user identifier corresponding to a target user logged in the first terminal and a file identifier corresponding to a file to be downloaded.
Specifically, after the target user logs in the first terminal, the file identifier corresponding to the file to be downloaded can be selected on the first terminal, the first terminal generates a downloading request according to the file identifier corresponding to the file to be downloaded selected by the user and the user identifier logged in the first terminal, the downloading request is sent to the server, and the server receives the downloading request. Wherein, the User identification can be the identity of the User (User Identification, UID), the User identification code (User ID), the User name and the like can indicate the information of the User identity; the file identification may be a file name, a file link, a file uniform resource locator (Uniform Resource Locator, URL), etc. may indicate information of the file to be downloaded. It should be noted that, the user may select a plurality of files to be downloaded at a time, and the generated download request may include file identifiers corresponding to the plurality of files to be downloaded.
For example, when the target User logs in a notebook computer a and the target User selects a file document. Doc as a file to be downloaded in the notebook computer a, the notebook computer a generates a downloading request according to the identity identification code UID of the User and the file identification of the file document. Doc, and sends the downloading request to the server, and after receiving the downloading request, the server analyzes the identity identification code UID and the file identification of the file document. Doc from the downloading request.
And 102, responding to the downloading request, and determining a second terminal which corresponds to the target user identifier and is logged in by the target user.
The second terminal may represent other clients that are logged in by the target user identification in addition to the first terminal, and/or clients that are logged in by the associated user identification of the target user identification, where the second terminal and the first terminal may be clients of the same software running on different devices. Taking WeChat as an example, the first terminal may be an android version WeChat client running on one mobile phone, and the corresponding second terminal may be an android version WeChat client running on another mobile phone, an IOS version WeChat client running on another mobile phone, a netpage version WeChat client running on a notebook computer, and so on.
For example, if the User logs in a notebook computer a, a mobile phone B and a mobile phone C, and the notebook computer a is the first terminal, that is, the notebook computer a initiates the download request, the mobile phone B and the mobile phone C may be determined as the second terminal. If the User is associated with the User AD at the same time and the User AD logs in a tablet computer D, the mobile phone B, the mobile phone C and the tablet computer D can be determined as the second terminal.
Specifically, after receiving a download request sent by a first terminal, the server analyzes the download request, and determines a target user identifier and a file identifier corresponding to a file to be downloaded from the download request. The server side inquires user login information and/or user association information through the analyzed target user identification, determines a client which is logged in by the target user identification and/or a client which is logged in by the associated user identification of the target user identification, and takes the client which is logged in by the target user identification and/or the client which is logged in by the associated user identification of the target user identification as a second terminal, wherein the clients are except the first terminal.
Step 103, sending a downloading instruction corresponding to the file identifier to the second terminal, so that the second terminal obtains the file to be downloaded according to the downloading instruction.
After the server determines the second terminal, the server can send the download instruction corresponding to the file identifier corresponding to the file to be downloaded to the second terminal, each client in the second terminal receives the download instruction sent by the server and analyzes the download instruction to obtain the resource locator in the download instruction, and downloads and stores the file to be downloaded to the local place from the resource locator, so that a user can directly operate and use the file to be downloaded when switching to the second terminal, and the trouble caused by the fact that the user needs to manually download the file to be downloaded again to operate and use the file to be downloaded when switching to the second terminal is avoided.
When the user sends a download request through the first terminal, the user can choose to download the file to be downloaded to the first terminal only, or can choose to download the file to be downloaded to the first terminal and the second terminal simultaneously, and the user may not log in the second terminal when the first terminal initiates the download request.
For the above reasons, when the user initiates the download request, the file to be downloaded may be already downloaded to the first terminal before, that is, the file to be downloaded already exists in the first terminal, so if the server determines that the file to be downloaded already exists in the first terminal, the server may only send the instruction to be downloaded to the second terminal, thereby avoiding resource waste caused by repeated downloading of the file to be downloaded by the first terminal.
Specifically, in one embodiment, before generating the download request, the first terminal detects whether the file to be downloaded is stored locally, and if it is determined that the file to be downloaded is stored locally, the download identification information is added to the generated download request, and indicates whether the first terminal already stores the file to be downloaded or not through the download identification information. After receiving the downloading request, the server obtains downloading identification information by analyzing the downloading request, and determines whether the first terminal stores the file to be downloaded according to the downloading identification information.
If the server determines that the file to be downloaded does not exist in the first terminal, the server can send the instruction to be downloaded to the first terminal and the second terminal at the same time, so that the first terminal and the second terminal can synchronously download and store the file to be downloaded, a user can directly use the file to be downloaded after switching equipment, manual downloading is not needed, the time of the user is saved, and the use experience of the user is improved.
Optional step 103 may further include:
substep 1031, determining a state of the second terminal, where the state includes an online state and an offline state.
Because the second terminal includes a client that the user logs in, and the user may log out after logging in, or there may be a client that is not connected to the network in the second terminal, both the client that logs out and the client that is not connected to the network may be considered as clients that are offline for the server, and the clients that are offline for the second terminal may not receive the file to be downloaded sent by the server at the first time. Therefore, it is necessary to determine whether the second terminal is in an offline state when transmitting an instruction to be downloaded to the second terminal.
Specifically, for the case that the login of the second terminal fails, the server may send a verification request to the second terminal, after receiving the verification request, the second terminal sends login credential information to the server, and the server verifies whether the login credential information of the second terminal is valid or expired according to the received login credential information, and determines that the second terminal that the login credential information is invalid and expired is in an offline state. For the situation that the second terminal actively logs out, the second terminal can send a log-out request to the server when logging out, and the server determines the client sending the log-out request as an offline state after receiving the log-out request. For the case of disconnecting the network connection, the server may determine that the second terminal that does not respond to the authentication request is in an offline state before sending the download instruction.
And a sub-step 1032 of sending the file to be downloaded corresponding to the file identifier to the second terminal in the online state.
Before sending the to-be-downloaded instruction to the second terminal, the server side can send an authentication request to the second terminal, the second terminal sends login credential information to the server side after receiving the authentication request, and the server side verifies whether the login credential information of the second terminal is valid or not out of date according to the received login credential information and determines the second terminal with the valid login credential information as an online state.
It should be noted that the above manner of determining the second terminal state is merely an exemplary description, and the manner of determining the second terminal state is not limited to the above manner, and the embodiment of the present application is not specifically limited herein.
In summary, according to the file transmission method provided by the embodiment of the present application, the present application may receive a download request sent by a first terminal, where the download request includes a target user identifier corresponding to a target user logged in to the first terminal, and a file identifier corresponding to a file to be downloaded; responding to the downloading request, and determining a second terminal for logging in by a target user corresponding to the target user identifier; and sending a downloading instruction corresponding to the file identifier to the second terminal, so that the second terminal obtains the file to be downloaded according to the downloading instruction, and therefore, a user can download the file to be downloaded to the second terminal logged in by the user only by operating the first terminal, and the user can immediately operate the file to be downloaded when switching to use the second terminal, thereby saving the user time and improving the user experience.
Fig. 2 is a flowchart of steps of another file transmission method according to an embodiment of the present application, as shown in fig. 2, the method may include:
Step 201, receiving a download request sent by a first terminal.
This step is referred to above sub-step 101, and will not be described in detail in the embodiments of the present application.
Optionally, step 201 may further include:
and sub-step 2011, receiving a downloading request sent by the first terminal after responding to the click operation of the synchronous downloading option in an option menu, wherein the option menu is triggered by the long-press operation of the file identifier of the file to be downloaded.
Because the user does not have to use or operate the same file to be downloaded at the second terminal, that is, the user may not need to download the file to be downloaded to the second terminal, so that the user may select different downloading modes for the file to be downloaded, the first terminal may also send a local downloading request to the server, and for the local downloading request sent by the first terminal, the server receives the local downloading request and then only sends the file to be downloaded to the first terminal. Thus, the download request may include a local download request and a synchronous download request.
Specifically, the user may perform a click operation on a file identifier corresponding to the file to be downloaded on the first terminal, so that the first terminal sends a local download request including the file identifier of the file to be downloaded to the server. The user can call out an option menu by long-time pressing the file identifier corresponding to the file to be downloaded on the first terminal, and send a synchronous downloading request to the server through a synchronous downloading option on the click option menu, so that the server can enable the second terminal to store the corresponding file to be downloaded according to the synchronous downloading request. The clicking operation may be a touch operation, a mouse operation, or the like. The embodiment of the invention only carries out exemplary description on the mode of sending the downloading request, is not particularly limited, and can flexibly set the mode of sending the downloading request by the first terminal according to actual conditions.
Further, the user may further manually select the second terminal to be downloaded synchronously on the option menu, for example, the user logs in 4 clients, wherein 1 is the first terminal, and the user may select any of the other 3 clients on the option menu as the second terminal and generate the synchronous downloading instruction.
In the embodiment of the application, the user can send different downloading requests to the server through different operations, so that the user can flexibly select the type and the number of the clients to be downloaded, the requirements of different users can be met, and the user experience is improved.
Step 202, analyzing the downloading request, and determining a dialogue user identifier, a message identifier and a resource locator corresponding to the file to be downloaded; the dialogue user identifier is used for representing an identifier corresponding to a user who sends the file to be downloaded to the first terminal, and the message identifier is used for representing an identifier of an instant communication message containing the file to be downloaded.
Because the rich media files such as video, pictures, music, text documents and the like are frequently sent between other users and target users through instant messaging messages, the files to be downloaded can comprise files to be downloaded which are transmitted in the form of instant messaging messages in the instant messaging records of the client. The other users are users capable of sending files to the target users, and the other users send files to the target users through logging in the second client.
When the first terminal generates a downloading request, the downloading request can also contain information such as a target user identifier, a dialogue user identifier, a device identifier, a message identifier, a file identifier corresponding to a file to be downloaded and the like, so that the server side can verify the downloading request, and the file received by the target user can not be acquired by other forged downloading requests; the second terminal can also verify the download instruction generated by the download request, so that the second terminal cannot download malicious files according to the forged download instruction.
Referring to fig. 3, a schematic diagram of an instant messaging window provided in an embodiment of the present application is shown. As shown in fig. 3, the User is a target User logged in by the first terminal, the User AD is a User in instant messaging with the User Us, the file D1 is a file sent by the User AD to the User Us through the instant messaging message C1, and the file D2 is a file sent by the target User Us to the User AD through the instant messaging message C2. If the target user Us takes the file D1 as a file to be downloaded to generate a downloading request, in the generated downloading request, the user identifier of the user AD is taken as a dialogue user identifier, the identifier of the target user Us is taken as a target user identifier, the identifier corresponding to the instant messaging message C1 is taken as a message identifier, and the file identifier corresponding to the file D1; if the target user Us generates a downloading request by taking the file D2 as a file to be downloaded, in the generated downloading request, the user identifier of the user AD is taken as a dialogue user identifier, the identifier of the target user Us is taken as a target user identifier, the identifier corresponding to the instant messaging message C2 is taken as a message identifier, and the file identifier corresponding to the file D2. Meanwhile, the device ID of the device Dvs is taken as the device identification.
After receiving the download request sent by the first terminal, the server analyzes information such as a target user identifier, a dialogue user identifier, a message identifier, a device identifier, a file identifier corresponding to a file to be downloaded and the like from the download request, wherein the device identifier can be used for determining the device for sending the download request, so that the first terminal is determined from the client logged in by the user.
Step 203, generating a downloading instruction according to the target user identifier, the dialogue user identifier, the message identifier and the resource locator corresponding to the file to be downloaded.
Because the instant messaging between the target user and other users is forwarded by the server, the server can verify whether the target user identifier, the dialogue user identifier, the message identifier and the file identifier to be downloaded are matched with each other or not, and can perform subsequent operation under the condition that the target user identifier, the dialogue user identifier, the message identifier and the file identifier to be downloaded are matched with each other so as to improve the security of the user for receiving or sending the file. Of course, the server side does not need to verify the downloading request and can be flexibly set according to actual needs.
Because the file to be downloaded is the file sent by the user, the file is already stored in the storage unit corresponding to the server side, and the user waiting to receive the file downloads the file, the server side can acquire the resource locator of the file to be downloaded from the storage unit through the file identifier corresponding to the file to be downloaded.
After obtaining the resource locator corresponding to the file to be downloaded, the server side generates a downloading instruction according to the target user identifier, the dialogue user identifier, the message identifier, the file identifier and the resource locator, and the downloading instruction can also be generated only according to the resource locator and the file identifier so as to indicate the file to be downloaded and the position of the file on the network.
Step 204, sending the download instruction to the second terminal, so that the second terminal obtains the file to be downloaded from the content distribution network corresponding to the server according to the resource locator when the second terminal verifies that the download instruction is legal through the target user identifier, the dialogue user identifier and the message identifier.
After the server generates the download instruction, the download instruction is sent to all the second terminals, and because each second terminal is a client logged in through the target user, when the first terminal receives the messages sent by other users, the second terminal corresponding to the first terminal also receives the same messages, that is, the instant messaging content of the second terminal is the same as the instant messaging content of the first terminal, the second terminal can also determine the information such as the dialogue user identifier, the file identifier, the target user identifier and the like corresponding to the file to be downloaded through the instant messaging information, and further, the second terminal can compare the determined information with the dialogue user identifier, the file identifier, the target user identifier and the like analyzed from the received download instruction, and confirm that the download instruction is legal under the condition that the comparison result is consistent, and further execute the download instruction; if the comparison results are inconsistent, determining that the downloading instruction is illegal, and not executing the downloading instruction. Of course, the second terminal may be set so as not to perform validity judgment on the downloading instruction, and may be flexibly set according to actual needs.
And after the second terminal receives the downloading instruction or determines that the downloading instruction is legal, acquiring a corresponding file to be downloaded from a content distribution network corresponding to the server according to the resource locator analyzed from the downloading instruction, and storing the file to be downloaded in a local area for a user to use and operate the file to be downloaded at the second terminal.
In the embodiment of the application, the second terminal can verify the received downloading instruction, and the information in the forged downloading instruction is difficult to match with the information determined by the second terminal from the instant messaging information, so that the second terminal cannot respond to the forged downloading instruction, and the security of file downloading is improved. And the server side can only send the resource locator corresponding to the to-be-downloaded instruction to the second terminal, and the to-be-downloaded file does not need to be directly sent, so that the bandwidth load of the server side is reduced, network congestion is difficult to form at the server side, and the operation efficiency of the server side is improved.
Optionally, step 204 may specifically include:
sub-step 2041, determining a state of said second terminal, said state comprising an on-line state and an off-line state.
This step is referred to the above sub-step 1031, and will not be described in detail in the embodiments of the present application.
And a sub-step 2042 of sending the download instruction to the second terminal in the online state.
This step is referred to above in sub-step 1032, and the embodiments of the present application will not be described in detail.
The server side sends a downloading instruction to the second terminal, so that the second terminal can verify the validity of the downloading instruction before downloading the file to be downloaded, and after the validity verification is passed, the file to be downloaded is automatically downloaded from the Internet through a resource locator in the downloading instruction, and the file to be downloaded is prevented from being downloaded to a malicious file.
Sub-step 2043, in the event that it is confirmed that there is a second terminal in an offline state, stores the download instruction locally at the server.
Because the second terminal in the offline state cannot receive the download instruction temporarily, after determining that the second terminal has the client in the offline state, the server needs to store the download instruction locally at the server temporarily, so that the download instruction can be sent to the second terminal after the second terminal is subsequently online.
Sub-step 2044 continuously detects the state of the second terminal, and if a second terminal which is changed from an offline state to an online state is detected, transmits the download instruction to the second terminal which is changed from the offline state to the online state.
The second terminal in the offline state may be a client that exits the active login state, a client that is login-disabled or expired, and a client that has an interrupted network connection with the server.
For the second terminal in the offline state, the online state may be restored, so that the files to be downloaded may be synchronously stored at the first time when the second terminal in the offline state is restored, and when the second terminal in the offline state is changed from the offline state to the online state, a download instruction may be sent to the second terminal so that the second terminal obtains the files to be downloaded.
Specifically, login verification information can be sent to the second terminal in an offline state periodically, and after verification is passed, the state of the second terminal is determined to be changed from the offline state to an online state; the client can also be set to actively send login verification information to the server periodically, and the server determines that the state of the client is changed from an offline state to an online state after receiving the login verification information and passing verification. The manner of determining the second terminal state to be changed from the offline state to the online state may be flexibly set according to needs, and embodiments of the present application are not specifically limited herein.
In the embodiment of the application, the downloading instruction is not sent to the second terminal in the offline state at the first time, the downloading instruction containing the resource locator is not sent to the second terminal with illegal login verification information and network connection failure, so that the file security of a user is protected, the network load of a server is reduced, the downloading instruction is sent to the second terminal in the offline state immediately before the second terminal in the offline state is converted into the online state, the user can acquire the file to be downloaded at the first time after switching to the second terminal and logging in, the user time is saved, and the user experience is improved.
Sub-step 2045, after sending said download instructions to all second terminals, deletes said download instructions.
After the download instructions are sent to all the second terminals, the download instructions stored locally at the server side are deleted, or after the preset storage time (for example, 7 days) of the download instructions are generated, the download instructions are deleted locally from the server side, so that the storage space of the server side is released.
Step 205, after determining that the first terminal deletes the file to be downloaded, sending a deletion instruction to the second terminal, so that the second terminal deletes the file to be downloaded according to the deletion instruction.
The user typically deletes the file to be downloaded after using it, and when the user deletes the file to be downloaded at the first terminal, the user will not normally continue to use the file to be downloaded at the second terminal. Therefore, the server side can acquire the deletion operation of the file to be downloaded by the user at any client side of all the logged-in clients, and after determining that the user executes the deletion operation on the file to be downloaded at any client side, send a deletion instruction to the clients except the client side executing the deletion operation by the user in all the logged-in client sides of the user, so that all the logged-in client sides of the user can synchronously delete the file to be downloaded. It should be noted that, the client end that the user performs the deletion operation on the file to be downloaded is not necessarily the first terminal, and may be any client end that stores the file to be downloaded.
In the embodiment of the application, the user can delete the same files in all logged-in clients synchronously by executing the deletion operation on the files to be downloaded in one client, so that the time for deleting the files by the user is saved, and the user experience is improved.
Optionally, the method further comprises:
step 206, sending a transmission instruction to the first terminal under the condition that the first terminal and the second terminal are determined to be in the same local area network, so that the first terminal sends the file to be downloaded to the second terminal through the local area network.
Because the first terminal and the second terminal generally belong to the same user's client, the first terminal and the second terminal are in the same local area network with a high probability, for example, the user's mobile phone and the notebook computer are generally connected to WIFI of a home or a company at the same time.
Therefore, after receiving the download request sent by the first terminal, the server may first determine whether the first terminal has stored the file to be downloaded, if the first terminal has stored the file to be downloaded, then send a direct transmission instruction including the second terminal identifier to the first terminal, and the first terminal searches whether there is a second terminal in the local network according to the second terminal identifier, and sends the file to be downloaded to the searched second terminal through the local network. The local network may include a WIFI network, a bluetooth network, and the like.
The server side can also acquire the network identification code of the local network connected with the first terminal operation equipment and the network identification code of the local network connected with the second terminal operation equipment; and under the condition that the network identification codes are the same, sending a direct transmission instruction to a first terminal so that the first terminal sends the file to be sent to the second terminal through a local area network.
It should be noted that, after the server side receives the download request sent by the first terminal, if it is determined that the first terminal does not store the file to be downloaded, the file to be downloaded or the download instruction may be sent to the first terminal first, and after the first terminal stores the file to be downloaded, the direct transmission instruction is sent to the first terminal in the above manner.
Further, the server may further obtain the first location information of the first terminal and the second location information of the second terminal when determining that the first terminal and the second terminal are not in the same local network, and send a networking instruction to the first terminal and the second terminal when determining that the client distance is smaller than the preset distance through the first location information and the second location information and determining that the client distance between the first terminal and the second terminal, so that the first terminal and the second terminal establish local connection through WIFI or bluetooth, and send a direct transmission instruction to the first terminal after determining that the first terminal and the second terminal successfully establish local connection, so that the first terminal sends the file to be downloaded to the second terminal through the established local network.
In the embodiment of the application, under the condition that the first terminal stores the file to be downloaded and the first terminal and the second terminal are in the same local network, the first terminal can transmit the file to be downloaded to the second terminal through the local network in a mode of sending a direct transmission instruction to the first terminal, and the local network can be established between the first terminal and the second terminal under the condition that the first terminal and the second terminal are close in distance, so that the first terminal can transmit the file to be downloaded to the second terminal through the established local network. Therefore, the network flow of the user is saved, and the speed of acquiring the file to be downloaded by the second terminal is also increased.
In summary, according to the file transmission method provided by the embodiment of the present application, the download request sent by the first terminal may be received, the second terminal logged in by the target user corresponding to the target user identifier may be determined in response to the download request, and the file to be downloaded corresponding to the file identifier may be sent to the second terminal, so that the user may download the file to be downloaded to the second terminal logged in by operating the first terminal only, so that the user may immediately operate the file to be downloaded when switching to use the second terminal, thereby saving user time and improving user experience.
On the basis of the above embodiment, the embodiment of the present application further provides a file transmission system, and fig. 4 is a structural diagram of the file transmission system provided in the embodiment of the present application.
As shown in fig. 4, taking the online second terminal 31 as a client in an online state and the offline second terminal 32 as a client in an offline state, the file transfer system will be described as follows: the server 10 obtains a downloading request sent to the server 10 by the first terminal 20 after receiving the downloading operation of the file to be downloaded by the user, the server 10 determines an online second terminal 31 and an offline second terminal 32 according to the received downloading request, generates a downloading instruction according to the downloading request, and stores the generated downloading instruction in the database 11 when all the second terminals have offline second terminals 32 in an offline state; the server 10 directly sends a downloading instruction to the online second terminal 31 in an online state, so that the online second terminal 31 downloads the corresponding file to be downloaded from the content distribution network 40 according to the resource locator contained in the downloading instruction; when determining that the offline second terminal 32 is changed from the offline state to the online state, the server 10 obtains a download instruction from the database 11, and sends the download instruction to the offline second terminal that is changed to the online state, so that the offline second terminal that is changed to the online state downloads the corresponding file to be downloaded from the content distribution network 40 according to the resource locator included in the download instruction.
In summary, in the file transmission system provided in the embodiment of the present application, the download request sent by the first terminal may be received, where the download request includes a target user identifier corresponding to a target user logged in the first terminal and a file identifier corresponding to a file to be downloaded; responding to the downloading request, and determining a second terminal for logging in by a target user corresponding to the target user identifier; and sending a downloading instruction corresponding to the file identifier to the second terminal, so that the second terminal obtains the file to be downloaded according to the downloading instruction, and therefore, a user can download the file to be downloaded to the second terminal logged in by the user only by operating the first terminal, and the user can immediately operate the file to be downloaded when switching to use the second terminal, thereby saving the user time and improving the user experience.
Fig. 5 is a block diagram of a file transmission device according to an embodiment of the present application, as shown in fig. 5, including:
a receiving module 401, configured to receive a download request sent by a first terminal, where the download request includes a target user identifier corresponding to a target user logged in to the first terminal and a file identifier corresponding to a file to be downloaded;
A determining module 402, configured to determine, in response to the download request, a second terminal on which the target user corresponding to the target user identifier logs in;
and the sending module 403 is configured to send a downloading instruction corresponding to the file identifier to the second terminal, so that the second terminal obtains the file to be downloaded according to the downloading instruction.
In an alternative embodiment, the transmitting module further includes:
the analysis sub-module is configured to analyze the downloading request and determine a dialogue user identifier, a message identifier and a resource locator corresponding to the file to be downloaded; the dialogue user identifier is used for representing an identifier corresponding to a user who sends the file to be downloaded to the first terminal, and the message identifier is used for representing an identifier of an instant communication message containing the file to be downloaded;
the generation sub-module is configured to generate a downloading instruction according to the target user identifier, the dialogue user identifier, the message identifier and the resource locator corresponding to the file to be downloaded;
and the first sending submodule is configured to send a downloading instruction corresponding to the file identifier to the second terminal, so that the second terminal acquires the file to be downloaded from a content distribution network corresponding to the server according to the resource locator after verifying the downloading instruction through the target user identifier, the dialogue user identifier and the message identifier.
In an alternative embodiment, the transmitting module further includes:
a determining sub-module configured to determine a state of the second terminal, the state including an online state and an offline state;
and the second sending submodule is configured to send a downloading instruction corresponding to the file identifier to a second terminal with an online state.
In an alternative embodiment, the transmitting module further includes:
the storage sub-module is configured to store the downloading instruction in the local of the server side under the condition that the second terminal in an offline state exists;
a third sending sub-module configured to continuously detect a state of the second terminal, and send the download instruction to the second terminal that is changed from the offline state to the online state if the second terminal that is changed from the offline state to the online state is detected;
and the deleting sub-module is configured to delete the downloading instructions after sending the downloading instructions to all the second terminals.
In an alternative embodiment, the apparatus further comprises:
and the deleting module is configured to send a deleting instruction to the second terminal after determining that the first terminal deletes the file to be downloaded, so that the second terminal deletes the file to be downloaded according to the deleting instruction.
In an alternative embodiment, the apparatus further comprises:
and the direct transmission module is configured to send a transmission instruction to the first terminal under the condition that the first terminal and the second terminal are determined to be in the same local area network, so that the first terminal sends the file to be downloaded to the second terminal through the local area network.
In an alternative embodiment, the receiving module further includes:
and the receiving sub-module is configured to receive a downloading request sent by the first terminal after responding to the click operation of the synchronous downloading option in an option menu, wherein the option menu is triggered by the long-press operation of the file identification of the file to be downloaded.
In summary, a file transmission device provided in an embodiment of the present application includes: the receiving module is configured to receive a downloading request sent by the first terminal, wherein the downloading request comprises a target user identifier corresponding to a target user logged in the first terminal and a file identifier corresponding to a file to be downloaded; the determining module is configured to respond to the downloading request and determine a second terminal which is logged in by the target user and corresponds to the target user identification; the sending module is configured to send a downloading instruction corresponding to the file identifier to the second terminal, so that the second terminal obtains the file to be downloaded according to the downloading instruction. The method comprises the steps that a downloading request sent by a first terminal can be received, wherein the downloading request comprises a target user identifier corresponding to a target user logged in the first terminal and a file identifier corresponding to a file to be downloaded; responding to the downloading request, and determining a second terminal for logging in by a target user corresponding to the target user identifier; and sending a downloading instruction corresponding to the file identifier to the second terminal, so that the second terminal obtains the file to be downloaded according to the downloading instruction, and therefore, a user can download the file to be downloaded to the second terminal logged in by the user only by operating the first terminal, and the user can immediately operate the file to be downloaded when switching to use the second terminal, thereby saving the user time and improving the user experience.
Fig. 6 is a block diagram of an electronic device 600, according to an example embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, an electronic device 600 may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an input/output (I/O) interface 612, a sensor component 614, and a communication component 616.
The processing component 602 generally controls overall operation of the electronic device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is used to store various types of data to support operations at the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 604 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 606 provides power to the various components of the electronic device 600. The power supply components 606 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 600.
The multimedia component 608 includes a screen between the electronic device 600 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense demarcations of touch or sliding actions, but also detect durations and pressures associated with the touch or sliding operations. In some embodiments, the multimedia component 608 includes a front camera and/or a rear camera. When the electronic device 600 is in an operational mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 610 is for outputting and/or inputting audio signals. For example, the audio component 610 includes a Microphone (MIC) for receiving external audio signals when the electronic device 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 614 includes one or more sensors for providing status assessment of various aspects of the electronic device 600. For example, the sensor assembly 614 may detect an on/off state of the electronic device 600, a relative positioning of the components, such as a display and keypad of the electronic device 600, the sensor assembly 614 may also detect a change in position of the electronic device 600 or a component of the electronic device 600, the presence or absence of a user's contact with the electronic device 600, an orientation or acceleration/deceleration of the electronic device 600, and a change in temperature of the electronic device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is utilized to facilitate communication between the electronic device 600 and other devices, either in a wired or wireless manner. The electronic device 600 may access a wireless network based on a communication standard, such as WiFi, an operator network (e.g., 2G, 3G, 4G, or 5G), or a combination thereof. In one exemplary embodiment, the communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 600 may be implemented by 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), controllers, microcontrollers, microprocessors, or other electronic elements for implementing a file transfer method as provided by embodiments of the present application.
In an exemplary embodiment, a non-transitory computer-readable storage medium is also provided, such as memory 604, including instructions executable by processor 620 of electronic device 600 to perform the above-described method. For example, the non-transitory storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Fig. 7 is a block diagram of an electronic device 700, according to an example embodiment. For example, the electronic device 700 may be provided as a server. Referring to fig. 7, electronic device 700 includes a processing component 722 that further includes one or more processors and memory resources represented by memory 732 for storing instructions, such as application programs, executable by processing component 722. The application programs stored in memory 732 may include one or more modules that each correspond to a set of instructions. In addition, the processing component 722 is configured to execute instructions to perform a file transfer method provided in the embodiments of the present application.
The electronic device 700 may also include a power supply component 726 configured to perform power management of the electronic device 700, a wired or wireless network interface 750 configured to connect the electronic device 700 to a network, and an input output (I/O) interface 758. The electronic device 700 may operate based on an operating system stored in memory 732, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, or the like.
The embodiment of the application also provides a computer program product, which comprises a computer program, wherein the computer program realizes the file transmission method when being executed by a processor.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the present application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (14)

1. A file transmission method applied to a server, the method comprising:
receiving a downloading request sent by a first terminal, wherein the downloading request comprises a target user identifier corresponding to a target user logged in the first terminal and a file identifier corresponding to a file to be downloaded;
responding to the downloading request, and determining a second terminal which corresponds to the target user identifier and is logged in by the target user;
Sending a downloading instruction corresponding to the file identifier to the second terminal so that the second terminal obtains the file to be downloaded according to the downloading instruction;
the method further comprises the steps of:
determining whether the first terminal stores the file to be downloaded;
transmitting the downloading instruction to the first terminal and the second terminal at the same time under the condition that the first terminal does not have the file to be downloaded, so that the first terminal and the second terminal synchronously download the file to be downloaded;
the file to be downloaded is a file included in an instant communication message sent to the first terminal by a terminal logged in by other users, and the sending of the downloading instruction corresponding to the file identifier to the second terminal includes:
analyzing the downloading request, and determining a dialogue user identifier, a message identifier and a resource locator corresponding to the file to be downloaded; the dialogue user identifier is used for representing an identifier corresponding to a user who sends the file to be downloaded to the first terminal, and the message identifier is used for representing an identifier of an instant communication message containing the file to be downloaded;
generating a downloading instruction according to the target user identifier, the dialogue user identifier, the message identifier and the resource locator corresponding to the file to be downloaded;
And sending a downloading instruction corresponding to the file identifier to the second terminal, so that the second terminal acquires the file to be downloaded from the content distribution network corresponding to the server according to the resource locator after verifying the downloading instruction through the target user identifier, the dialogue user identifier and the message identifier.
2. The method according to claim 1, wherein the sending, to the second terminal, the download instruction corresponding to the file identifier includes:
determining the state of the second terminal, wherein the state comprises an online state and an offline state;
and sending a downloading instruction corresponding to the file identifier to a second terminal with an online state.
3. The method according to claim 2, wherein the sending, to the second terminal, the download instruction corresponding to the file identifier further includes:
storing the downloading instruction in the local of the server under the condition that the second terminal in an offline state exists;
continuously detecting the state of the second terminal, and sending the downloading instruction to the second terminal which is converted into the online state from the offline state under the condition that the second terminal which is converted into the online state from the offline state is detected;
And deleting the downloading instruction after the downloading instruction is sent to all the second terminals.
4. The method according to claim 1, wherein the method further comprises:
and after determining that the first terminal deletes the file to be downloaded, sending a deleting instruction to the second terminal so that the second terminal deletes the file to be downloaded according to the deleting instruction.
5. The method according to claim 1, wherein the method further comprises:
and under the condition that the first terminal and the second terminal are in the same local area network, transmitting a transmission instruction to the first terminal so that the first terminal transmits the file to be downloaded to the second terminal through the local area network.
6. The method of claim 1, wherein receiving the download request sent by the first terminal comprises:
and receiving a downloading request sent by the first terminal after responding to the clicking operation of the synchronous downloading options in an option menu, wherein the option menu is triggered by the long-pressing operation of the file identification of the file to be downloaded.
7. A document transfer apparatus, the apparatus comprising:
The receiving module is configured to receive a downloading request sent by a first terminal, wherein the downloading request comprises a target user identifier corresponding to a target user logged in the first terminal and a file identifier corresponding to a file to be downloaded;
the determining module is configured to respond to the downloading request and determine a second terminal which corresponds to the target user identifier and is logged in by the target user;
the sending module is configured to send a downloading instruction corresponding to the file identifier to the second terminal so that the second terminal obtains the file to be downloaded according to the downloading instruction;
the device is also for:
determining whether the first terminal stores the file to be downloaded;
transmitting the downloading instruction to the first terminal and the second terminal at the same time under the condition that the first terminal does not have the file to be downloaded, so that the first terminal and the second terminal synchronously download the file to be downloaded;
wherein, the sending module further includes:
the analysis sub-module is configured to analyze the downloading request and determine a dialogue user identifier, a message identifier and a resource locator corresponding to the file to be downloaded; the dialogue user identifier is used for representing an identifier corresponding to a user who sends the file to be downloaded to the first terminal, and the message identifier is used for representing an identifier of an instant communication message containing the file to be downloaded;
The generation sub-module is configured to generate a downloading instruction according to the target user identifier, the dialogue user identifier, the message identifier and the resource locator corresponding to the file to be downloaded;
and the first sending submodule is configured to send a downloading instruction corresponding to the file identifier to the second terminal, so that the second terminal acquires the file to be downloaded from a content distribution network corresponding to the server according to the resource locator after verifying the downloading instruction through the target user identifier, the dialogue user identifier and the message identifier.
8. The apparatus of claim 7, wherein the means for transmitting further comprises:
a determining sub-module configured to determine a state of the second terminal, the state including an online state and an offline state;
and the second sending submodule is configured to send a downloading instruction corresponding to the file identifier to a second terminal with an online state.
9. The apparatus of claim 8, wherein the means for transmitting further comprises:
the storage sub-module is configured to store the downloading instruction in the local of the server side under the condition that the second terminal in an offline state exists;
A third sending sub-module configured to continuously detect a state of the second terminal, and send the download instruction to the second terminal that is changed from the offline state to the online state if the second terminal that is changed from the offline state to the online state is detected;
and the deleting sub-module is configured to delete the downloading instructions after sending the downloading instructions to all the second terminals.
10. The apparatus of claim 7, wherein the apparatus further comprises:
and the deleting module is configured to send a deleting instruction to the second terminal after determining that the first terminal deletes the file to be downloaded, so that the second terminal deletes the file to be downloaded according to the deleting instruction.
11. The apparatus of claim 7, wherein the apparatus further comprises:
and the direct transmission module is configured to send a transmission instruction to the first terminal under the condition that the first terminal and the second terminal are determined to be in the same local area network, so that the first terminal sends the file to be downloaded to the second terminal through the local area network.
12. The apparatus of claim 7, wherein the receiving means further comprises:
And the receiving sub-module is configured to receive a downloading request sent by the first terminal after responding to the click operation of the synchronous downloading option in an option menu, wherein the option menu is triggered by the long-press operation of the file identification of the file to be downloaded.
13. An electronic device, comprising: a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of any one of claims 1 to 6.
14. A computer readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of claims 1 to 6.
CN202111237398.7A 2021-10-22 2021-10-22 File transmission method and device and electronic equipment Active CN114024953B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111237398.7A CN114024953B (en) 2021-10-22 2021-10-22 File transmission method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111237398.7A CN114024953B (en) 2021-10-22 2021-10-22 File transmission method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN114024953A CN114024953A (en) 2022-02-08
CN114024953B true CN114024953B (en) 2024-02-23

Family

ID=80057379

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111237398.7A Active CN114024953B (en) 2021-10-22 2021-10-22 File transmission method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114024953B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104378435A (en) * 2014-11-20 2015-02-25 北京安奇智联科技有限公司 Method for transmitting file between browser of computing device and mobile terminal
CN104967646A (en) * 2014-10-27 2015-10-07 腾讯科技(深圳)有限公司 File downloading method and apparatus
CN111294396A (en) * 2020-01-20 2020-06-16 咪咕数字传媒有限公司 File transmission method and device, electronic equipment and storage medium
CN112087362A (en) * 2019-06-13 2020-12-15 腾讯科技(深圳)有限公司 Message forwarding method and device between clients and terminal
CN112231603A (en) * 2020-11-02 2021-01-15 深圳市欢太科技有限公司 File downloading method, server, client and storage medium
CN112243038A (en) * 2020-11-02 2021-01-19 深圳市欢太科技有限公司 Downloading method, terminal and computer storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104967646A (en) * 2014-10-27 2015-10-07 腾讯科技(深圳)有限公司 File downloading method and apparatus
CN104378435A (en) * 2014-11-20 2015-02-25 北京安奇智联科技有限公司 Method for transmitting file between browser of computing device and mobile terminal
CN112087362A (en) * 2019-06-13 2020-12-15 腾讯科技(深圳)有限公司 Message forwarding method and device between clients and terminal
CN111294396A (en) * 2020-01-20 2020-06-16 咪咕数字传媒有限公司 File transmission method and device, electronic equipment and storage medium
CN112231603A (en) * 2020-11-02 2021-01-15 深圳市欢太科技有限公司 File downloading method, server, client and storage medium
CN112243038A (en) * 2020-11-02 2021-01-19 深圳市欢太科技有限公司 Downloading method, terminal and computer storage medium

Also Published As

Publication number Publication date
CN114024953A (en) 2022-02-08

Similar Documents

Publication Publication Date Title
CN106603667B (en) Screen information sharing method and device
CN106791892B (en) Method, device and system for live broadcasting of wheelhouses
CN106878445B (en) Resource file updating method and device
CN106170004B (en) Method and device for processing verification code
CN109219036B (en) Method and device for unbinding equipment and electronic equipment
CN105183513A (en) Application recommendation method and apparatus
CN107094094B (en) Application networking method and device and terminal
CN108156271B (en) Communication method and device and electronic equipment
KR20170126388A (en) Method, device and system for executing business process
CN117390330A (en) Webpage access method and device
CN110740091B (en) Processing method and device for sharing message, electronic equipment and readable storage medium
CN109302341B (en) Instant messaging method, instant messaging device, electronic equipment and storage medium
CN109525652B (en) Information sharing method, device, equipment and storage medium
CN111338971B (en) Application testing method and device, electronic equipment and storage medium
CN110619097A (en) Two-dimensional code generation method and device, electronic equipment and storage medium
CN113204759A (en) Identity authentication method and device, electronic equipment and storage medium
CN108153832B (en) Push information display method and device
CN107423146B (en) Method, device and system for controlling mutual calling of application programs
CN109246094B (en) User terminal verification method, device and storage medium
CN103491067A (en) Multimedia interaction system and method
CN109218375B (en) Application interaction method and device
CN114374560A (en) Data processing method, device and storage medium
CN109885360B (en) Data processing method, device and storage medium
CN111782997A (en) Method and device for loading webpage and storage medium
CN114024953B (en) File transmission method and device and electronic equipment

Legal Events

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