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

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

Info

Publication number
CN114006897A
CN114006897A CN202111261065.8A CN202111261065A CN114006897A CN 114006897 A CN114006897 A CN 114006897A CN 202111261065 A CN202111261065 A CN 202111261065A CN 114006897 A CN114006897 A CN 114006897A
Authority
CN
China
Prior art keywords
link
file
target file
file link
operation request
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
CN202111261065.8A
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.)
Beijing Youzhuju Network Technology Co Ltd
Original Assignee
Beijing Youzhuju Network 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 Youzhuju Network Technology Co Ltd filed Critical Beijing Youzhuju Network Technology Co Ltd
Priority to CN202111261065.8A priority Critical patent/CN114006897A/en
Publication of CN114006897A publication Critical patent/CN114006897A/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
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the disclosure discloses a file transmission method, a device, a server and a storage medium, wherein the method comprises the following steps: responding to an operation request for acquiring a target file link, and acquiring first authentication information of the target file link and second authentication information of the operation request; the first authentication information and the second authentication information both comprise scene information; the scene information comprises a client identifier and/or a session page identifier; judging whether the scene information linked with the target file is the same as the scene information of the operation request or not; and if the scene information of the target file link is the same as the scene information of the operation request, responding to the operation request of the target file link. According to the technical scheme of the embodiment of the disclosure, the file transmission is realized, the security of the file link is ensured, even if the file link is leaked, a user cannot open the file in other modes except a transmission channel, and the file leakage is avoided.

Description

File transmission method, device, server and storage medium
Technical Field
The present disclosure relates to software technologies and communications technologies, and in particular, to a file transmission method, an apparatus, a server, and a storage medium.
Background
Today, with the rapid development of network technology, diversified social software appears in the sight of people, and the transmission and acquisition of electronic files (such as voice files, video files, text files and the like) also become important functional components of the social software.
The files sent by both parties of the session in the social software are all sent in a link form, namely, the server firstly obtains the file sent by the sender, stores the file in the local, and then sends the link of the locally stored file to the receiver, and the receiver and the sender can browse and download the file through the link.
However, in such a file transmission manner, once the link is leaked, any user can acquire the file content through the link, which causes file leakage, and thus, the existing file transmission manner has a serious security risk.
Disclosure of Invention
The disclosure provides a file transmission method, a file transmission device, a server and a storage medium, which are used for responding to an operation request when a target file link is matched with scene information of the operation request.
In a first aspect, an embodiment of the present disclosure provides a file transmission method, including:
responding to an operation request for acquiring a target file link, and acquiring first authentication information of the target file link and second authentication information of the operation request; wherein the first authentication information and the second authentication information both include context information; the scene information comprises a client identifier and/or a session page identifier;
judging whether the scene information linked with the target file is the same as the scene information of the operation request or not;
and if the scene information of the target file link is the same as the scene information of the operation request, responding to the operation request of the target file link.
In a second aspect, an embodiment of the present disclosure provides a file transfer device, including:
the authentication information acquisition module is used for responding to an operation request for acquiring a target file link, and acquiring first authentication information of the target file link and second authentication information of the operation request; wherein the first authentication information and the second authentication information both include context information; the scene information comprises a client identifier and/or a session page identifier;
the scene information judging module is used for judging whether the scene information linked with the target file is the same as the scene information of the operation request or not;
and the response execution module is used for responding to the operation request linked by the target file if the scene information linked by the target file is the same as the scene information of the operation request.
In a third aspect, an embodiment of the present disclosure provides a server, which includes a memory, a processing device, and a computer program stored in the memory and executable on the processing device, where the processing device implements the file transfer method according to any embodiment of the present disclosure when executing the computer program.
In a fourth aspect, embodiments of the present disclosure provide a storage medium containing computer-executable instructions for performing the file transfer method of any of the embodiments of the present disclosure when executed by a computer processor.
According to the technical scheme of the embodiment of the disclosure, after the operation request linked to the target file is obtained, if the client identifier and the session page identifier of the link of the target file are determined to be the same as the client identifier and the session page identifier of the operation request, it is indicated that the operation execution channel of the file is the same as the transmission channel of the file, and the operation request is responded through the stored target file, so that the security of the link of the file is ensured while the file transmission is realized, and even if the link of the file is leaked, the user cannot open the file through other modes except the transmission channel, and the file leakage is avoided.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a flow chart of one embodiment of a file transfer method of the present disclosure;
FIG. 2A is a flow chart of one embodiment of a file transfer method of the present disclosure;
FIG. 2B is a flowchart of a disclosed file transfer method according to an exemplary application scenario of the present disclosure;
fig. 2C is a flowchart of a file transfer method disclosed in the second specific application scenario of the present disclosure;
fig. 3 is a block diagram of a file transfer apparatus according to a third embodiment of the present disclosure;
fig. 4 is a block diagram of a server in a fourth embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Example one
Fig. 1 is a flowchart of a file transmission method provided in an embodiment of the present disclosure, where this embodiment is applicable to a user obtaining a transmission file in a session page of a client, and the method may be executed by a file transmission apparatus in an embodiment of the present disclosure, where the apparatus may be implemented by software and/or hardware and integrated in a server, and may typically be integrated in a service server of social software, where the method specifically includes the following steps:
s110, responding to an operation request for obtaining a target file link, obtaining first authentication information of the target file link and second authentication information of the operation request; wherein the first authentication information and the second authentication information both include context information; the scene information comprises a client identification and/or a session page identification.
When a user transmits a file through a session page of a client, a server locally stores an acquired file to be transmitted, sends the stored file to a file receiver in a URL (uniform Resource locator) link (namely a file link), and simultaneously adds first authentication information into the file link; in the embodiment of the present disclosure, the server may provide a file transfer function for one or more types of clients; a session page identifier in the first authentication information, that is, identifier information of a session page used when a user transmits a file; the server can set a unique session page identifier for each session page according to the participants of the session and the creation time of the session; and after acquiring the operation request of the target file link, the server acquires the first authentication information by analyzing the target file link.
The client identifier in the second authentication information is the identifier information of the application program which sends the current operation request, and the session page identifier in the second authentication information is the identifier information of the session page which sends the current operation request; and after the server acquires the operation request linked with the target file, acquiring the second authentication information by analyzing the operation request.
S120, judging whether the scene information linked with the target file is the same as the scene information of the operation request or not.
S130, if the scene information of the target file link is the same as the scene information of the operation request, responding to the operation request of the target file link.
The client identification is used as authentication information, so that a user can only execute specific operations such as browsing, downloading and the like in the client for transmitting the file, the operation execution channel of the file is ensured to be the same as the transmission channel of the file, and the safety of file operation is improved; the session page identification is used as authentication information, so that a user can only execute specific operations such as browsing, downloading and the like in the session page for transmitting the file, the operation page of the file is ensured to be the same as the transmission page of the file, and the security of the file operation is further improved; the file link substantially reflects the storage address of the file in the server, so that the server sends the content information of the file to the sending client of the operation request according to the locally stored file after verifying that the operation request of the target file link is valid so as to respond to the operation request of the target file link; and if the scene information of the target file link is different from the scene information of the operation request, rejecting the operation request for executing the target file link, and returning a relevant prompt of scene information authentication failure to the sending client of the operation request so as to prompt the sending client to execute the file operation in a correct client and/or session page.
Optionally, in this embodiment of the present disclosure, the first authentication information further includes sending end identity information and receiving end identity information; the second authentication information also comprises sending end identity information; the responding to the operation request of the target file link specifically includes: judging whether the sending end identity information of the operation request is the same as the sending end identity information or the receiving end identity information linked with the target file; and if the transmitting end identity information of the operation request is the same as the transmitting end identity information or the receiving end identity information linked with the target file, responding to the operation request linked with the target file. The identity information comprises related information reflecting the identity of the user, such as a user account, a user Cookie and the like; the Cookie is a small text file, and is data information which is stored on a local terminal of the user by the server for identifying the identity of the user and performing Session tracking; because the Cookie is encrypted during storage, the Cookie is used as the identity information of the user, and the safety of user identity authentication is improved.
Specifically, when a user transmits a file through a session page of a client, a server adds identity information of a file transmitting end and a file receiving end into a file link; after acquiring the target file link, the server can acquire the identity information of the file sending end and the file receiving end by analyzing the target file link, and acquire the sending end of the operation request by analyzing the operation request, wherein if the sending end of the operation request is one of the file sending end and the file receiving end, the sending end indicates that the current user has the execution authority to the file, and the operation request of the target file link is responded; if the sender of the operation request is not one of the file sender and the file receiver, which indicates that the current user does not have the execution authority on the file, the operation request linked with the target file is refused to be executed, and a relevant prompt of failure of identity information authentication is returned to the sending client of the operation request, so as to prompt the sending client to use correct identity information and execute the file operation.
Optionally, in this embodiment of the present disclosure, the responding to the operation request of the target file link includes: acquiring the effective time of the target file link, and judging whether the effective time of the target file link is expired; if the effective time of the target file link is over, acquiring an update file link matched with the target file link; sending the updated file link to a sending end of the operation request, so that the target file link is replaced by the updated file link in the sending end, and the operation request of the target file link is responded according to the updated file link; wherein the valid time of the update file link is different from the valid time of the target file link, and the first authentication information of the update file link is the same as the first authentication information of the target file link.
Specifically, the file link reflects the storage address of the file, and the effective time of the file link reflects the storage time of the file at the storage address; the file link exceeding the effective time cannot acquire the target file through the storage address in the link, but in the server, the target file may not be deleted, but only the storage position is modified, for example, the file stored in the real-time database is modified to be stored in the historical database, so that the functional support of the server on the current active session page is ensured, and the review of the historical information by each client is also ensured; if the target file is linked within the effective time, directly acquiring the matched target file according to the storage address of the target file link, and responding to the operation request of the target file link; if the target file link is not in the effective time, generating a new file link through a preset update interface, namely updating the file link; compared with the original target file link, the storage address of the updated file link may be changed or may not be changed, and is determined by the current actual storage address of the target file; the effective time is prolonged, namely the effective time in the updated file link is longer than the effective time of the target file link, and the authentication information is kept unchanged; after the updated file link is sent to the client sending the operation request, the accuracy of the file link in the client sending is ensured, and meanwhile, the stored target file is obtained according to the updated file link so as to respond to the operation request of the target file link; as long as the server does not delete the corresponding target file, the server can be valid for the time, but the authenticated file link is continuously updated to ensure the user to look back the history file.
Optionally, in this embodiment of the present disclosure, after obtaining the updated file link matched with the target file link, the method further includes: locally mapping the target file link and the updated file link, and adding a mapping result into a link mapping table; and responding to the operation request of the target file link according to the updated file link. After the server obtains the updated file link, the server can only map the target file link and the updated file link to form a link mapping pair and add the link mapping pair into a link mapping table, and the updated file link is not sent to the client sending the operation request, so that the stability of data information in the client is ensured; when the server obtains that the target file link is expired, the server can directly respond to the operation request of the target file link according to the associated mapping in the link mapping table.
Optionally, in this embodiment of the present disclosure, the acquiring an updated file link matched with the target file link further includes: judging whether an updated file link matched with the target file link exists in a link mapping table; if the link mapping table does not have an updated file link matched with the target file link, generating an updated file link matched with the target file link; and if the link mapping table has the updated file link matched with the target file link, acquiring the updated file link matched with the target file link through the link mapping table, and responding to the operation request of the target file link according to the updated file link. If the target file link passes the authentication and the effective time is over, judging whether a matched updated file link exists in the link mapping table; if yes, directly responding to the operation request of the target file link according to the matched updated file link in the link mapping table so as to reduce the updating times of the expired file link and improve the transmission efficiency of the file; if the updated file link does not exist, according to the technical scheme, the matched updated file link is generated, so that the review response of the file link with the expired effective time is realized.
According to the technical scheme of the embodiment of the disclosure, after the operation request linked to the target file is obtained, if the client identifier and the session page identifier of the link of the target file are determined to be the same as the client identifier and the session page identifier of the operation request, it is indicated that the operation execution channel of the file is the same as the transmission channel of the file, and the operation request is responded through the stored target file, so that the security of the link of the file is ensured while the file transmission is realized, and even if the link of the file is leaked, the user cannot open the file through other modes except the transmission channel, and the file leakage is avoided.
Example two
Fig. 2A is a file transmission method provided in an embodiment of the present disclosure, which is embodied on the basis of the above embodiment, in the embodiment of the present disclosure, a server sets different effective times for different files to be transmitted, and the method specifically includes:
s210, responding to the acquired file to be transmitted, storing the file to be transmitted, and acquiring a file link of the file to be transmitted.
S220, obtaining the effective time of the file to be transmitted according to at least one of the file size, the file type and the first authentication information of the file to be transmitted.
The larger the capacity of the file to be transmitted is, the larger the occupied storage space is, so that in order to avoid long-time occupation of the storage resource of the server by the large-capacity file, the shorter effective time can be set for the large-capacity file, and the longer effective time is set for the small-capacity file, so that the review support of the file is realized; different text types have different implemented file functions, for example, a text file usually records more important character information, and a user usually needs to review for many times to completely acquire specific file contents, so that a longer effective time is set for the text file; and the user usually needs to browse the specific file content once to obtain the specific file content without reviewing for many times, so that a short effective time is set for the files of the types.
Different clients also set different effective time according to different session functions born by the clients, for example, the client used for communication between employees in work generally transmits files which are formal work files, so that longer effective time is set; the client is used for communication among strangers in amateur life, and the transmitted files are usually non-working files with entertainment property, so that shorter effective time is set; different session pages can be set with different effective time according to the updating frequency of the session messages and the number of the session participants, the faster the updating frequency of the session messages is, the more the session participants are, the higher the activity of the users in the session pages is shown, and the longer effective time is configured for the files transmitted in the session pages, so that the review efficiency of the history files in the active session is improved.
And S230, adding the effective time into the file link, and sending the file link to a receiving end of the file to be transmitted.
S240, responding to an operation request for obtaining a target file link, and obtaining first authentication information of the target file link and second authentication information of the operation request; wherein the first authentication information and the second authentication information both include context information; the scene information comprises a client identification and/or a session page identification.
And S250, judging whether the scene information linked with the target file is the same as the scene information of the operation request or not.
And S260, responding to the operation request linked by the target file if the scene information linked by the target file is the same as the scene information of the operation request.
According to the technical scheme of the embodiment, when the server transmits the file, effective time is added into file links of different files to be transmitted according to the difference of the file size and the file type of the file to be transmitted and the difference of the client and the session page used in transmission, so that the file review function of a user is ensured, meanwhile, the occupation of large-capacity files such as video files, voice files and picture files on storage resources is avoided, and the review efficiency of historical files in active sessions is improved.
Specific application scenario one
Fig. 2B is a file transmission method provided in a first specific application scenario of the present disclosure, in which an updated file link is sent to a sending end of an operation request, so that the target file link is replaced by the updated file link at the sending end, and the method specifically includes:
s310, responding to an operation request for obtaining a target file link, obtaining first authentication information of the target file link and second authentication information of the operation request; wherein the first authentication information and the second authentication information both include context information; the scene information comprises a client identifier and/or a session page identifier; the first authentication information also comprises sending end identity information and receiving end identity information; the second authentication information also comprises sending end identity information; s320 is performed.
S320, judging whether the scene information linked with the target file is the same as the scene information of the operation request or not; if yes, go to S330; if not, go to S380.
S330, judging whether the sending end identity information of the operation request is the same as the sending end identity information or the receiving end identity information linked with the target file; if yes, go to S340; if not, go to S380.
S340, obtaining the effective time of the target file link; s350 is performed.
S350, judging whether the effective time of the target file link is expired; if yes, executing S360; if not, go to S390.
S360, acquiring an update file link matched with the target file link; s370 is performed.
S370, sending the updated file link to the sending end of the operation request, so that the target file link is replaced by the updated file link in the sending end; s390 is executed.
And S380, refusing to respond to the operation request of the target file link.
And S390, responding to the operation request of the target file link.
According to the technical scheme of the embodiment, when the client identification and the session page identification which are linked by the target file are determined to be the same as the client identification and the session page identification of the operation request, and the sending end identity information of the operation request is the same as the sending end identity information or the receiving end identity information which are linked by the target file, if the effective time of the link of the target file is over, the updated file link is sent to the sending client of the operation request, so that the accuracy of file link in the sending client is ensured, the safety of the file link is improved, and file leakage is avoided.
Specific application scenario two
Fig. 2C is a file transfer method provided in a specific application scenario two of the present disclosure, in which a target file link and an updated file link are locally mapped, and the method specifically includes:
s401, responding to an operation request for obtaining a target file link, obtaining first authentication information of the target file link and second authentication information of the operation request; wherein the first authentication information and the second authentication information both include context information; the scene information comprises a client identifier and/or a session page identifier; the first authentication information also comprises sending end identity information and receiving end identity information; the second authentication information also comprises sending end identity information; s402 is performed.
S402, judging whether the scene information linked with the target file is the same as the scene information of the operation request or not; if yes, executing S403; if not, go to step S410.
S403, judging whether the sending end identity information of the operation request is the same as the sending end identity information or the receiving end identity information linked with the target file; if yes, go to S404; if not, go to step S410.
S404, obtaining the effective time of the target file link; s405 is executed.
S405, judging whether the effective time of the target file link is expired; if yes, go to step S406; if not, go to S411.
S406, judging whether an updated file link matched with the target file link exists in a link mapping table; if not, executing S407; if yes, go to step S409.
S407, generating an update file link matched with the target file link; s408 is performed.
S408, locally mapping the target file link and the updated file link, and adding a mapping result into a link mapping table; s411 is executed.
S409, acquiring an updated file link matched with the target file link through the link mapping table; s411 is executed.
S410, refusing the operation request for responding the target file link.
S411, responding to the operation request of the target file link.
According to the technical scheme of the embodiment, when the client identification and the session page identification which are linked by the target file are determined to be the same as the client identification and the session page identification of the operation request, and the sending end identity information of the operation request is the same as the sending end identity information or the receiving end identity information of the target file link, if the effective time of the target file link is over, the target file link and the updated file link are subjected to local mapping, and the updated file link is not sent to the sending client of the operation request, so that the stability of data information in the client is ensured, the safety of the file link is improved, and the leakage phenomenon of the file is avoided.
EXAMPLE III
Fig. 3 is a block diagram of a file transfer device according to a third embodiment of the present disclosure, which specifically includes: an authentication information acquisition module 310, a scene information judgment module 320 and a response execution module 330;
an authentication information obtaining module 310, configured to, in response to an operation request for obtaining a target file link, obtain first authentication information of the target file link and second authentication information of the operation request; wherein the first authentication information and the second authentication information both include context information; the scene information comprises a client identifier and/or a session page identifier;
a scene information determining module 320, configured to determine whether the scene information linked to the target file is the same as the scene information of the operation request;
the response execution module 330 is configured to respond to the operation request linked to the target file if the scene information of the target file link is the same as the scene information of the operation request.
According to the technical scheme of the embodiment of the disclosure, after the operation request linked to the target file is obtained, if the client identifier and the session page identifier of the link of the target file are determined to be the same as the client identifier and the session page identifier of the operation request, it is indicated that the operation execution channel of the file is the same as the transmission channel of the file, and the operation request is responded through the stored target file, so that the security of the link of the file is ensured while the file transmission is realized, and even if the link of the file is leaked, the user cannot open the file through other modes except the transmission channel, and the file leakage is avoided.
Optionally, on the basis of the above technical solution, the first authentication information further includes sending end identity information and receiving end identity information; the second authentication information further comprises sending end identity information.
Optionally, on the basis of the above technical solution, the file transmission apparatus further includes:
and the identity information judging module is used for judging whether the sending end identity information of the operation request is the same as the sending end identity information or the receiving end identity information linked with the target file.
Optionally, on the basis of the foregoing technical solution, the response execution module 330 is specifically configured to respond to the operation request linked to the target file if the sender identity information of the operation request is the same as the sender identity information or the receiver identity information linked to the target file.
Optionally, on the basis of the above technical solution, the file transmission apparatus further includes:
the effective time judging module is used for acquiring the effective time of the target file link and judging whether the effective time of the target file link is expired or not;
and the update file link acquisition module is used for acquiring an update file link matched with the target file link if the effective time of the target file link is over.
Optionally, on the basis of the foregoing technical solution, the response execution module 330 is specifically configured to send the updated file link to a sending end of the operation request, so that in the sending end, the target file link is replaced by the updated file link, and the operation request of the target file link is responded according to the updated file link; wherein the valid time of the update file link is different from the valid time of the target file link, and the first authentication information of the update file link is the same as the first authentication information of the target file link.
Optionally, on the basis of the above technical solution, the response execution module 330 is further specifically configured to perform local mapping on the target file link and the updated file link, add a mapping result to a link mapping table, and respond to the operation request of the target file link according to the updated file link.
Optionally, on the basis of the above technical solution, the updating the file link obtaining module specifically includes:
a link mapping table judging unit, configured to judge whether an updated file link matching the target file link exists in a link mapping table;
and the update file link obtaining unit is used for generating an update file link matched with the target file link if the update file link matched with the target file link does not exist in the link mapping table.
Optionally, on the basis of the above technical solution, the response execution module 330 is further specifically configured to, if an updated file link matching the target file link exists in the link mapping table, obtain, through the link mapping table, the updated file link matching the target file link, and respond to the operation request of the target file link according to the updated file link.
Optionally, on the basis of the above technical solution, the file transmission apparatus further includes:
the transmission file acquisition module is used for responding to the acquisition of the file to be transmitted, storing the file to be transmitted and acquiring a file link of the file to be transmitted;
the effective time obtaining module is used for obtaining the effective time of the file to be transmitted according to at least one of the file size, the file type and the first authentication information of the file to be transmitted;
and the transmission file sending module is used for adding the effective time of the file to be transmitted into the file link and sending the file link to a receiving end of the file to be transmitted.
The device can execute the file transmission method provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the execution method. Technical details that are not elaborated in this embodiment may be referred to a method provided by any embodiment of the present disclosure.
Example four
FIG. 4 illustrates a schematic diagram of a server 400 suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The server shown in fig. 4 is only an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, the server 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage device 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the server 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the server 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 illustrates a server 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the server; or may exist separately and not be assembled into the server.
The computer readable medium carries one or more programs which, when executed by the server, cause the server to: responding to an operation request for acquiring a target file link, and acquiring first authentication information of the target file link and second authentication information of the operation request; wherein the first authentication information and the second authentication information both include context information; the scene information comprises a client identifier and/or a session page identifier; judging whether the scene information linked with the target file is the same as the scene information of the operation request or not; and if the scene information of the target file link is the same as the scene information of the operation request, responding to the operation request of the target file link.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. Here, the name of the module does not constitute a limitation to the module itself in some cases, for example, the update file link acquisition module may be described as "for acquiring an update file link matching the target file link if the valid time of the target file link has expired". The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, [ example 1 ] there is provided a file transfer method including:
responding to an operation request for acquiring a target file link, and acquiring first authentication information of the target file link and second authentication information of the operation request; wherein the first authentication information and the second authentication information both include context information; the scene information comprises a client identifier and/or a session page identifier;
judging whether the scene information linked with the target file is the same as the scene information of the operation request or not;
and if the scene information of the target file link is the same as the scene information of the operation request, responding to the operation request of the target file link.
According to one or more embodiments of the present disclosure, [ example 2 ] there is provided the method of example 1, the first authentication information further includes transmitting end identity information and receiving end identity information; the second authentication information also comprises sending end identity information; the method further comprises the following steps:
judging whether the sending end identity information of the operation request is the same as the sending end identity information or the receiving end identity information linked with the target file;
and if the transmitting end identity information of the operation request is the same as the transmitting end identity information or the receiving end identity information linked with the target file, responding to the operation request linked with the target file.
According to one or more embodiments of the present disclosure, [ example 3 ] there is provided the method of example 1 or 2, further comprising:
acquiring the effective time of the target file link, and judging whether the effective time of the target file link is expired;
if the effective time of the target file link is over, acquiring an update file link matched with the target file link;
sending the updated file link to a sending end of the operation request, so that the target file link is replaced by the updated file link in the sending end, and the operation request of the target file link is responded according to the updated file link;
wherein the valid time of the update file link is different from the valid time of the target file link, and the first authentication information of the update file link is the same as the first authentication information of the target file link.
According to one or more embodiments of the present disclosure, [ example 4 ] there is provided the method of example 3, further comprising:
and locally mapping the target file link and the updated file link, adding a mapping result into a link mapping table, and responding to an operation request of the target file link according to the updated file link.
In accordance with one or more embodiments of the present disclosure, [ example 5 ] there is provided the method of example 4, further comprising:
judging whether an updated file link matched with the target file link exists in a link mapping table;
and if the link mapping table does not have the updated file link matched with the target file link, generating the updated file link matched with the target file link.
According to one or more embodiments of the present disclosure, [ example 6 ] there is provided the method of example 5, further comprising:
and if the link mapping table has the updated file link matched with the target file link, acquiring the updated file link matched with the target file link through the link mapping table, and responding to the operation request of the target file link according to the updated file link.
According to one or more embodiments of the present disclosure, [ example 7 ] there is provided the method of any one of examples 1-6, further comprising:
responding to the acquired file to be transmitted, storing the file to be transmitted, and acquiring a file link of the file to be transmitted;
acquiring the effective time of the file to be transmitted according to at least one of the file size, the file type and the first authentication information of the file to be transmitted;
and adding the effective time of the file to be transmitted into the file link, and sending the file link to a receiving end of the file to be transmitted.
According to one or more embodiments of the present disclosure, [ example 8 ] there is provided a file transfer apparatus including:
the authentication information acquisition module is used for responding to an operation request for acquiring a target file link, and acquiring first authentication information of the target file link and second authentication information of the operation request; wherein the first authentication information and the second authentication information both include context information; the scene information comprises a client identifier and/or a session page identifier;
the scene information judging module is used for judging whether the scene information linked with the target file is the same as the scene information of the operation request or not;
and the response execution module is used for responding to the operation request linked by the target file if the scene information linked by the target file is the same as the scene information of the operation request.
According to one or more embodiments of the present disclosure, [ example 9 ] there is provided the apparatus of example 8, the first authentication information further comprising transmitting end identity information and receiving end identity information; the second authentication information further includes sender identity information, and the apparatus includes:
and the identity information judging module is used for judging whether the sending end identity information of the operation request is the same as the sending end identity information or the receiving end identity information linked with the target file.
And the response execution module is specifically configured to respond to the operation request linked to the target file if the sender identity information of the operation request is the same as the sender identity information or the receiver identity information linked to the target file.
According to one or more embodiments of the present disclosure, [ example 10 ] there is provided the apparatus of example 8 or 9, comprising:
the effective time judging module is used for acquiring the effective time of the target file link and judging whether the effective time of the target file link is expired or not;
and the update file link acquisition module is used for acquiring an update file link matched with the target file link if the effective time of the target file link is over.
A response execution module, configured to send the updated file link to a sending end of the operation request, so that the target file link is replaced by the updated file link in the sending end, and the operation request of the target file link is responded according to the updated file link;
wherein the valid time of the update file link is different from the valid time of the target file link, and the first authentication information of the update file link is the same as the first authentication information of the target file link.
According to one or more embodiments of the present disclosure, [ example 11 ] there is provided the apparatus of example 10, the response performing module is further configured to map the target file link and the updated file link locally, add a mapping result to a link mapping table, and respond to the operation request of the target file link according to the updated file link.
According to one or more embodiments of the present disclosure, [ example 12 ] there is provided the apparatus of example 11, the update file link obtaining module, specifically comprising:
a link mapping table judging unit, configured to judge whether an updated file link matching the target file link exists in a link mapping table;
and the update file link obtaining unit is used for generating an update file link matched with the target file link if the update file link matched with the target file link does not exist in the link mapping table.
According to one or more embodiments of the present disclosure, [ example 13 ] there is provided the apparatus of example 12, the response execution module is further specifically configured to, if an updated file link matching the target file link exists in the link mapping table, obtain, through the link mapping table, the updated file link matching the target file link, and respond to the operation request of the target file link according to the updated file link.
According to one or more embodiments of the present disclosure, [ example 14 ] there is provided the apparatus of any one of examples 8-13, further comprising:
the transmission file acquisition module is used for responding to the acquisition of the file to be transmitted, storing the file to be transmitted and acquiring a file link of the file to be transmitted;
the effective time obtaining module is used for obtaining the effective time of the file to be transmitted according to at least one of the file size, the file type and the first authentication information of the file to be transmitted;
and the transmission file sending module is used for adding the effective time of the file to be transmitted into the file link and sending the file link to a receiving end of the file to be transmitted.
According to one or more embodiments of the present disclosure, [ example 15 ] there is provided a server comprising a memory, a processing device, and a computer program stored on the memory and executable on the processing device, the processing device implementing the file transfer method as in any of examples 1-7 when executing the program.
According to one or more embodiments of the present disclosure, [ example 16 ] there is provided a storage medium containing computer-executable instructions which, when executed by a computer processor, are for performing the file transfer method of any of examples 1-7.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A method for file transfer, comprising:
responding to an operation request for acquiring a target file link, and acquiring first authentication information of the target file link and second authentication information of the operation request; wherein the first authentication information and the second authentication information both include context information; the scene information comprises a client identifier and/or a session page identifier;
judging whether the scene information linked with the target file is the same as the scene information of the operation request or not;
and if the scene information of the target file link is the same as the scene information of the operation request, responding to the operation request of the target file link.
2. The method of claim 1, wherein the first authentication information further comprises sender identity information and receiver identity information; the second authentication information also comprises sending end identity information;
the responding to the operation request of the target file link specifically includes:
judging whether the sending end identity information of the operation request is the same as the sending end identity information or the receiving end identity information linked with the target file;
and if the transmitting end identity information of the operation request is the same as the transmitting end identity information or the receiving end identity information linked with the target file, responding to the operation request linked with the target file.
3. The method according to claim 1 or 2, wherein the responding to the operation request of the target file link comprises:
acquiring the effective time of the target file link, and judging whether the effective time of the target file link is expired;
if the effective time of the target file link is over, acquiring an update file link matched with the target file link;
sending the updated file link to a sending end of the operation request, so that the target file link is replaced by the updated file link in the sending end, and the operation request of the target file link is responded according to the updated file link;
wherein the valid time of the update file link is different from the valid time of the target file link, and the first authentication information of the update file link is the same as the first authentication information of the target file link.
4. The method of claim 3, after obtaining the updated file link matching the target file link, further comprising:
and locally mapping the target file link and the updated file link, adding a mapping result into a link mapping table, and responding to an operation request of the target file link according to the updated file link.
5. The method of claim 4, wherein obtaining the updated file link matching the target file link further comprises:
judging whether an updated file link matched with the target file link exists in a link mapping table;
and if the link mapping table does not have the updated file link matched with the target file link, generating the updated file link matched with the target file link.
6. The method of claim 5, wherein after determining whether there is an updated file link matching the target file link in the link mapping table, further comprising:
and if the link mapping table has the updated file link matched with the target file link, acquiring the updated file link matched with the target file link through the link mapping table, and responding to the operation request of the target file link according to the updated file link.
7. The method according to any one of claims 1 to 6, wherein the file transfer method further comprises:
responding to the acquired file to be transmitted, storing the file to be transmitted, and acquiring a file link of the file to be transmitted;
acquiring the effective time of the file to be transmitted according to at least one of the file size, the file type and the first authentication information of the file to be transmitted;
and adding the effective time of the file to be transmitted into the file link, and sending the file link to a receiving end of the file to be transmitted.
8. A file transfer apparatus, comprising:
the authentication information acquisition module is used for responding to an operation request for acquiring a target file link, and acquiring first authentication information of the target file link and second authentication information of the operation request; wherein the first authentication information and the second authentication information both include context information; the scene information comprises a client identifier and/or a session page identifier;
the scene information judging module is used for judging whether the scene information linked with the target file is the same as the scene information of the operation request or not;
and the response execution module is used for responding to the operation request linked by the target file if the scene information linked by the target file is the same as the scene information of the operation request.
9. A server comprising a memory, processing means and a computer program stored on the memory and executable on the processing means, characterized in that the processing means when executing the program implements the file transfer method according to any of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the file transfer method of any of claims 1-7 when executed by a computer processor.
CN202111261065.8A 2021-10-28 2021-10-28 File transmission method, device, server and storage medium Pending CN114006897A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111261065.8A CN114006897A (en) 2021-10-28 2021-10-28 File transmission method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111261065.8A CN114006897A (en) 2021-10-28 2021-10-28 File transmission method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN114006897A true CN114006897A (en) 2022-02-01

Family

ID=79924532

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111261065.8A Pending CN114006897A (en) 2021-10-28 2021-10-28 File transmission method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN114006897A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1842793A (en) * 2003-08-29 2006-10-04 皇家飞利浦电子股份有限公司 File migration history controls updating of pointers
CN104750805A (en) * 2015-03-24 2015-07-01 联想(北京)有限公司 Information processing method and electronic equipment
CN106487812A (en) * 2016-12-02 2017-03-08 努比亚技术有限公司 A kind of method for authenticating and device
CN106549925A (en) * 2015-09-23 2017-03-29 阿里巴巴集团控股有限公司 Prevent method, the apparatus and system of cross-site request forgery
CN108268609A (en) * 2017-12-29 2018-07-10 新浪网技术(中国)有限公司 A kind of foundation of file path, access method and device
CN112491695A (en) * 2020-11-25 2021-03-12 上海中通吉网络技术有限公司 File sharing method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1842793A (en) * 2003-08-29 2006-10-04 皇家飞利浦电子股份有限公司 File migration history controls updating of pointers
CN104750805A (en) * 2015-03-24 2015-07-01 联想(北京)有限公司 Information processing method and electronic equipment
CN106549925A (en) * 2015-09-23 2017-03-29 阿里巴巴集团控股有限公司 Prevent method, the apparatus and system of cross-site request forgery
CN106487812A (en) * 2016-12-02 2017-03-08 努比亚技术有限公司 A kind of method for authenticating and device
CN108268609A (en) * 2017-12-29 2018-07-10 新浪网技术(中国)有限公司 A kind of foundation of file path, access method and device
CN112491695A (en) * 2020-11-25 2021-03-12 上海中通吉网络技术有限公司 File sharing method and system

Similar Documents

Publication Publication Date Title
CN112311841B (en) Information pushing method and device, electronic equipment and computer readable medium
CN110378743B (en) Application invitation method, terminal device, server and medium
US20230351032A1 (en) Document permission processing method and apparatus, electronic device, and storage medium
CN110781373B (en) List updating method and device, readable medium and electronic equipment
US11758087B2 (en) Multimedia conference data processing method and apparatus, and electronic device
CN110430292B (en) Method and device for inviting login of network platform, electronic equipment and readable medium
CN112866385B (en) Interface calling method and device, electronic equipment and storage medium
US20120014321A1 (en) Messaging activity feed
CN111246228B (en) Method, device, medium and electronic equipment for updating gift resources of live broadcast room
CN112312222A (en) Video sending method and device and electronic equipment
CN111614759B (en) Resource sharing method and device, electronic equipment and computer readable medium
CN111209306A (en) Business logic judgment method and device, electronic equipment and storage medium
CN111460049A (en) Content sharing method and device, electronic equipment and computer readable storage medium
CN110674481B (en) Account registration method, device, equipment and storage medium of application program
CN112965673A (en) Content printing method, device, equipment and storage medium
CN112947880A (en) Screen projection method and device and electronic equipment
CN115587860A (en) Service processing method, device, storage medium and electronic equipment
CN111897620A (en) Interaction method and device and electronic equipment
CN114048498A (en) Data sharing method, device, equipment and medium
CN114006897A (en) File transmission method, device, server and storage medium
CN115022106A (en) Group information processing method, device, equipment and medium
CN112149019A (en) Method, apparatus, electronic device, and computer-readable medium for displaying information
CN113031950A (en) Picture generation method, device, equipment and medium
CN113890772A (en) Information processing method and device and electronic equipment
CN111698242A (en) Mail forward proxy method, device, system, storage medium 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