WO2020238971A1 - File sharing method, apparatus and system, server, terminal, and storage medium - Google Patents

File sharing method, apparatus and system, server, terminal, and storage medium Download PDF

Info

Publication number
WO2020238971A1
WO2020238971A1 PCT/CN2020/092665 CN2020092665W WO2020238971A1 WO 2020238971 A1 WO2020238971 A1 WO 2020238971A1 CN 2020092665 W CN2020092665 W CN 2020092665W WO 2020238971 A1 WO2020238971 A1 WO 2020238971A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
user
file
share
conversation group
Prior art date
Application number
PCT/CN2020/092665
Other languages
French (fr)
Chinese (zh)
Inventor
朱建庭
Original Assignee
北京金山云网络技术有限公司
北京金山云科技有限公司
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
Priority claimed from CN201910473086.2A external-priority patent/CN110191131A/en
Priority claimed from CN201910472070.XA external-priority patent/CN110138801A/en
Application filed by 北京金山云网络技术有限公司, 北京金山云科技有限公司 filed Critical 北京金山云网络技术有限公司
Publication of WO2020238971A1 publication Critical patent/WO2020238971A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • This application relates to the field of Internet technology, and in particular to a file sharing method, device, system, server, terminal and storage medium.
  • users can communicate with their friends and colleagues through terminals, and can share files with their friends and colleagues. For example, the user can send office documents to his colleagues through the terminal to share the office documents.
  • the user when a user needs to share a file with multiple colleagues, the user can use a terminal to create a conversation group, and the members of the conversation group can include the user and colleagues who need to share the file.
  • the user can upload the file in the conversation group to the storage space allocated by the server for the conversation group, and the server can send the file identifier of the file to other users in the conversation group.
  • other users in the conversation group can use the terminal to send an access request to the server through the file identifier of the file.
  • the server can then send the file to the terminal used by other users in the conversation group.
  • users other than members of the conversation group may obtain the access entry of the file or the file identifier of the file through some means, for example, a malicious attacker may capture packets through the network and other means.
  • the file can be obtained from the server through the access entry or the file identifier of the file, resulting in low file sharing security.
  • the purpose of the embodiments of the present application is to provide a file sharing method, device, system, server, terminal, and storage medium, which can improve the security of file sharing.
  • the specific technical solutions are as follows:
  • an embodiment of the present application discloses a file sharing method, which is applied to a server, and the method includes: receiving an access request sent by a first terminal for accessing a target file, wherein the access request carries the first login The user ID of the first user of the terminal and the file ID of the target file; the target file is the file that the second user who logs in to the second terminal needs to share in the target conversation group, and the second user belongs to the target conversation group; according to the pre-stored
  • the correspondence relationship between the file identifier and the whitelist information determines the target whitelist information corresponding to the file identifier of the target file, where the target whitelist information is used to identify members in the target conversation group who have the right to share the target file; according to the target whitelist Information and the user identification of the first user to determine whether the first user has the permission to share the target file; if the first user does not have the permission to share the target file, refuse to send the target file to the first terminal.
  • an embodiment of the present application also discloses a file sharing method, which is applied to a second terminal, and the method includes: obtaining a target file that a second user logging in to the second terminal needs to share in a target conversation group, and The target whitelist information corresponding to the target file, where the target whitelist information is used to identify members in the target conversation group who have the permission to share the target file; the target file and target whitelist information are sent to the server, so that the server receives the first
  • the terminal sends an access request for accessing the target file, it determines the target whitelist information corresponding to the file identifier of the target file according to the pre-stored correspondence between the file identifier and the whitelist information, and determines the target whitelist information corresponding to the file identifier of the target file according to the target whitelist information and the first
  • the user ID of the user determines whether the first user has the permission to share the target file, and if the first user does not have the permission to share the target file, refuse to send the target file to the
  • the embodiment of the present application also discloses a file sharing method, which is applied to a server, and the method includes: receiving an access request for accessing a target file sent by a first terminal, wherein the access request carries a login first The user ID of the first user of a terminal and the file ID of the target file; the target file is a file that the second user who logs in to the second terminal needs to share in the target conversation group, and the second user is a member of the target conversation group; The corresponding relationship between the file ID and the conversation group ID, the file ID of the target file and the user ID of the first user, determine whether the first user is a member of the target conversation group; if the first user is not a member of the target conversation group, reject Send the target file to the first terminal.
  • the embodiment of the present application also discloses a file sharing device, which is applied to a server, and the device includes: a receiving module configured to receive an access request for accessing a target file sent by a first terminal, wherein the access The request carries the user ID of the first user who logs in to the first terminal and the file ID of the target file; the target file is a file that the second user who logs in to the second terminal needs to share in the target conversation group, and the second user belongs to the target conversation group Member; determination module, set to determine the target whitelist information corresponding to the file identifier of the target file according to the correspondence between the pre-stored file identifier and the whitelist information, where the target whitelist information is used to identify the target session group with sharing Member of the permission of the target file; the judgment module is set to judge whether the first user has the permission to share the target file based on the target whitelist information and the user ID of the first user; the first processing module is set to if the first user does not have If the permission of the target
  • an embodiment of the present application also provides a file sharing device, which is applied to a second terminal, and the device includes: an acquisition module configured to acquire information that the second user who logs in to the second terminal needs to share in the target conversation group The target file, and target whitelist information corresponding to the target file, where the target whitelist information is used to identify members in the target conversation group who have the permission to share the target file; the sending module is set to send the target file and target whitelist information to the server , So that when the server receives the access request for accessing the target file sent by the first terminal, it determines the target whitelist information corresponding to the file identifier of the target file according to the pre-stored correspondence between the file identifier and the whitelist information, And according to the target whitelist information and the user identification of the first user, it is determined whether the first user has the permission to share the target file, and if the first user does not have the permission to share the target file, the target file is refused to be sent to the first terminal.
  • the embodiment of the present application also discloses a file sharing device, which is applied to a server, and the device includes: a receiving module for receiving an access request for accessing a target file sent by a first terminal, wherein The access request carries the user ID of the first user who logs in to the first terminal and the file ID of the target file; the target file is a file that the second user who logs in to the second terminal needs to share in the target conversation group, The second user belongs to a member of the target conversation group; a judgment module is used to determine the correspondence between the file ID and the conversation group ID stored in advance, the file ID of the target file, and the user ID of the first user, Determine whether the first user is a member of the target conversation group; a first processing module, configured to refuse to send the first terminal to the first terminal if the first user is not a member of the target conversation group Target file.
  • an embodiment of the present application also provides a file sharing system, which includes a server and a plurality of terminals; the second terminal of the plurality of terminals is set to obtain that the second user logging in to the second terminal needs to be in the target conversation group
  • an embodiment of the present application provides a server, including: a processor, a communication interface, a memory, and a communication bus.
  • the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is set to store A computer program; a processor configured to implement the steps of the file sharing method executed by the server provided in the embodiment of the present application when executing the program stored in the memory.
  • an embodiment of the present application provides a terminal, including: a processor, a communication interface, a memory, and a communication bus.
  • the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is set to store A computer program; a processor configured to implement the steps of the file sharing method executed by the second terminal provided in the embodiment of the present application when executing the program stored on the memory.
  • an embodiment of the present application provides a computer-readable storage medium with a computer program stored in the computer-readable storage medium.
  • the computer program is executed by a processor, the file sharing performed by the server provided by the embodiment of the present application is realized. Method steps.
  • an embodiment of the present application provides a computer-readable storage medium with a computer program stored in the computer-readable storage medium.
  • the computer program is executed by a processor
  • the second terminal provided by the embodiment of the present application can be executed. The steps of the file sharing method.
  • an embodiment of the application provides a computer program product containing instructions.
  • the computer program product containing instructions runs on a computer, the computer executes the steps of the file sharing method performed by the server provided in the embodiments of the application. .
  • an embodiment of the present application provides a computer program product containing instructions.
  • the computer program product containing instructions runs on a computer, the computer executes the file sharing method performed by the second terminal provided by the embodiments of the present application. A step of.
  • an embodiment of the present application provides a computer program that, when the computer program runs on a computer, causes the computer to execute the steps of the file sharing method executed by the server provided in the embodiment of the present application.
  • an embodiment of the present application provides a computer program that, when running on a computer, causes the computer to execute the steps of the file sharing method executed by the second terminal provided in the embodiment of the present application.
  • the server when the server receives the access request, it determines the corresponding white list information through the correspondence between the file identifier and the white list information, and then can determine whether the first user has the white list information and the user identifier of the first user.
  • the permissions of the shared target file That is, for a certain file, the whitelist information is preset, and only the members with the permission to share the file identified by the whitelist information can access the file, so users other than the members identified by the whitelist have no access permissions. Therefore, even if users other than the members identified in the target whitelist obtain the file identifier of the target file, they cannot obtain the target file, thereby improving the security of file sharing.
  • FIG. 1 is a structural diagram of a file sharing system provided by an embodiment of this application.
  • FIG. 2 is a flowchart of a file sharing method provided by an embodiment of the application
  • FIG. 3 is a flowchart of another file sharing method provided by an embodiment of the application.
  • FIG. 4 is a flowchart of another file sharing method provided by an embodiment of the application.
  • FIG. 5 is a flowchart of an example of a file sharing method provided by an embodiment of the application.
  • FIG. 6 is a flowchart of another example of a file sharing method provided by an embodiment of the application.
  • FIG. 7 is a flowchart of another example of a file sharing method provided by an embodiment of the application.
  • FIG. 8 is a structural diagram of a file sharing device provided by an embodiment of the application.
  • FIG. 9 is a structural diagram of another file sharing device provided by an embodiment of the application.
  • FIG. 10 is a structural diagram of a server provided by an embodiment of this application.
  • FIG. 11 is a structural diagram of a terminal provided by an embodiment of the application.
  • users other than the members of the conversation group may also obtain the access entry of the file or the file identifier of the file through some means, and further, can use the access entry or The file identifier of the file obtains the file from the server, resulting in low file sharing security.
  • Fig. 1 is a structural diagram of a file sharing system provided by an embodiment of the application, which may include a server, a first terminal, a second terminal, a third terminal, and a fourth terminal.
  • user 2 can create a conversation group through the second terminal. , And invite user 1 and user 3 to join the conversation group (that is, the target conversation group). Then, the user 2 can send the target file in the target conversation group to the server through the second terminal, and the server can store the target file in the storage space allocated for the target conversation group. And send the file identifier of the target file to the terminals (that is, the first terminal and the third terminal) where other users in the target conversation group log in.
  • a file ie target file
  • the first terminal and the third terminal After the first terminal and the third terminal obtain the file identifier of the target file, they can send an access request for the target file to the server according to the file identifier of the target file.
  • the server When the server receives the access request, the server can send the target file to the first terminal and the third terminal, so that users 1, user 2, and user 3 can share the target file. Even if the user 4 who logs in to the fourth terminal is not a member of the target conversation group, if the user 4 obtains the file identifier of the target file through the fourth terminal, the fourth terminal may also send an access request for the target file to the server.
  • the server When the server receives the access request, the server can send the target file to the fourth terminal, which results in low file sharing security.
  • the embodiment of the present application provides a file sharing method, which can be applied to a server.
  • the server when the server receives the access request for the target file sent by the fourth terminal, the server can determine the target whitelist information corresponding to the file identifier of the target file according to the correspondence between the file identifier and the whitelist information stored in advance . And based on the target whitelist information and the user ID of the user 4, it is determined whether the user 4 has the permission to share the target file.
  • the server determines that the user 4 does not have the right to share the target file, the server refuses to send the target file to the fourth terminal, thereby improving the security of file sharing.
  • FIG. 2 is a flowchart of a file sharing method provided by an embodiment of the application.
  • the method may be applied to a server, and the method may include the following steps:
  • S201 Receive an access request for accessing a target file sent by the first terminal.
  • the access request carries the user identifier of the first user who logs in to the first terminal and the file identifier of the target file.
  • the user identification can be the user's UID (User Identification) or other identifications.
  • the access request sent by the terminal may carry the Session (session) information of the user logging in to the terminal, and the session information may include the user's UID, UserName (user name), and the user's login IP (Internet Protocol, Internet Protocol). Address and other information.
  • the target file may be a file that the second user who logs in to the second terminal needs to share in the target conversation group.
  • the second user is a member of the target conversation group, and the target file may be an office document, a picture, or other files.
  • the second user can share the target file with some members of the target conversation group, or can share the target file with all members of the target conversation group.
  • the file identifier of the target file may be a unique identifier assigned by the server to the target file.
  • the file identifier of the target file may be the URL (Uniform Resource Locator, uniform resource locator) of the target file.
  • the first terminal may be a terminal logged in by a member of the target conversation group, or a terminal (may be called a third terminal) logged in by a user other than a member of the target conversation group (may be referred to as a third user).
  • a member of the target conversation group may send the file identifier of the target file to the third terminal through the terminal.
  • the first user when the first user needs to obtain the target file, the first user may obtain the file identification of the target file through the first terminal, and send an access request for the target file to the server according to the file identification of the target file.
  • the server can receive the access request sent by the first terminal.
  • S202 Determine the target whitelist information corresponding to the file identifier of the target file according to the pre-stored correspondence between the file identifier and the whitelist information.
  • the target whitelist information is used to identify members in the target conversation group who have the permission to share the target file.
  • the server may obtain the file identifier of the target file carried in the access request. Furthermore, the server can query the correspondence between the file identifier and the whitelist information stored in advance to determine the whitelist information corresponding to the file identifier of the target file (ie, target whitelist information). Subsequently, the server may determine whether the first user has the permission to share the target file according to the target whitelist information.
  • S203 Determine whether the first user has the right to share the target file according to the target whitelist information and the user identification of the first user.
  • the server may obtain the user identifier of the first user carried in the access request.
  • the server can determine whether the first user has the right to share the target file according to the target whitelist information and the user identification of the first user.
  • the server when the server determines that the first user does not have the right to share the target file, the server may refuse to send the target file to the first terminal.
  • the server may not perform any processing, or the server may discard the access request of the first terminal.
  • the target file is sent to the first terminal.
  • the server when the server receives the access request, the corresponding whitelist information is determined by the correspondence between the file identifier and the whitelist information, and then the whitelist information and the user identifier of the first user can be used to determine Whether the first user has the permission to share the target file. That is, for a file, the whitelist information is preset, and only the members with the permission to share the file identified by the whitelist information can access the file, so users other than the members identified by the whitelist have no access permissions. Therefore, even if users other than the members identified in the target whitelist obtain the file identifier of the target file, they cannot obtain the target file, thereby improving the security of file sharing.
  • the method may further include the following steps:
  • the second user when the second user needs to share a file (ie the target file) with other members of the target conversation group, the second user can select upload in the dialog window of the target conversation group through the second terminal Target file and select the members who are allowed to share the target file.
  • the second terminal may generate the target whitelist information corresponding to the target file according to the selection of the second user, and send the target file and the target whitelist information to the server.
  • the server can receive the target file and target whitelist information sent by the second terminal, and save the correspondence between the file identifier of the target file and the target whitelist information for subsequent processing.
  • the server may store the target file in the storage space allocated locally for the target conversation group.
  • the server may also store the target file in a storage space allocated for the target conversation group in a preset file storage system.
  • the preset file storage system may be a distributed object storage system or another type of storage system. The method for the server to store the target file is not limited to the above method.
  • the server may record the correspondence between the file identifier and the whitelist information in the preset service storage system.
  • the preset business storage system may be a key (key frame)-value (value) distributed storage system, for example, a relational database such as mysql, or it may be a storage system such as redis and mongodb.
  • the server can record the file identifier as the key and the whitelist information as the corresponding value.
  • the foregoing preset service storage system may also store the correspondence between the file identifier and the combined content, where the combined content is a combination of the user identifier of the user sharing the target file and the content of the corresponding whitelist information.
  • the server may also send the file identifier of the target file to the terminal (may be called the fourth terminal) logged in by other users (may be called the fourth user) in the target conversation group except the second user.
  • the fourth terminal may display the file identifier of the target file in the dialog window of the target conversation group.
  • the fourth user may input an instruction to obtain the target file to the fourth terminal, and the fourth terminal may send an access request for the target file to the server to obtain the target file.
  • the target whitelist information may include different types of data, which are described separately in combination with the following three implementation manners.
  • the target whitelist information is the conversation group identifier of the target conversation group. That is, the members of the target conversation group have the permission to share the target file.
  • the corresponding relationship between the file identifier and the session group identifier can be recorded, and the server can record the file identifier as the key and the session group identifier as the value.
  • an embodiment of the present application provides a file sharing method, which can be applied to a server, and the method can include the following steps:
  • S301 Receive an access request for accessing the target file sent by the first terminal.
  • S301 is the same as the above S201, and reference may be made to the related description in the above S201, which will not be repeated here.
  • S302 Determine whether the first user is a member of the target conversation group according to the pre-stored correspondence between the file identifier and the conversation group identifier, the file identifier of the target file, and the user identifier of the first user.
  • the server may obtain the user identification of the first user and the file identification of the target file carried in the access request. In combination with the pre-stored correspondence between the file identifier and the conversation group identifier, it is determined whether the first user is a member of the target conversation group.
  • the judging method is: determining the target whitelist information corresponding to the identifier of the target file according to the correspondence between the file identifier and the session group identifier stored in advance. Then it is determined whether the first user is a member of the target conversation group.
  • the target file is sent to the first terminal; if the first user is not a member of the target conversation group, it is determined that the first user does not Have the permission to share the target file, and then execute S303.
  • the server when the server determines that the first user is not a member of the target conversation group, that is, determines that the first user does not have the right to share the target file, the server may refuse to send the target file to the first terminal.
  • the server when the server determines that the first user is not a member of the target conversation group, the server may not perform any processing, or the server may discard the access request of the first terminal.
  • the server when the server receives the access request, it can determine whether the first user is a member of the target conversation group through the correspondence between the file ID and the conversation group ID, the file ID of the target file, and the user ID of the first user. Determine whether the first user can access the target file. Since users other than the members of the target conversation group are not members of the target conversation group, they have no access rights, so that users other than the members of the target conversation group cannot obtain the target file even if they obtain the file identifier of the target file. In turn, the security of file sharing can be improved.
  • the server may receive the target file and the session identifier of the target conversation group sent by the second terminal, save the correspondence between the file identifier of the target file and the conversation group identifier of the target conversation group, and convert the target file
  • the file identifier of is sent to the terminal logged in by users other than the second user in the target conversation group.
  • the second user when the second user needs to share a file (ie target file) with other users, the second user can create a conversation group (ie target conversation group) through the second terminal, and the members of the target conversation group may include the second Users and other users who need to share target files.
  • a file ie target file
  • the members of the target conversation group may include the second Users and other users who need to share target files.
  • the second user can select to upload the target file in the dialog window of the target conversation group through the second terminal, and the second terminal can send the target file and the conversation group identifier of the target conversation group to the server.
  • the server may receive the target file and the conversation group identifier of the target conversation group sent by the second terminal, and save the correspondence between the file identifier of the target file and the conversation group identifier of the target conversation group for subsequent processing.
  • S302 may include the following steps:
  • Step S1 in the pre-stored correspondence between the file identifier and the session group identifier, determine the session group identifier corresponding to the file identifier of the target file to obtain the target session group identifier.
  • the conversation group identified by the target conversation group identifier is the target conversation group.
  • Step S2 Determine whether the user ID of the first user exists among the user IDs of the members in the conversation group identified by the target conversation group ID. If so, determine that the first user is a member of the target conversation group; if not, determine the first user ID. The user is not a member of the target conversation group.
  • the server may determine that the user corresponds to the conversation group, and record the correspondence between the user ID of the user and the conversation ID of the conversation group.
  • the server may extract the file identifier of the target file from the access request. Then, the server can determine whether the first user is a member of the target conversation group through the foregoing steps S1 and S2.
  • the server sends a reminder message to the first terminal to notify the first terminal that the first user has no right to share the target file.
  • the server can record the corresponding relationship between a certain user and the target conversation group when the user joins the target conversation group. Therefore, a new user who joins the target conversation group after the second user sends the target file will also automatically obtain the permission to access the target file.
  • the target file can be obtained from the server, thereby reducing the operation of the second user to send the target file to the new user again. The users who exit the target conversation group will automatically lose the permission to access the target file.
  • users other than the members of the target conversation group obtain the file identifier of the target file, they cannot obtain the target file, thereby ensuring the security of the target file.
  • the target whitelist information may include the conversation group identifier and preset parameters of the target conversation group.
  • the preset parameter is used to indicate whether all members in the target conversation group have the permission to share the target file.
  • Step 1 In the case where the value of the preset parameter is used to indicate that all members in the target conversation group have the right to share the target file, query the user IDs of all members in the target conversation group.
  • the server can query the correspondence between the conversation group ID of the conversation group and the user ID of the members in the conversation group to determine the user ID of the member corresponding to the conversation group ID of the target conversation group (that is, the user ID of all members in the target conversation group). User ID).
  • Step 2 Determine whether there is a user ID of the first user among the user IDs of all members in the target conversation group. If the user ID of the first user exists among the user IDs of all members in the target conversation group, determine that the first user has the right to share the target file; if the user ID of all members in the target conversation group does not exist in the user ID of the first user Identifies that the first user does not have the right to share the target file.
  • the preset parameters can be set by technicians based on experience.
  • the preset parameter is A. If A is the first value, it means that all members of the target conversation group have the permission to share the target file; if A is the second value, it means that all members of the target conversation group are not Have permission to share target files.
  • the server can determine that the user is a member of the conversation group, and record the correspondence between the user ID of the user and the conversation group ID of the conversation group.
  • the server After the server receives the target file and target whitelist information, if the target whitelist information includes preset parameters, and the server determines that the current value of the preset parameter indicates that all members in the target conversation group have the right to share the target file, the server It can be determined that the second user can share the target file with all members in the target conversation group.
  • the server After the server receives the access request for the target file sent by the first terminal, it can determine whether the first user has the right to share the target file through the above steps 1 and 2. That is, if the first user belongs to the target conversation group, it is determined that the first user has the right to share the target file, and if the first user does not belong to the target conversation group, it is determined that the first user does not have the right to share the target file.
  • the target whitelist information may also include user identifications of members in the target conversation group who have the right to share the target file.
  • the server receives the target file and target whitelist information, if the target whitelist information includes preset parameters, and the server determines that the current value of the preset parameter indicates that all members in the target conversation group do not have the permission to share the target file, then The server may determine that the second user shares the target file with some members of the target conversation group.
  • S203 can also be implemented as:
  • the value of the preset parameter is used to indicate that all members in the target conversation group do not have the permission to share the target file
  • the target whitelist information may also only include the user identifiers of members in the target conversation group who have the permission to share the target file, without including preset parameters.
  • the above S203 can be implemented as:
  • the server can determine that the first user has the permission to share the target file; if the target whitelist information Among the included user IDs, the user ID of the first user does not exist, indicating that the second user does not allow the first user to share the target file, and the server can determine that the first user does not have the right to share the target file.
  • the server may also send the target file to the terminal logged in by the member who has the permission to share the target file, and the method may further include the following steps:
  • the target file is sent to the first terminal.
  • the server when the server determines that the first user has the right to share the target file, the server may send the target file to the first terminal.
  • the server can determine whether the first user has the permission to share the target file according to the target whitelist information.
  • the server may refuse to send the target file to the first terminal.
  • users other than the members identified in the target whitelist have no access rights, so that even if users other than the members identified in the target whitelist obtain the file identification of the target file, the server will not log in to the terminal of the user. Sending the corresponding target file can improve the security of file sharing.
  • the second user does not need to create a new conversation group, and can only share the target file with some members of the target conversation group, thereby facilitating user operations and improving the efficiency of file sharing.
  • the server may also send a reminder message to the terminal, and the method may further include the following steps:
  • a reminder message is sent to the first terminal to notify the first terminal that the first user has no right to share the target file.
  • the server when the server determines that the first user does not have the right to share the target file, the server may not only refuse to send the target file to the first terminal, but also may send a reminder message to the first terminal.
  • the first terminal may receive the reminder message and determine that the first user currently logged in does not have the right to share the target file. For example, the first terminal may display a message "No right to share the target file" in the dialog window of the target conversation group.
  • FIG. 4 is a flowchart of a file sharing method provided by an embodiment of this application.
  • the method may be applied to a second terminal.
  • the method may include the following steps:
  • S401 Acquire target files that need to be shared in the target conversation group by the second user who logs in to the second terminal, and target whitelist information corresponding to the target files.
  • the target whitelist information is used to identify members in the target conversation group who have the permission to share the target file.
  • the target file can be office documents, pictures, or other files.
  • the member with the permission to share the target file in the target conversation group may be a member of the target conversation group, may also be a plurality of partial members in the target conversation group, or may be all members of the target conversation group.
  • the second user when the second user needs to share a file (ie, target file) with members of the target conversation group, the second user can select the need to share in the dialog window of the target conversation group through the second terminal Target file and determine other members of the target conversation group that are allowed to share the target file.
  • the second terminal can obtain the target file and the corresponding target whitelist information.
  • S402 Send the target file and target whitelist information to the server, so that when the server receives the access request for accessing the target file sent by the first terminal, it determines the corresponding relationship based on the pre-stored file identifier and the whitelist information.
  • Target whitelist information corresponding to the file identifier of the target file. And based on the target whitelist information and the user identification of the first user, it is determined whether the first user has the permission to share the target file, and if the first user does not have the permission to share the target file, the target file is refused to be sent to the first terminal.
  • the second terminal may send the target file and target whitelist information to the server.
  • the server can receive the target file and target whitelist information sent by the second terminal, and save the correspondence between the target file identifier and the target whitelist information.
  • the server when the server receives an access request for the target file sent by another terminal (ie, the first terminal) according to the file identifier of the target file, the server can determine whether the first user who logs in to the first terminal has sharing based on the target whitelist information The permissions of the target file. When the server determines that the first user does not have the right to share the target file, the server may refuse to send the target file to the first terminal.
  • the server when the second user shares the target file, the corresponding target whitelist information can be sent to the server through the second terminal.
  • the server receives the access request sent by the first user through the first terminal, it can determine the first user through the correspondence between the file identifier and the whitelist information, the file identifier of the target file, and the user identifier of the first user. Whether the user has the right to share the target file to determine whether the first user can access the target file.
  • users other than the members identified by the target whitelist do not have access rights, so that even if users other than the members identified by the target whitelist obtain the file identifier of the target file, they cannot obtain the target file, thereby improving the file sharing performance. safety.
  • the second terminal may obtain target whitelist information according to the user's operation.
  • obtaining target whitelist information may include the following steps:
  • the predetermined area is located in the file access permission setting interface displayed by the second terminal, and the signal includes target whitelist information corresponding to the target file.
  • the second terminal may display a file access permission setting interface for the target file. Furthermore, the second user can perform operations in a predetermined area in the interface displayed by the second terminal to select members in the target conversation group that are allowed to share the target file. Accordingly, the second terminal can determine which members of the target conversation group can share the target file. Members, get target whitelist information.
  • the second terminal may display a selection dialog box in the conversation window of the target conversation group.
  • the selection dialog box can display the option of "Share the target file among all members in the current conversation group".
  • the second user can check this option through the second terminal, and the second terminal can determine that all members in the target conversation group have the permission to share the target file, and obtain the target whitelist information.
  • the second terminal may display a multi-selection dialog box in the conversation window of the target conversation group.
  • the multiple selection dialog box can display the user names of all members in the target conversation group.
  • the second user can check the user names of the members who are allowed to share the target file through the second terminal, and the second terminal can determine the members of the target conversation group who can share the target file according to the user names checked by the second user to obtain the target whitelist information.
  • the target whitelist information is the session identifier of the target session group.
  • the target whitelist information may include the session group identifier of the target session group and preset parameters, and the preset parameters are used to indicate whether all members of the target session group have the right to share the target file.
  • the preset parameters can be set by technicians based on experience.
  • the preset parameter is A
  • A is the first value, which can indicate that all members in the target conversation group have the permission to share the target file
  • A is the second value, which can indicate that all members in the target conversation group do not have sharing The permissions of the target file.
  • the second terminal may display a selection dialog box in the conversation window of the target conversation group, and the selection dialog box may display "in the current conversation group "Share target files among members” option. The second user can check this option through the second terminal.
  • the second terminal may determine that the preset parameter is the aforementioned first value, and further, the second terminal may send the target file and the target whitelist information including the preset parameter to the server.
  • the second terminal may display a multi-selection dialog box in the conversation window of the target conversation group, and the multi-selection dialog box may display all members in the target conversation group User name.
  • the second user can check the user names of the members who are allowed to share the target file through the second terminal.
  • the second terminal may determine that the preset parameter is the aforementioned second value, and the second terminal may also obtain the user identification of the member selected by the second user who is allowed to share the target file. Furthermore, the second terminal may send the target file and the target whitelist information including the determined preset parameters and the acquired user identification to the server.
  • the target whitelist information may include user identifications of members in the target conversation group who have the right to share the target file.
  • the second terminal may obtain the user ID of the member who is allowed to share the target file selected by the second user, and further, the second terminal may transfer the target file , Send the target whitelist information containing the obtained user ID to the server.
  • the server can combine the user ID of the first user according to whether the target whitelist information contains preset parameters and the current value of the preset parameters, It is determined whether the first user has the authority to share the target file, and the access request is processed according to the determination result.
  • the processing method of the server reference may be made to the detailed introduction in the foregoing embodiment, which is not repeated here.
  • FIG. 5 is a flowchart of an example of a file sharing method provided by an embodiment of the application. The method may include the following steps:
  • S501 The second terminal obtains the target file that the second user who logs in to the second terminal needs to share in the target conversation group.
  • the second terminal sends the target file and the conversation group identifier of the target conversation group to the server.
  • S503 The server saves the correspondence between the file identifier of the target file and the conversation group identifier of the target conversation group, and sends the file identifier of the target file to the terminal logged in by users other than the second user in the target conversation group.
  • S504 The first terminal sends a first access request for the target file to the server.
  • the first access request carries the user ID of the first user who logs in to the first terminal and the file ID of the target file.
  • S505 The third terminal sends a second access request for the target file to the server.
  • the second access request carries the user identification of the third user who logs in to the third terminal and the file identification of the target file.
  • S506 The server determines, according to the first access request, that the first user who logs in to the first terminal is not a member of the target conversation group.
  • S507 The server determines, according to the second access request, that the third user who logs in to the third terminal is a member of the target conversation group.
  • S508 The server sends a reminder message to the first terminal to notify the first terminal that the first user has no right to share the target file.
  • S509 The server sends the target file to the third terminal.
  • S510 The first terminal displays a message of "No right to share the target file".
  • FIG. 6 is a flowchart of an example of a file sharing method provided by an embodiment of the application. The method may include the following steps:
  • the second terminal obtains the target file that the second user who logs in to the second terminal needs to share in the target conversation group, and the corresponding target whitelist information.
  • the target whitelist information includes preset parameters, and the current value of the preset parameters indicates that all members in the target conversation group have the right to share the target file.
  • S602 The second terminal sends the target file and target whitelist information to the server.
  • the server saves the correspondence between the file identifier of the target file and the target whitelist information, and sends the file identifier of the target file to the terminal logged in by users other than the second user in the target conversation group.
  • S604 The first terminal sends a first access request for the target file to the server.
  • S605 The third terminal sends a second access request for the target file to the server.
  • the server determines that among the user IDs of all members in the target conversation group, there is no user ID of the first user who logs in to the first terminal.
  • the server determines that among the user IDs of all members in the target conversation group, there is the user ID of the third user who logs in to the third terminal.
  • S608 The server sends a reminder message to the first terminal to notify the first terminal that the first user has no right to share the target file.
  • S609 The server sends the target file to the third terminal.
  • FIG. 7 is a flowchart of an example of a file sharing method provided by an embodiment of the application.
  • the method may include: S701 to S710.
  • S701-S705 are the same as S601-S605
  • S708-S710 are the same as S608-S610.
  • the target whitelist information acquired by the second terminal includes: user identifiers of members in the target conversation group who have the permission to share target files, and the target whitelist information does not include preset parameters.
  • S706 to S707 may be executed.
  • S706 The server determines, according to the first access request, that the user identifier of the first user who logs in to the first terminal does not exist among the user identifiers included in the target whitelist information.
  • the server determines that among the user identifiers included in the target whitelist information, there is the user identifier of the third user who logs in to the third terminal.
  • S708 can be continued, and the server sends a reminder message to the first terminal to notify the first terminal that the first user has no right to share the target file.
  • FIG. 8 is a structural diagram of a file sharing device provided by an embodiment of the application.
  • the device is applied to a server, and the device may include:
  • the receiving module 801 is configured to receive an access request for accessing a target file sent by the first terminal, wherein the access request carries the user ID of the first user who logs in to the first terminal and the file ID of the target file; the target file is the login first 2. Files that the second user of the terminal needs to share in the target conversation group, and the second user is a member of the target conversation group;
  • the determining module 802 is configured to determine the target whitelist information corresponding to the file identifier of the target file according to the correspondence between the file identifier and the whitelist information stored in advance, wherein the target whitelist information is used to identify the shared target in the target conversation group Member of the authority of the file;
  • the judgment module 803 is configured to judge whether the first user has the right to share the target file according to the target whitelist information and the user identification of the first user;
  • the first processing module 804 is configured to refuse to send the target file to the first terminal if the first user does not have the permission to share the target file.
  • the target whitelist information is the session group identifier of the target session group.
  • the receiving module 801 is configured to receive an access request for accessing a target file sent by the first terminal, wherein the access request carries the user ID of the first user who logs in to the first terminal and the file ID of the target file; the target file is the login first 2. Files that the second user of the terminal needs to share in the target conversation group, and the second user is a member of the target conversation group;
  • the judging module 803 is configured to judge whether the first user is a member of the target conversation group based on the pre-stored correspondence between the file ID and the conversation group ID, the file ID of the target file, and the user ID of the first user;
  • the first processing module 804 is configured to refuse to send the target file to the first terminal if the first user is not a member of the target conversation group.
  • the judgment module 803 can be specifically set as:
  • the first user is a member of the target conversation group, it is determined that the first user has the right to share the target file;
  • the first user is not a member of the target conversation group, it is determined that the first user does not have the right to share the target file.
  • the judgment module 803 can be specifically set as:
  • the user ID of the first user exists, it is determined that the first user is a member of the target conversation group;
  • the user identity of the first user does not exist, it is determined that the first user does not belong to a member of the target conversation group.
  • the target whitelist information includes the session group identifier of the target session group and preset parameters, and the preset parameters are used to indicate whether all members in the target session group have the right to share the target file;
  • the judging module 803 is specifically set to query the user IDs of all members in the target conversation group when the value of the preset parameter is used to indicate that all members in the target conversation group have the right to share the target file;
  • the user ID of the first user exists among the user IDs of all members in the target conversation group, it is determined that the first user has the right to share the target file;
  • the target whitelist information further includes user identifications of members in the target conversation group who have the right to share the target file;
  • the judging module 803 is also set to judge whether there is a first among the user identifiers contained in the target whitelist information when the value of the preset parameter is used to indicate that all members in the target conversation group do not have the permission to share the target file.
  • User ID of the user is also set to judge whether there is a first among the user identifiers contained in the target whitelist information when the value of the preset parameter is used to indicate that all members in the target conversation group do not have the permission to share the target file.
  • the user ID of the first user exists in the user ID included in the target whitelist information, it is determined that the first user has the right to share the target file;
  • the user identification of the first user does not exist in the user identification included in the target whitelist information, it is determined that the first user does not have the right to share the target file.
  • the target whitelist information includes user identifications of members in the target conversation group who have the right to share the target file;
  • the determining module 803 is specifically configured to determine whether the user identifier of the first user exists among the user identifiers included in the target whitelist information;
  • the user ID of the first user exists in the user ID included in the target whitelist information, it is determined that the first user has the right to share the target file;
  • the user identification of the first user does not exist in the user identification included in the target whitelist information, it is determined that the first user does not have the right to share the target file.
  • the device further includes:
  • the second processing module is set to:
  • the file identifier of the target file is sent to the terminal logged in by users other than the second user in the target conversation group.
  • the second processing module is specifically set to:
  • the file identifier of the target file is sent to the terminal logged in by users other than the second user in the target conversation group.
  • the device further includes:
  • the first sending module is configured to send a reminder message to the first terminal if the first user does not have the right to share the target file to notify the first terminal that the first user has no right to share the target file.
  • the first sending module is specifically configured to send a reminder message to the first terminal if the first user is not a member of the target conversation group to notify the first terminal that the first user has no right to share the target file.
  • the device further includes:
  • the second sending module is configured to send the target file to the first terminal if the first user has the permission to share the target file.
  • the second sending module is specifically configured to send the target file to the first terminal if the first user is a member of the target conversation group.
  • FIG. 9 is a structural diagram of a file sharing device provided by an embodiment of the application.
  • the device is applied to a second terminal, and the device includes:
  • the obtaining module 901 is configured to obtain the target file that the second user who logs in the second terminal needs to share in the target conversation group, and the target whitelist information corresponding to the target file, where the target whitelist information is used to identify the target conversation group with Members with permission to share target files;
  • the sending module 902 is configured to send the target file and target whitelist information to the server, so that when the server receives the access request for accessing the target file sent by the first terminal, it will be based on the correspondence between the pre-stored file identifier and the whitelist information Relationship, determine the target whitelist information corresponding to the file ID of the target file, and determine whether the first user has the permission to share the target file based on the target whitelist information and the user ID of the first user, if the first user does not have the shared target The permission of the file, the target file is refused to be sent to the first terminal.
  • the acquiring module 901 is specifically configured to receive a signal triggered by an operation in a predetermined area, where the predetermined area is located in the file access permission setting interface displayed by the second terminal, and the signal includes the target corresponding to the target file.
  • Whitelist information is specifically configured to receive a signal triggered by an operation in a predetermined area, where the predetermined area is located in the file access permission setting interface displayed by the second terminal, and the signal includes the target corresponding to the target file.
  • the target whitelist information is the session identifier of the target session group.
  • the target whitelist information includes the conversation group identifier of the target conversation group and preset parameters, and the preset parameters are used to indicate whether all members in the target conversation group have the right to share the target file.
  • the target whitelist information includes user identifications of members in the target conversation group who have the right to share the target file.
  • the embodiment of the present application also provides a file sharing system, which includes a server and multiple terminals;
  • the second terminal of the plurality of terminals is configured to obtain the target file that the second user who logs in to the second terminal needs to share in the target conversation group, and the target whitelist information corresponding to the target file, where the target whitelist information is used to identify Members of the target conversation group who have the right to share target files; send target files and target whitelist information to the server;
  • the server is configured to receive an access request for accessing the target file sent by the first terminal of the plurality of terminals; and determine the target whitelist corresponding to the file identifier of the target file according to the correspondence relationship between the pre-stored file identifier and the whitelist information Information; According to the target whitelist information and the user ID of the first user, determine whether the first user has the permission to share the target file; if the first user does not have the permission to share the target file, refuse to send the target file to the first terminal.
  • the first terminal of the plurality of terminals is configured to send an access request for accessing the target file to the server, wherein the access request carries the user identification of the first user who logs in to the first terminal and the target file
  • the target file is a file that needs to be shared in the target conversation group by the second user who logs in to the second terminal of the multiple terminals, and the second user belongs to a member of the target conversation group;
  • the server is configured to receive the access request, and determine whether the first user is a member of the target conversation group according to the pre-stored correspondence between the file ID and the conversation group ID, the file ID of the target file, and the user ID of the first user; If the user is not a member of the target conversation group, it refuses to send the target file to the first terminal.
  • the embodiment of the present application also provides a server, as shown in FIG. 10, including a processor 1001, a communication interface 1002, a memory 1003, and a communication bus 1004, where the processor 1001, the communication interface 1002, and the memory 1003 are implemented through the communication bus 1004 Mutual communication,
  • the memory 1003 is set to store computer programs
  • the processor 1001 is configured to implement the file sharing method executed by the server provided in the embodiment of the present application when executing the program stored in the memory 1003.
  • the above-mentioned file sharing method executed by the server is partly the same as the above-mentioned method embodiment, and will not be repeated here.
  • the communication bus mentioned by the above server may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the aforementioned server and other devices.
  • the memory may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk storage.
  • RAM Random Access Memory
  • NVM Non-Volatile Memory
  • the memory may also be at least one storage device located far away from the foregoing processor.
  • the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processing, DSP), a dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • CPU central processing unit
  • NP Network Processor
  • DSP Digital Signal Processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the embodiment of the present application also provides a terminal, as shown in FIG. 11, including a processor 1101, a communication interface 1102, a memory 1103, and a communication bus 1104, where the processor 1101, the communication interface 1102, and the memory 1103 are completed through the communication bus 1104 Mutual communication,
  • the memory 1103 is set to store computer programs
  • the processor 1101 is configured to implement the file sharing method executed by the second terminal provided in the embodiment of the present application when executing the program stored in the memory 1103.
  • the file sharing method executed by the second terminal is partially the same as that of the foregoing method embodiment, and will not be repeated here.
  • the communication bus mentioned by the above terminal may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the aforementioned terminal and other devices.
  • the memory may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk storage.
  • RAM Random Access Memory
  • NVM Non-Volatile Memory
  • the memory may also be at least one storage device located far away from the foregoing processor.
  • the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processing, DSP), a dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • CPU central processing unit
  • NP Network Processor
  • DSP Digital Signal Processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • a computer-readable storage medium stores a computer program.
  • the computer program is executed by a processor, the The steps of the file sharing method executed by the server.
  • a computer-readable storage medium stores a computer program.
  • the computer program is executed by a processor, the Steps of the file sharing method executed by the second terminal.
  • a computer program product containing instructions is also provided.
  • the computer program product containing instructions runs on a computer, the computer executes the steps of the file sharing method executed by the server.
  • a computer program product containing instructions is also provided.
  • the computer program product containing instructions runs on a computer, the computer can execute the execution provided by the second terminal provided in the embodiments of this application. The steps of the file sharing method.
  • a computer program which when running on a computer, causes the computer to execute the steps of the file sharing method executed by the server provided in the embodiment of this application.
  • a computer program which when running on a computer, causes the computer to execute the steps of the file sharing method performed by the second terminal provided in the embodiment of this application.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
  • the corresponding relationship between file identification and whitelist information can be stored in the server, so that users other than the members identified by the target whitelist cannot Obtaining the target file prevents the target file from being obtained by a malicious attacker and can improve the security of file sharing.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Provided are a file sharing method, apparatus and system, a server, a terminal, and a storage medium. The method comprises: receiving an access request sent by a first terminal and used for accessing a target file, wherein the access request carries a user identifier of a first user logging into the first terminal and a file identifier of the target file, the target file is a file that needs to be shared in a target session group by a second user logging into a second terminal, and the second user belongs to a member of the target session group; determining, according to a pre-stored correlation between a file identifier and a session group identifier, the file identifier of the target file and the user identifier of the first user, whether the first user belongs to a member of the target session group; and if the first user does not belong to the member of the target session group, refusing to send the target file to the first terminal. On the basis of the processing mentioned above, the security of file sharing can be improved.

Description

文件共享方法、装置、系统、服务器、终端及存储介质File sharing method, device, system, server, terminal and storage medium
本申请要求于2019年5月31日提交中国专利局、申请号为201910473086.2,发明名称为“一种文件共享方法、装置、系统、服务器及存储介质”的中国专利申请,以及于2019年5月31日提交中国专利局、申请号为201910472070.X,发明名称为“文件共享方法、装置、系统、服务器、终端及存储介质”的优先权,其全部内容通过引用结合在本申请中。This application requires that it be submitted to the Chinese Patent Office on May 31, 2019, with an application number of 201910473086.2 and a Chinese patent application entitled "A file sharing method, device, system, server and storage medium", and in May 2019 Submitted to the Chinese Patent Office on the 31st, the application number is 201910472070.X, the title of the invention is "file sharing method, device, system, server, terminal and storage medium" priority, the entire content of which is incorporated into this application by reference.
技术领域Technical field
本申请涉及互联网技术领域,特别是涉及一种文件共享方法、装置、系统、服务器、终端及存储介质。This application relates to the field of Internet technology, and in particular to a file sharing method, device, system, server, terminal and storage medium.
背景技术Background technique
随着互联网技术的快速发展,用户可以通过终端与自己的好友、同事进行交流,且可以与自己的好友、同事共享文件。例如,该用户可以通过终端向自己的同事发送办公文档,以共享该办公文档。With the rapid development of Internet technology, users can communicate with their friends and colleagues through terminals, and can share files with their friends and colleagues. For example, the user can send office documents to his colleagues through the terminal to share the office documents.
相关技术中,当用户需要与多个同事共享一文件时,该用户可以使用终端创建一个会话组,该会话组的成员可以包括该用户及需要共享该文件的同事。该用户可以在该会话组中,将该文件上传至服务器为该会话组分配的存储空间中,服务器则可以将该文件的文件标识发送至该会话组中的其他用户。进而,该会话组中的其他用户可以使用终端,通过该文件的文件标识向服务器发送访问请求。服务器则可以将该文件发送至该会话组中的其他用户使用的终端。In the related art, when a user needs to share a file with multiple colleagues, the user can use a terminal to create a conversation group, and the members of the conversation group can include the user and colleagues who need to share the file. The user can upload the file in the conversation group to the storage space allocated by the server for the conversation group, and the server can send the file identifier of the file to other users in the conversation group. Furthermore, other users in the conversation group can use the terminal to send an access request to the server through the file identifier of the file. The server can then send the file to the terminal used by other users in the conversation group.
然而,该会话组的成员以外的其他用户通过一些手段,比如恶意攻击者可能会通过网络抓包等手段,也有可能获取到该文件的访问入口或者该文件的文件标识。进而,可以通过该访问入口或该文件的文件标识从服务器中获取该文件,导致文件共享的安全性较低。However, users other than members of the conversation group may obtain the access entry of the file or the file identifier of the file through some means, for example, a malicious attacker may capture packets through the network and other means. Furthermore, the file can be obtained from the server through the access entry or the file identifier of the file, resulting in low file sharing security.
发明内容Summary of the invention
本申请实施例的目的在于提供一种文件共享方法、装置、系统、服务器、终端及存储介质,可以提高文件共享的安全性。具体技术方案如下:The purpose of the embodiments of the present application is to provide a file sharing method, device, system, server, terminal, and storage medium, which can improve the security of file sharing. The specific technical solutions are as follows:
第一方面,本申请实施例公开了一种文件共享方法,该方法应用于服务器,该方法包括:接收第一终端发送的用于访问目标文件的访问请求,其中,访问请求中携带登录第一终端的第一用户的用户标识和目标文件的文件标识;目标文件为登录第二终端的第二用户需要在目标会话组中共享的文件,第二用户属于目标会话组的成员;根据预先存储的文件标识与白名单信息的对应关系,确定与目标文件的文件标识对应的目标白名单信息,其中, 目标白名单信息用于标识目标会话组中具有共享目标文件的权限的成员;根据目标白名单信息和第一用户的用户标识,判断第一用户是否具有共享目标文件的权限;如果第一用户不具有共享目标文件的权限,则拒绝向第一终端发送目标文件。In the first aspect, an embodiment of the present application discloses a file sharing method, which is applied to a server, and the method includes: receiving an access request sent by a first terminal for accessing a target file, wherein the access request carries the first login The user ID of the first user of the terminal and the file ID of the target file; the target file is the file that the second user who logs in to the second terminal needs to share in the target conversation group, and the second user belongs to the target conversation group; according to the pre-stored The correspondence relationship between the file identifier and the whitelist information determines the target whitelist information corresponding to the file identifier of the target file, where the target whitelist information is used to identify members in the target conversation group who have the right to share the target file; according to the target whitelist Information and the user identification of the first user to determine whether the first user has the permission to share the target file; if the first user does not have the permission to share the target file, refuse to send the target file to the first terminal.
第二方面,本申请实施例还公开了一种文件共享方法,该方法应用于第二终端,该方法包括:获取登录第二终端的第二用户需要在目标会话组中共享的目标文件,以及目标文件对应的目标白名单信息,其中,目标白名单信息用于标识目标会话组中具有共享目标文件的权限的成员;向服务器发送目标文件和目标白名单信息,以使服务器在接收到第一终端发送的用于访问目标文件的访问请求时,根据预先存储的文件标识与白名单信息的对应关系,确定与目标文件的文件标识对应的目标白名单信息,并根据目标白名单信息和第一用户的用户标识,判断第一用户是否具有共享目标文件的权限,如果第一用户不具有共享目标文件的权限,则拒绝向第一终端发送目标文件。In a second aspect, an embodiment of the present application also discloses a file sharing method, which is applied to a second terminal, and the method includes: obtaining a target file that a second user logging in to the second terminal needs to share in a target conversation group, and The target whitelist information corresponding to the target file, where the target whitelist information is used to identify members in the target conversation group who have the permission to share the target file; the target file and target whitelist information are sent to the server, so that the server receives the first When the terminal sends an access request for accessing the target file, it determines the target whitelist information corresponding to the file identifier of the target file according to the pre-stored correspondence between the file identifier and the whitelist information, and determines the target whitelist information corresponding to the file identifier of the target file according to the target whitelist information and the first The user ID of the user determines whether the first user has the permission to share the target file, and if the first user does not have the permission to share the target file, refuse to send the target file to the first terminal.
第三方面,本申请实施例还公开了一种文件共享方法,该方法应用于服务器,该方法包括:接收第一终端发送的用于访问目标文件的访问请求,其中,访问请求中携带登录第一终端的第一用户的用户标识和目标文件的文件标识;目标文件为登录第二终端的第二用户需要在目标会话组中共享的文件,第二用户属于目标会话组的成员;根据预先存储的文件标识与会话组标识的对应关系、目标文件的文件标识和第一用户的用户标识,判断第一用户是否属于目标会话组的成员;如果第一用户不属于目标会话组的成员,则拒绝向第一终端发送目标文件。In the third aspect, the embodiment of the present application also discloses a file sharing method, which is applied to a server, and the method includes: receiving an access request for accessing a target file sent by a first terminal, wherein the access request carries a login first The user ID of the first user of a terminal and the file ID of the target file; the target file is a file that the second user who logs in to the second terminal needs to share in the target conversation group, and the second user is a member of the target conversation group; The corresponding relationship between the file ID and the conversation group ID, the file ID of the target file and the user ID of the first user, determine whether the first user is a member of the target conversation group; if the first user is not a member of the target conversation group, reject Send the target file to the first terminal.
第四方面,本申请实施例还公开了一种文件共享装置,该装置应用于服务器,该装置包括:接收模块,设置为接收第一终端发送的用于访问目标文件的访问请求,其中,访问请求中携带登录第一终端的第一用户的用户标识和目标文件的文件标识;目标文件为登录第二终端的第二用户需要在目标会话组中共享的文件,第二用户属于目标会话组的成员;确定模块,设置为根据预先存储的文件标识与白名单信息的对应关系,确定与目标文件的文件标识对应的目标白名单信息,其中,目标白名单信息用于标识目标会话组中具有共享目标文件的权限的成员;判断模块,设置为根据目标白名单信息和第一用户的用户标识,判断第一用户是否具有共享目标文件的权限;第一处理模块,设置为如果第一用户不具有共享目标文件的权限,则拒绝向第一终端发送目标文件。In a fourth aspect, the embodiment of the present application also discloses a file sharing device, which is applied to a server, and the device includes: a receiving module configured to receive an access request for accessing a target file sent by a first terminal, wherein the access The request carries the user ID of the first user who logs in to the first terminal and the file ID of the target file; the target file is a file that the second user who logs in to the second terminal needs to share in the target conversation group, and the second user belongs to the target conversation group Member; determination module, set to determine the target whitelist information corresponding to the file identifier of the target file according to the correspondence between the pre-stored file identifier and the whitelist information, where the target whitelist information is used to identify the target session group with sharing Member of the permission of the target file; the judgment module is set to judge whether the first user has the permission to share the target file based on the target whitelist information and the user ID of the first user; the first processing module is set to if the first user does not have If the permission of the target file is shared, the target file is refused to be sent to the first terminal.
第五方面,本申请实施例还提供一种文件共享装置,该装置应用于第二终端,该装置包括:获取模块,设置为获取登录第二终端的第二用户需要在目标会话组中共享的目标文件,以及目标文件对应的目标白名单信息,其中,目标白名单信息用于标识目标会话组中具有共享目标文件的权限的成员;发送模块,设置为向服务器发送目标文件和目标白名单 信息,以使服务器在接收到第一终端发送的用于访问目标文件的访问请求时,根据预先存储的文件标识与白名单信息的对应关系,确定与目标文件的文件标识对应的目标白名单信息,并根据目标白名单信息和第一用户的用户标识,判断第一用户是否具有共享目标文件的权限,如果第一用户不具有共享目标文件的权限,则拒绝向第一终端发送目标文件。In a fifth aspect, an embodiment of the present application also provides a file sharing device, which is applied to a second terminal, and the device includes: an acquisition module configured to acquire information that the second user who logs in to the second terminal needs to share in the target conversation group The target file, and target whitelist information corresponding to the target file, where the target whitelist information is used to identify members in the target conversation group who have the permission to share the target file; the sending module is set to send the target file and target whitelist information to the server , So that when the server receives the access request for accessing the target file sent by the first terminal, it determines the target whitelist information corresponding to the file identifier of the target file according to the pre-stored correspondence between the file identifier and the whitelist information, And according to the target whitelist information and the user identification of the first user, it is determined whether the first user has the permission to share the target file, and if the first user does not have the permission to share the target file, the target file is refused to be sent to the first terminal.
第六方面,本申请实施例还公开了一种文件共享装置,该装置应用于服务器,该装置包括:接收模块,用于接收第一终端发送的用于访问目标文件的访问请求,其中,所述访问请求中携带登录所述第一终端的第一用户的用户标识和所述目标文件的文件标识;所述目标文件为登录第二终端的第二用户需要在目标会话组中共享的文件,所述第二用户属于所述目标会话组的成员;判断模块,用于根据预先存储的文件标识与会话组标识的对应关系、所述目标文件的文件标识和所述第一用户的用户标识,判断所述第一用户是否属于所述目标会话组的成员;第一处理模块,用于如果所述第一用户不属于所述目标会话组的成员,则拒绝向所述第一终端发送所述目标文件。In a sixth aspect, the embodiment of the present application also discloses a file sharing device, which is applied to a server, and the device includes: a receiving module for receiving an access request for accessing a target file sent by a first terminal, wherein The access request carries the user ID of the first user who logs in to the first terminal and the file ID of the target file; the target file is a file that the second user who logs in to the second terminal needs to share in the target conversation group, The second user belongs to a member of the target conversation group; a judgment module is used to determine the correspondence between the file ID and the conversation group ID stored in advance, the file ID of the target file, and the user ID of the first user, Determine whether the first user is a member of the target conversation group; a first processing module, configured to refuse to send the first terminal to the first terminal if the first user is not a member of the target conversation group Target file.
第七方面,本申请实施例还提供一种文件共享系统,该系统包括服务器和多个终端;多个终端中的第二终端,设置为获取登录第二终端的第二用户需要在目标会话组中共享的目标文件,以及目标文件对应的目标白名单信息,其中,目标白名单信息用于标识目标会话组中具有共享目标文件的权限的成员;向服务器发送目标文件和目标白名单信息;服务器,设置为接收多个终端中的第一终端发送的用于访问目标文件的访问请求;根据预先存储的文件标识与白名单信息的对应关系,确定与目标文件的文件标识对应的目标白名单信息;根据目标白名单信息和第一用户的用户标识,判断第一用户是否具有共享目标文件的权限;如果第一用户不具有共享目标文件的权限,则拒绝向第一终端发送目标文件。In a seventh aspect, an embodiment of the present application also provides a file sharing system, which includes a server and a plurality of terminals; the second terminal of the plurality of terminals is set to obtain that the second user logging in to the second terminal needs to be in the target conversation group The target file shared in, and the target whitelist information corresponding to the target file, where the target whitelist information is used to identify members of the target conversation group who have the permission to share the target file; send the target file and target whitelist information to the server; , Set to receive an access request for accessing the target file sent by the first terminal of the plurality of terminals; determine the target whitelist information corresponding to the file identifier of the target file according to the pre-stored correspondence between the file identifier and the whitelist information ; According to the target whitelist information and the user identification of the first user, determine whether the first user has the permission to share the target file; if the first user does not have the permission to share the target file, refuse to send the target file to the first terminal.
第八方面,本申请实施例提供了一种服务器,包括:处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;存储器,设置为存放计算机程序;处理器,设置为执行存储器上所存放的程序时,实现本申请实施例所提供的服务器执行的文件共享方法的步骤。In an eighth aspect, an embodiment of the present application provides a server, including: a processor, a communication interface, a memory, and a communication bus. The processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is set to store A computer program; a processor configured to implement the steps of the file sharing method executed by the server provided in the embodiment of the present application when executing the program stored in the memory.
第九方面,本申请实施例提供了一种终端,包括:处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;存储器,设置为存放计算机程序;处理器,设置为执行存储器上所存放的程序时,实现本申请实施例所提供的第二终端执行的文件共享方法的步骤。In a ninth aspect, an embodiment of the present application provides a terminal, including: a processor, a communication interface, a memory, and a communication bus. The processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is set to store A computer program; a processor configured to implement the steps of the file sharing method executed by the second terminal provided in the embodiment of the present application when executing the program stored on the memory.
第十方面,本申请实施例提供了一种计算机可读存储介质,计算机可读存储介质内存储有计算机程序,计算机程序被处理器执行时,实现本申请实施例所提供的服务器执行的 文件共享方法的步骤。In a tenth aspect, an embodiment of the present application provides a computer-readable storage medium with a computer program stored in the computer-readable storage medium. When the computer program is executed by a processor, the file sharing performed by the server provided by the embodiment of the present application is realized. Method steps.
第十一方面,本申请实施例提供了一种计算机可读存储介质,计算机可读存储介质内存储有计算机程序,计算机程序被处理器执行时,实现本申请实施例所提供的第二终端执行的文件共享方法的步骤。In an eleventh aspect, an embodiment of the present application provides a computer-readable storage medium with a computer program stored in the computer-readable storage medium. When the computer program is executed by a processor, the second terminal provided by the embodiment of the present application can be executed. The steps of the file sharing method.
第十二方面,本申请实施例提供了一种包含指令的计算机程序产品,包含指令的计算机程序产品在计算机上运行时,使得计算机执行本申请实施例所提供的服务器执行的文件共享方法的步骤。In a twelfth aspect, an embodiment of the application provides a computer program product containing instructions. When the computer program product containing instructions runs on a computer, the computer executes the steps of the file sharing method performed by the server provided in the embodiments of the application. .
第十三方面,本申请实施例提供了一种包含指令的计算机程序产品,包含指令的计算机程序产品在计算机上运行时,使得计算机执行本申请实施例所提供的第二终端执行的文件共享方法的步骤。In a thirteenth aspect, an embodiment of the present application provides a computer program product containing instructions. When the computer program product containing instructions runs on a computer, the computer executes the file sharing method performed by the second terminal provided by the embodiments of the present application. A step of.
第十四方面,本申请实施例提供了一种计算机程序,计算机程序在计算机上运行时,使得计算机执行本申请实施例所提供的服务器执行的文件共享方法的步骤。In a fourteenth aspect, an embodiment of the present application provides a computer program that, when the computer program runs on a computer, causes the computer to execute the steps of the file sharing method executed by the server provided in the embodiment of the present application.
第十五方面,本申请实施例提供了一种计算机程序,计算机程序在计算机上运行时,使得计算机执行本申请实施例所提供的第二终端执行的文件共享方法的步骤。In a fifteenth aspect, an embodiment of the present application provides a computer program that, when running on a computer, causes the computer to execute the steps of the file sharing method executed by the second terminal provided in the embodiment of the present application.
本申请实施例具有以下有益效果:The embodiments of this application have the following beneficial effects:
采用上述技术方案,服务器在接收到访问请求时,通过文件标识和白名单信息的对应关系确定对应的白名单信息,进而可以通过白名单信息和第一用户的用户标识,判断第一用户是否具有共享目标文件的权限。即针对某个文件,预先设置白名单信息,只有在白名单信息所标识的具有共享该文件的权限的成员才能访问该文件,因而在该白名单所标识的成员以外的其他用户没有访问权限,使得目标白名单所标识的成员以外的其他用户即使获得目标文件的文件标识,也无法获取目标文件,进而能够提高文件共享的安全性。With the above technical solution, when the server receives the access request, it determines the corresponding white list information through the correspondence between the file identifier and the white list information, and then can determine whether the first user has the white list information and the user identifier of the first user. The permissions of the shared target file. That is, for a certain file, the whitelist information is preset, and only the members with the permission to share the file identified by the whitelist information can access the file, so users other than the members identified by the whitelist have no access permissions. Therefore, even if users other than the members identified in the target whitelist obtain the file identifier of the target file, they cannot obtain the target file, thereby improving the security of file sharing.
当然,实施本申请的任一产品或方法并不一定需要同时达到以上所述的所有优点。Of course, implementing any product or method of the present application does not necessarily need to achieve all the advantages described above at the same time.
附图说明Description of the drawings
为了更清楚地说明本申请实施例和相关技术的技术方案,下面对实施例和相关技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application and related technologies, the following briefly introduces the drawings that need to be used in the embodiments and related technologies. Obviously, the drawings in the following description are only of the present application. For some embodiments, those of ordinary skill in the art can obtain other drawings based on these drawings without creative work.
图1为本申请实施例提供的一种文件共享系统的结构图;FIG. 1 is a structural diagram of a file sharing system provided by an embodiment of this application;
图2为本申请实施例提供的一种文件共享方法的流程图;FIG. 2 is a flowchart of a file sharing method provided by an embodiment of the application;
图3为本申请实施例提供的另一种文件共享方法的流程图;FIG. 3 is a flowchart of another file sharing method provided by an embodiment of the application;
图4为本申请实施例提供的另一种文件共享方法的流程图;FIG. 4 is a flowchart of another file sharing method provided by an embodiment of the application;
图5为本申请实施例提供的一种文件共享方法示例的流程图;FIG. 5 is a flowchart of an example of a file sharing method provided by an embodiment of the application;
图6为本申请实施例提供的另一种文件共享方法示例的流程图;6 is a flowchart of another example of a file sharing method provided by an embodiment of the application;
图7为本申请实施例提供的另一种文件共享方法示例的流程图;FIG. 7 is a flowchart of another example of a file sharing method provided by an embodiment of the application;
图8为本申请实施例提供的一种文件共享装置的结构图;FIG. 8 is a structural diagram of a file sharing device provided by an embodiment of the application;
图9为本申请实施例提供的另一种文件共享装置的结构图;FIG. 9 is a structural diagram of another file sharing device provided by an embodiment of the application;
图10为本申请实施例提供的一种服务器的结构图;FIG. 10 is a structural diagram of a server provided by an embodiment of this application;
图11为本申请实施例提供的一种终端的结构图。FIG. 11 is a structural diagram of a terminal provided by an embodiment of the application.
具体实施方式Detailed ways
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions, and advantages of the present application clearer, the following further describes the present application in detail with reference to the drawings and embodiments. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by a person of ordinary skill in the art without creative work shall fall within the protection scope of this application.
相关技术中,当用户在会话组中共享文件时,会话组的成员以外的其他用户也有可能通过一些手段,获取到该文件的访问入口或者该文件的文件标识,进而,可以通过该访问入口或该文件的文件标识从服务器中获取该文件,导致文件共享的安全性较低。In related technologies, when a user shares a file in a conversation group, users other than the members of the conversation group may also obtain the access entry of the file or the file identifier of the file through some means, and further, can use the access entry or The file identifier of the file obtains the file from the server, resulting in low file sharing security.
例如,参见图1,图1为本申请实施例提供的一种文件共享系统的结构图,可以包括服务器、第一终端、第二终端、第三终端和第四终端。For example, referring to Fig. 1, Fig. 1 is a structural diagram of a file sharing system provided by an embodiment of the application, which may include a server, a first terminal, a second terminal, a third terminal, and a fourth terminal.
相关技术中,如果登录第二终端的用户2需要与登录第一终端的用户1和登录第三终端的用户3共享某一文件(即目标文件),用户2可以通过第二终端创建一个会话组,并邀请用户1和用户3加入该会话组(即目标会话组)。然后,用户2可以通过第二终端在目标会话组中将目标文件发送至服务器,服务器则可以将目标文件存储在为目标会话组分配的存储空间中。并将目标文件的文件标识,发送至目标会话组中的其他用户登录的终端(即第一终端和第三终端)。在第一终端和第三终端获取目标文件的文件标识后,可以根据目标文件的文件标识向服务器发送针对目标文件的访问请求。当服务器接收到访问请求时,服务器可以将目标文件发送至第一终端和第三终端,进而实现用户1、用户2和用户3共享目标文件。即使登录第四终端的用户4不是上述目标会话组的成员,如果用户4通过第四终端获取到目标文件的文件标识,第四终端也可以向服务器发送针对目标文件的访问请求。当服务器接收到访问请求时,服务器可以将目标文件发送至第四终端,进而导致文件共享的安全性较低。In the related art, if user 2 who logs in to the second terminal needs to share a file (ie target file) with user 1 who logs in to the first terminal and user 3 who logs in to the third terminal, user 2 can create a conversation group through the second terminal. , And invite user 1 and user 3 to join the conversation group (that is, the target conversation group). Then, the user 2 can send the target file in the target conversation group to the server through the second terminal, and the server can store the target file in the storage space allocated for the target conversation group. And send the file identifier of the target file to the terminals (that is, the first terminal and the third terminal) where other users in the target conversation group log in. After the first terminal and the third terminal obtain the file identifier of the target file, they can send an access request for the target file to the server according to the file identifier of the target file. When the server receives the access request, the server can send the target file to the first terminal and the third terminal, so that users 1, user 2, and user 3 can share the target file. Even if the user 4 who logs in to the fourth terminal is not a member of the target conversation group, if the user 4 obtains the file identifier of the target file through the fourth terminal, the fourth terminal may also send an access request for the target file to the server. When the server receives the access request, the server can send the target file to the fourth terminal, which results in low file sharing security.
为了解决上述问题,本申请实施例提供了一种文件共享方法,可以应用于服务器。In order to solve the above problem, the embodiment of the present application provides a file sharing method, which can be applied to a server.
图1中,当服务器接收到第四终端发送的针对目标文件的访问请求时,服务器可以根据预先存储的文件标识与白名单信息的对应关系,确定与目标文件的文件标识对应的目标白名单信息。并根据目标白名单信息和用户4的用户标识,判断用户4是否具有共享目标文件的权限。In Figure 1, when the server receives the access request for the target file sent by the fourth terminal, the server can determine the target whitelist information corresponding to the file identifier of the target file according to the correspondence between the file identifier and the whitelist information stored in advance . And based on the target whitelist information and the user ID of the user 4, it is determined whether the user 4 has the permission to share the target file.
当服务器判定用户4不具有共享目标文件的权限时,服务器则拒绝向第四终端发送目标文件,进而,能够提高文件共享的安全性。When the server determines that the user 4 does not have the right to share the target file, the server refuses to send the target file to the fourth terminal, thereby improving the security of file sharing.
参见图2,图2为本申请实施例提供的一种文件共享方法的流程图,该方法可以应用于服务器,该方法可以包括以下步骤:Referring to FIG. 2, FIG. 2 is a flowchart of a file sharing method provided by an embodiment of the application. The method may be applied to a server, and the method may include the following steps:
S201:接收第一终端发送的用于访问目标文件的访问请求。S201: Receive an access request for accessing a target file sent by the first terminal.
其中,访问请求中携带登录第一终端的第一用户的用户标识和目标文件的文件标识。Wherein, the access request carries the user identifier of the first user who logs in to the first terminal and the file identifier of the target file.
用户标识可以为用户的UID(User Identification,用户身份证明)或其他标识。相关技术中,终端发送的访问请求中可以携带有登录该终端的用户的Session(会话)信息,会话信息可以包括用户的UID、UserName(用户名)、用户登录的IP(Internet Protocol,网际协议)地址等信息。The user identification can be the user's UID (User Identification) or other identifications. In related technologies, the access request sent by the terminal may carry the Session (session) information of the user logging in to the terminal, and the session information may include the user's UID, UserName (user name), and the user's login IP (Internet Protocol, Internet Protocol). Address and other information.
目标文件可以为登录第二终端的第二用户需要在目标会话组中共享的文件,第二用户属于目标会话组的成员,目标文件可以是办公文档、图片或其他文件。第二用户可以与目标会话组中的部分成员共享目标文件,也可以与目标会话组中的全部成员共享目标文件。目标文件的文件标识可以是服务器为目标文件分配的唯一标识。例如,目标文件的文件标识可以为目标文件的URL(Uniform Resource Locator,统一资源定位符)。The target file may be a file that the second user who logs in to the second terminal needs to share in the target conversation group. The second user is a member of the target conversation group, and the target file may be an office document, a picture, or other files. The second user can share the target file with some members of the target conversation group, or can share the target file with all members of the target conversation group. The file identifier of the target file may be a unique identifier assigned by the server to the target file. For example, the file identifier of the target file may be the URL (Uniform Resource Locator, uniform resource locator) of the target file.
第一终端可以是目标会话组的成员登录的终端,也可以是目标会话组的成员以外的其他用户(可以称为第三用户)登录的终端(可以称为第三终端)。例如,目标会话组的成员可能会通过终端将目标文件的文件标识发送至第三终端。The first terminal may be a terminal logged in by a member of the target conversation group, or a terminal (may be called a third terminal) logged in by a user other than a member of the target conversation group (may be referred to as a third user). For example, a member of the target conversation group may send the file identifier of the target file to the third terminal through the terminal.
在本申请实施例中,当第一用户需要获取目标文件时,第一用户可以通过第一终端获取目标文件的文件标识,并根据目标文件的文件标识,向服务器发送针对目标文件的访问请求。相应的,服务器可以接收到第一终端发送的访问请求。In the embodiment of the present application, when the first user needs to obtain the target file, the first user may obtain the file identification of the target file through the first terminal, and send an access request for the target file to the server according to the file identification of the target file. Correspondingly, the server can receive the access request sent by the first terminal.
S202:根据预先存储的文件标识与白名单信息的对应关系,确定与目标文件的文件标识对应的目标白名单信息。S202: Determine the target whitelist information corresponding to the file identifier of the target file according to the pre-stored correspondence between the file identifier and the whitelist information.
其中,目标白名单信息用于标识目标会话组中具有共享目标文件的权限的成员。Wherein, the target whitelist information is used to identify members in the target conversation group who have the permission to share the target file.
在本申请实施例中,在服务器接收到第一终端发送的访问请求后,服务器可以获取访问请求中携带的目标文件的文件标识。进而,服务器可以在预先存储的文件标识与白名单 信息的对应关系中进行查询,确定与目标文件的文件标识对应的白名单信息(即目标白名单信息)。后续,服务器可以根据目标白名单信息确定第一用户是否具有共享目标文件的权限。In the embodiment of the present application, after the server receives the access request sent by the first terminal, the server may obtain the file identifier of the target file carried in the access request. Furthermore, the server can query the correspondence between the file identifier and the whitelist information stored in advance to determine the whitelist information corresponding to the file identifier of the target file (ie, target whitelist information). Subsequently, the server may determine whether the first user has the permission to share the target file according to the target whitelist information.
S203:根据目标白名单信息和第一用户的用户标识,判断第一用户是否具有共享目标文件的权限。S203: Determine whether the first user has the right to share the target file according to the target whitelist information and the user identification of the first user.
在本申请实施例中,在服务器接收到第一终端发送的访问请求后,服务器可以获取访问请求中携带的第一用户的用户标识。In the embodiment of the present application, after the server receives the access request sent by the first terminal, the server may obtain the user identifier of the first user carried in the access request.
然后,服务器可以根据目标白名单信息和第一用户的用户标识,判断第一用户是否具有共享目标文件的权限。Then, the server can determine whether the first user has the right to share the target file according to the target whitelist information and the user identification of the first user.
S204:如果第一用户不具有共享目标文件的权限,则拒绝向第一终端发送目标文件。S204: If the first user does not have the right to share the target file, refuse to send the target file to the first terminal.
在本申请实施例中,当服务器判定第一用户不具有共享目标文件的权限时,服务器可以拒绝向第一终端发送目标文件。In the embodiment of the present application, when the server determines that the first user does not have the right to share the target file, the server may refuse to send the target file to the first terminal.
一种实现方式中,服务器可以不进行任何处理,或者,服务器可以丢弃第一终端的访问请求。In an implementation manner, the server may not perform any processing, or the server may discard the access request of the first terminal.
如果第一用户具有共享目标文件的权限,则向第一终端发送该目标文件。If the first user has the right to share the target file, the target file is sent to the first terminal.
本申请实施例提供的文件共享方法,服务器在接收到访问请求时,通过文件标识和白名单信息的对应关系确定对应的白名单信息,进而可以通过白名单信息和第一用户的用户标识,判断第一用户是否具有共享目标文件的权限。即针对某个文件,预先设置白名单信息,只有在白名单信息所标识的具有共享该文件的权限的成员才能访问该文件,因而在该白名单所标识的成员以外的其他用户没有访问权限,使得目标白名单所标识的成员以外的其他用户即使获得目标文件的文件标识,也无法获取目标文件,进而能够提高文件共享的安全性。In the file sharing method provided by the embodiments of the present application, when the server receives the access request, the corresponding whitelist information is determined by the correspondence between the file identifier and the whitelist information, and then the whitelist information and the user identifier of the first user can be used to determine Whether the first user has the permission to share the target file. That is, for a file, the whitelist information is preset, and only the members with the permission to share the file identified by the whitelist information can access the file, so users other than the members identified by the whitelist have no access permissions. Therefore, even if users other than the members identified in the target whitelist obtain the file identifier of the target file, they cannot obtain the target file, thereby improving the security of file sharing.
在一种实施方式中,在S201之前,该方法还可以包括以下步骤:In an embodiment, before S201, the method may further include the following steps:
接收第二终端发送的目标文件和目标文件对应的目标白名单信息,保存目标文件的文件标识与目标白名单信息的对应关系,将目标文件的文件标识发送至目标会话组中除第二用户以外的其他用户登录的终端。Receive the target file and the target whitelist information corresponding to the target file sent by the second terminal, save the correspondence between the file identifier of the target file and the target whitelist information, and send the file identifier of the target file to the target conversation group except for the second user The terminal that other users log in.
在本申请实施例中,当第二用户需要与目标会话组中其他成员共享某一文件(即目标文件)时,第二用户可以通过第二终端在该目标会话组的对话窗口中,选择上传目标文件,并选择允许共享目标文件的成员。第二终端则可以根据第二用户的选择,生成目标文件对应的目标白名单信息,并将目标文件和目标白名单信息发送至服务器。In the embodiment of the present application, when the second user needs to share a file (ie the target file) with other members of the target conversation group, the second user can select upload in the dialog window of the target conversation group through the second terminal Target file and select the members who are allowed to share the target file. The second terminal may generate the target whitelist information corresponding to the target file according to the selection of the second user, and send the target file and the target whitelist information to the server.
相应的,服务器则可以接收到第二终端发送的目标文件和目标白名单信息,并保存目 标文件的文件标识与目标白名单信息的对应关系,以便进行后续处理。Correspondingly, the server can receive the target file and target whitelist information sent by the second terminal, and save the correspondence between the file identifier of the target file and the target whitelist information for subsequent processing.
另外,在服务器接收到目标文件后,服务器可以将目标文件存储在本地为目标会话组分配的存储空间中。或者,服务器也可以将目标文件存储在预设文件存储系统中为目标会话组分配的存储空间中,预设文件存储系统可以是分布式对象存储系统或其他类型的存储系统。服务器存储目标文件的方法并不限定于上述方式。In addition, after the server receives the target file, the server may store the target file in the storage space allocated locally for the target conversation group. Alternatively, the server may also store the target file in a storage space allocated for the target conversation group in a preset file storage system. The preset file storage system may be a distributed object storage system or another type of storage system. The method for the server to store the target file is not limited to the above method.
一种实现方式中,服务器可以在预设业务存储系统中,记录文件标识与白名单信息的对应关系。预设业务存储系统可以为key(关键帧)-value(值)型分布式存储系统,例如,mysql等关系型数据库,或者,也可以为redis、mongodb等存储系统。服务器可以将文件标识作为key,将白名单信息作为对应的value进行记录。需要说明的是,上述预设业务存储系统还可以存储文件标识与组合内容之间的对应关系,其中,该组合内容为共享目标文件的用户的用户标识和对应的白名单信息的内容的组合。In an implementation manner, the server may record the correspondence between the file identifier and the whitelist information in the preset service storage system. The preset business storage system may be a key (key frame)-value (value) distributed storage system, for example, a relational database such as mysql, or it may be a storage system such as redis and mongodb. The server can record the file identifier as the key and the whitelist information as the corresponding value. It should be noted that the foregoing preset service storage system may also store the correspondence between the file identifier and the combined content, where the combined content is a combination of the user identifier of the user sharing the target file and the content of the corresponding whitelist information.
在服务器获取目标文件后,服务器还可以将目标文件的文件标识发送至目标会话组中除第二用户以外的其他用户(可以称为第四用户)登录的终端(可以称为第四终端)。After the server obtains the target file, the server may also send the file identifier of the target file to the terminal (may be called the fourth terminal) logged in by other users (may be called the fourth user) in the target conversation group except the second user.
相应的,第四终端可以在目标会话组的对话窗口中显示目标文件的文件标识。当第四用户需要获取目标文件时,第四用户可以向第四终端输入获取目标文件的指令,第四终端则可以向服务器发送针对目标文件的访问请求,以获取目标文件。Correspondingly, the fourth terminal may display the file identifier of the target file in the dialog window of the target conversation group. When the fourth user needs to obtain the target file, the fourth user may input an instruction to obtain the target file to the fourth terminal, and the fourth terminal may send an access request for the target file to the server to obtain the target file.
在本申请实施例中,目标白名单信息可以包括不同类型的数据,结合以下三种实施方式分别进行说明。In the embodiments of the present application, the target whitelist information may include different types of data, which are described separately in combination with the following three implementation manners.
在第一种实施方式中,目标白名单信息为目标会话组的会话组标识。即目标会话组的成员均具有共享目标文件的权限。在上述预设业务存储系统中,可以记录文件标识与会话组标识之间的对应关系,服务器可以将文件标识作为key,将会话组标识作为value进行记录。In the first implementation manner, the target whitelist information is the conversation group identifier of the target conversation group. That is, the members of the target conversation group have the permission to share the target file. In the foregoing preset service storage system, the corresponding relationship between the file identifier and the session group identifier can be recorded, and the server can record the file identifier as the key and the session group identifier as the value.
在该实施方式中,如图3所示,本申请实施例提供一种文件共享方法,该方法可以应用于服务器,该方法可以包括以下步骤:In this embodiment, as shown in FIG. 3, an embodiment of the present application provides a file sharing method, which can be applied to a server, and the method can include the following steps:
S301:接收第一终端发送的用于访问目标文件的访问请求。S301: Receive an access request for accessing the target file sent by the first terminal.
S301与上述S201相同,可参考上述S201中的相关描述,此处不再赘述。S301 is the same as the above S201, and reference may be made to the related description in the above S201, which will not be repeated here.
S302:根据预先存储的文件标识与会话组标识的对应关系、目标文件的文件标识和第一用户的用户标识,判断第一用户是否属于目标会话组的成员。S302: Determine whether the first user is a member of the target conversation group according to the pre-stored correspondence between the file identifier and the conversation group identifier, the file identifier of the target file, and the user identifier of the first user.
在本申请实施例中,在服务器接收到第一终端发送的访问请求后,服务器可以获取访问请求中携带的第一用户的用户标识和目标文件的文件标识。并结合预先存储的文件标识与会话组标识的对应关系,判断第一用户是否属于目标会话组的成员。In the embodiment of the present application, after the server receives the access request sent by the first terminal, the server may obtain the user identification of the first user and the file identification of the target file carried in the access request. In combination with the pre-stored correspondence between the file identifier and the conversation group identifier, it is determined whether the first user is a member of the target conversation group.
判断方法为:根据预先存储的文件标识与会话组标识的对应关系,确定与目标文件的标识对应的目标白名单信息。然后判断第一用户是否属于目标会话组的成员。The judging method is: determining the target whitelist information corresponding to the identifier of the target file according to the correspondence between the file identifier and the session group identifier stored in advance. Then it is determined whether the first user is a member of the target conversation group.
如果第一用户属于目标会话组的成员,则确定第一用户具有共享目标文件的权限,进而向第一终端发送目标文件;如果第一用户不属于目标会话组的成员,则确定第一用户不具有共享目标文件的权限,进而执行S303。If the first user is a member of the target conversation group, it is determined that the first user has the right to share the target file, and then the target file is sent to the first terminal; if the first user is not a member of the target conversation group, it is determined that the first user does not Have the permission to share the target file, and then execute S303.
S303:如果第一用户不属于目标会话组的成员,则拒绝向第一终端发送目标文件。S303: If the first user is not a member of the target conversation group, refuse to send the target file to the first terminal.
在本申请实施例中,当服务器判定第一用户不属于目标会话组的成员时,即,确定第一用户不具备共享目标文件的权限,服务器可以拒绝向第一终端发送目标文件。In the embodiment of the present application, when the server determines that the first user is not a member of the target conversation group, that is, determines that the first user does not have the right to share the target file, the server may refuse to send the target file to the first terminal.
在本申请实施例中,当服务器判定第一用户不属于目标会话组的成员时,服务器还可以不进行任何处理,或者,服务器可以丢弃第一终端的访问请求。In the embodiment of the present application, when the server determines that the first user is not a member of the target conversation group, the server may not perform any processing, or the server may discard the access request of the first terminal.
采用该方法,服务器在接收到访问请求时,通过文件标识和会话组标识的对应关系、目标文件的文件标识和第一用户的用户标识,可以判断第一用户是否属于目标会话组的成员,从而确定第一用户是否可以访问该目标文件。由于目标会话组的成员以外的其他用户,并不属于目标会话组的成员,也就没有访问权限,使得目标会话组的成员以外的其他用户即使获得目标文件的文件标识,也无法获取目标文件,进而能够提高文件共享的安全性。With this method, when the server receives the access request, it can determine whether the first user is a member of the target conversation group through the correspondence between the file ID and the conversation group ID, the file ID of the target file, and the user ID of the first user. Determine whether the first user can access the target file. Since users other than the members of the target conversation group are not members of the target conversation group, they have no access rights, so that users other than the members of the target conversation group cannot obtain the target file even if they obtain the file identifier of the target file. In turn, the security of file sharing can be improved.
基于第一种实施方式,在S201之前,服务器可以接收第二终端发送的目标文件和目标会话组的会话标识,保存目标文件的文件标识与目标会话组的会话组标识的对应关系,将目标文件的文件标识发送至目标会话组中除第二用户以外的其他用户登录的终端。Based on the first implementation manner, before S201, the server may receive the target file and the session identifier of the target conversation group sent by the second terminal, save the correspondence between the file identifier of the target file and the conversation group identifier of the target conversation group, and convert the target file The file identifier of is sent to the terminal logged in by users other than the second user in the target conversation group.
其中,当第二用户需要与其他用户共享某一文件(即目标文件)时,第二用户可以通过第二终端创建一个会话组(即目标会话组),该目标会话组的成员可以包括第二用户和其他需要共享目标文件的用户。Wherein, when the second user needs to share a file (ie target file) with other users, the second user can create a conversation group (ie target conversation group) through the second terminal, and the members of the target conversation group may include the second Users and other users who need to share target files.
然后,第二用户可以通过第二终端在该目标会话组的对话窗口中,选择上传目标文件,第二终端则可以将目标文件和目标会话组的会话组标识发送至服务器。Then, the second user can select to upload the target file in the dialog window of the target conversation group through the second terminal, and the second terminal can send the target file and the conversation group identifier of the target conversation group to the server.
相应的,服务器则可以接收到第二终端发送的目标文件和目标会话组的会话组标识,并保存目标文件的文件标识与目标会话组的会话组标识的对应关系,以便进行后续处理。Correspondingly, the server may receive the target file and the conversation group identifier of the target conversation group sent by the second terminal, and save the correspondence between the file identifier of the target file and the conversation group identifier of the target conversation group for subsequent processing.
在本申请实施例中,S302可以包括以下步骤:In this embodiment of the application, S302 may include the following steps:
步骤S1,在预先存储的文件标识与会话组标识的对应关系中,确定与目标文件的文件标识对应的会话组标识,得到目标会话组标识。Step S1, in the pre-stored correspondence between the file identifier and the session group identifier, determine the session group identifier corresponding to the file identifier of the target file to obtain the target session group identifier.
其中,该目标会话组标识所标识的会话组即为目标会话组。Wherein, the conversation group identified by the target conversation group identifier is the target conversation group.
步骤S2,判断目标会话组标识所标识的会话组中成员的用户标识中,是否存在第一用户的用户标识,如果存在,确定第一用户属于目标会话组的成员,如果不存在,确定第一 用户不属于目标会话组的成员。Step S2: Determine whether the user ID of the first user exists among the user IDs of the members in the conversation group identified by the target conversation group ID. If so, determine that the first user is a member of the target conversation group; if not, determine the first user ID. The user is not a member of the target conversation group.
在本申请实施例中,当某一用户加入某一会话组时,服务器可以确定该用户与该会话组对应,并记录该用户的用户标识与该会话组的会话标识的对应关系。In the embodiment of the present application, when a certain user joins a certain conversation group, the server may determine that the user corresponds to the conversation group, and record the correspondence between the user ID of the user and the conversation ID of the conversation group.
在服务器接收到第一终端发送的针对目标文件的访问请求后,服务器可以从访问请求中提取目标文件的文件标识。然后,服务器可以通过上述步骤S1和步骤S2判断第一用户是否属于目标会话组的成员。After the server receives the access request for the target file sent by the first terminal, the server may extract the file identifier of the target file from the access request. Then, the server can determine whether the first user is a member of the target conversation group through the foregoing steps S1 and S2.
在本申请实施例中,如果第一用户不属于目标会话组的成员,则服务器向第一终端发送提醒消息,以通告第一终端该第一用户无权共享目标文件。In the embodiment of the present application, if the first user is not a member of the target conversation group, the server sends a reminder message to the first terminal to notify the first terminal that the first user has no right to share the target file.
可见,采用第一种实施方式,当第二用户在目标会话组的对话窗口中发送目标文件时,该目标会话组中的所有成员都将自动获得访问目标文件的权限。且服务器可以在某一用户加入目标会话组时,记录该用户与目标会话组的对应关系。因此,在第二用户发送目标文件后加入目标会话组的新用户,也会自动获得访问目标文件的权限。并且新用户发送访问请求后,可以从服务器中获取到目标文件,从而减少了第二用户向新用户再次发送目标文件的操作。而退出目标会话组的用户,都将自动失去访问目标文件的权限。另外,即使目标会话组的成员以外的其他用户获取到目标文件的文件标识,也无法获取目标文件,从而保障了目标文件的安全性。It can be seen that, in the first implementation manner, when the second user sends the target file in the dialog window of the target conversation group, all members of the target conversation group will automatically obtain the permission to access the target file. And the server can record the corresponding relationship between a certain user and the target conversation group when the user joins the target conversation group. Therefore, a new user who joins the target conversation group after the second user sends the target file will also automatically obtain the permission to access the target file. In addition, after the new user sends the access request, the target file can be obtained from the server, thereby reducing the operation of the second user to send the target file to the new user again. The users who exit the target conversation group will automatically lose the permission to access the target file. In addition, even if users other than the members of the target conversation group obtain the file identifier of the target file, they cannot obtain the target file, thereby ensuring the security of the target file.
在第二种实现方式中,目标白名单信息可以包括目标会话组的会话组标识和预设参数。预设参数用于表示目标会话组中的所有成员均是否均具有共享目标文件的权限,基于此,S203可以包括以下步骤:In the second implementation manner, the target whitelist information may include the conversation group identifier and preset parameters of the target conversation group. The preset parameter is used to indicate whether all members in the target conversation group have the permission to share the target file. Based on this, S203 may include the following steps:
步骤1,在预设参数的值用于表示目标会话组中的所有成员均具有共享目标文件的权限的情况下,查询目标会话组中所有成员的用户标识。Step 1: In the case where the value of the preset parameter is used to indicate that all members in the target conversation group have the right to share the target file, query the user IDs of all members in the target conversation group.
例如,服务器可以在会话组的会话组标识与会话组中成员的用户标识的对应关系中进行查询,确定与目标会话组的会话组标识对应的成员的用户标识(即目标会话组中所有成员的用户标识)。For example, the server can query the correspondence between the conversation group ID of the conversation group and the user ID of the members in the conversation group to determine the user ID of the member corresponding to the conversation group ID of the target conversation group (that is, the user ID of all members in the target conversation group). User ID).
步骤2,判断目标会话组中所有成员的用户标识中,是否存在第一用户的用户标识。如果目标会话组中所有成员的用户标识中,存在第一用户的用户标识,确定第一用户具有共享目标文件的权限;如果目标会话组中所有成员的用户标识中,不存在第一用户的用户标识,确定第一用户不具有共享目标文件的权限。Step 2: Determine whether there is a user ID of the first user among the user IDs of all members in the target conversation group. If the user ID of the first user exists among the user IDs of all members in the target conversation group, determine that the first user has the right to share the target file; if the user ID of all members in the target conversation group does not exist in the user ID of the first user Identifies that the first user does not have the right to share the target file.
预设参数可以由技术人员根据经验进行设置。例如,预设参数为A,若A为第一数值,则表示目标会话组中的所有成员均具有共享目标文件的权限;若A为第二数值,则表示目标会话组中的所有成员不都具有共享目标文件的权限。The preset parameters can be set by technicians based on experience. For example, the preset parameter is A. If A is the first value, it means that all members of the target conversation group have the permission to share the target file; if A is the second value, it means that all members of the target conversation group are not Have permission to share target files.
当某一用户加入某一会话组时,服务器可以确定该用户属于该会话组的成员,并记录该用户的用户标识与该会话组的会话组标识的对应关系。When a certain user joins a certain conversation group, the server can determine that the user is a member of the conversation group, and record the correspondence between the user ID of the user and the conversation group ID of the conversation group.
在服务器接收到目标文件和目标白名单信息后,如果目标白名单信息包括预设参数,且服务器确定预设参数当前的数值表示目标会话组中的所有成员均具有共享目标文件的权限,则服务器可以确定第二用户可以与目标会话组中的所有成员共享目标文件。After the server receives the target file and target whitelist information, if the target whitelist information includes preset parameters, and the server determines that the current value of the preset parameter indicates that all members in the target conversation group have the right to share the target file, the server It can be determined that the second user can share the target file with all members in the target conversation group.
因此,当服务器接收到第一终端发送的针对目标文件的访问请求后,可以通过上述步骤1和步骤2确定第一用户是否具有共享目标文件的权限。即若第一用户属于目标会话组,则确定第一用户具有共享目标文件的权限,若第一用户不属于目标会话组,则确定第一用户不具有共享目标文件的权限。Therefore, after the server receives the access request for the target file sent by the first terminal, it can determine whether the first user has the right to share the target file through the above steps 1 and 2. That is, if the first user belongs to the target conversation group, it is determined that the first user has the right to share the target file, and if the first user does not belong to the target conversation group, it is determined that the first user does not have the right to share the target file.
另外,目标白名单信息还可以包括目标会话组中具有共享目标文件的权限的成员的用户标识。在服务器接收到目标文件和目标白名单信息后,如果目标白名单信息包括预设参数,且服务器确定预设参数当前的数值表示目标会话组中的所有成员不都具有共享目标文件的权限,则服务器可以确定第二用户与目标会话组中的部分成员共享目标文件。In addition, the target whitelist information may also include user identifications of members in the target conversation group who have the right to share the target file. After the server receives the target file and target whitelist information, if the target whitelist information includes preset parameters, and the server determines that the current value of the preset parameter indicates that all members in the target conversation group do not have the permission to share the target file, then The server may determine that the second user shares the target file with some members of the target conversation group.
因此,当服务器接收到第一终端发送的针对目标文件的访问请求后,服务器可以获取目标白名单信息包含的用户标识。基于此,S203还可以实现为:Therefore, after the server receives the access request for the target file sent by the first terminal, the server can obtain the user identification included in the target whitelist information. Based on this, S203 can also be implemented as:
在预设参数的值用于表示目标会话组中的所有成员不都具有共享目标文件的权限的情况下,判断目标白名单信息包含的用户标识中,是否存在第一用户的用户标识。如果白名单信息包含的用户标识中,存在第一用户的用户标识,确定第一用户具有共享目标文件的权限,如果白名单信息包含的用户标识中,不存在第一用户的用户标识,确定第一用户不具有共享目标文件的权限。When the value of the preset parameter is used to indicate that all members in the target conversation group do not have the permission to share the target file, it is determined whether the user identity of the first user exists in the user identity included in the target whitelist information. If the user ID of the first user exists among the user IDs included in the whitelist information, determine that the first user has the right to share the target file; if the user ID included in the whitelist information does not include the user ID of the first user, determine the user ID of the first user. A user does not have permission to share the target file.
在第三种实现方式中,目标白名单信息还可以只包含有目标会话组中具有共享目标文件的权限的成员的用户标识,而不包含有预设参数。基于此,上述S203可以实现为:In the third implementation manner, the target whitelist information may also only include the user identifiers of members in the target conversation group who have the permission to share the target file, without including preset parameters. Based on this, the above S203 can be implemented as:
判断目标白名单信息包含的用户标识中,是否存在第一用户的用户标识。如果目标白名单信息包含的用户标识中,存在第一用户的用户标识,表明第二用户允许第一用户共享目标文件,则服务器可以确定第一用户具有共享目标文件的权限;如果目标白名单信息包含的用户标识中,不存在第一用户的用户标识,表明第二用户不允许第一用户共享目标文件,则服务器可以确定第一用户不具有共享目标文件的权限。It is determined whether the user ID of the first user exists among the user IDs included in the target whitelist information. If the user ID contained in the target whitelist information contains the user ID of the first user, indicating that the second user allows the first user to share the target file, the server can determine that the first user has the permission to share the target file; if the target whitelist information Among the included user IDs, the user ID of the first user does not exist, indicating that the second user does not allow the first user to share the target file, and the server can determine that the first user does not have the right to share the target file.
在上述实施例的基础上,服务器还可以向具有共享目标文件的权限的成员登录的终端发送目标文件,该方法还可以包括以下步骤:On the basis of the foregoing embodiment, the server may also send the target file to the terminal logged in by the member who has the permission to share the target file, and the method may further include the following steps:
如果第一用户具有共享目标文件的权限,向第一终端发送目标文件。If the first user has the right to share the target file, the target file is sent to the first terminal.
在本申请实施例中,当服务器判定第一用户具有共享目标文件的权限时,服务器可以 向第一终端发送目标文件。In the embodiment of the present application, when the server determines that the first user has the right to share the target file, the server may send the target file to the first terminal.
可见,当第二用户在目标会话组的对话窗口中发送目标文件时,可以选择目标会话组中具有共享目标文件的权限的成员,即,第二终端可以得到目标白名单信息,并发送至服务器。相应的,服务器可以根据目标白名单信息,判断第一用户是否具有共享目标文件的权限。当服务器判定第一用户不具有共享目标文件的权限时,服务器可以拒绝向第一终端发送目标文件。It can be seen that when the second user sends the target file in the dialog window of the target conversation group, he can select members in the target conversation group who have the permission to share the target file, that is, the second terminal can obtain the target whitelist information and send it to the server . Correspondingly, the server can determine whether the first user has the permission to share the target file according to the target whitelist information. When the server determines that the first user does not have the right to share the target file, the server may refuse to send the target file to the first terminal.
基于上述处理,目标白名单所标识的成员以外的其他用户没有访问权限,进而使得目标白名单所标识的成员以外的其他用户即使获得目标文件的文件标识,服务器也不会向该用户登录的终端发送对应的目标文件,进而能够提高文件共享的安全性。Based on the above processing, users other than the members identified in the target whitelist have no access rights, so that even if users other than the members identified in the target whitelist obtain the file identification of the target file, the server will not log in to the terminal of the user. Sending the corresponding target file can improve the security of file sharing.
另外,第二用户不需要新创建会话组,就可以实现仅与目标会话组中的部分成员共享目标文件,进而能够方便用户操作,提高文件共享的效率。In addition, the second user does not need to create a new conversation group, and can only share the target file with some members of the target conversation group, thereby facilitating user operations and improving the efficiency of file sharing.
在本申请另一实施例中,为了进一步提高用户体验,服务器还可以向终端发送提醒消息,该方法还可以包括以下步骤:In another embodiment of the present application, in order to further improve user experience, the server may also send a reminder message to the terminal, and the method may further include the following steps:
如果第一用户不具有共享目标文件的权限,向第一终端发送提醒消息,以通告第一终端第一用户无权共享目标文件。If the first user does not have the right to share the target file, a reminder message is sent to the first terminal to notify the first terminal that the first user has no right to share the target file.
在本申请实施例中,当服务器判定第一用户不具有共享目标文件的权限时,服务器不仅可以拒绝向第一终端发送目标文件,还可以向第一终端发送提醒消息。相应的,第一终端可以接收到提醒消息,并确定当前登录的第一用户无权共享目标文件。例如,第一终端可以在目标会话组的对话窗口中显示“无权共享目标文件”的消息。In the embodiment of the present application, when the server determines that the first user does not have the right to share the target file, the server may not only refuse to send the target file to the first terminal, but also may send a reminder message to the first terminal. Correspondingly, the first terminal may receive the reminder message and determine that the first user currently logged in does not have the right to share the target file. For example, the first terminal may display a message "No right to share the target file" in the dialog window of the target conversation group.
参见图4,图4为本申请实施例提供的一种文件共享方法的流程图,该方法可以应用于第二终端,该方法可以包括以下步骤:Referring to FIG. 4, FIG. 4 is a flowchart of a file sharing method provided by an embodiment of this application. The method may be applied to a second terminal. The method may include the following steps:
S401:获取登录第二终端的第二用户需要在目标会话组中共享的目标文件,以及目标文件对应的目标白名单信息。S401: Acquire target files that need to be shared in the target conversation group by the second user who logs in to the second terminal, and target whitelist information corresponding to the target files.
其中,目标白名单信息用于标识目标会话组中具有共享目标文件的权限的成员。目标文件可以是办公文档、图片或其他文件。目标会话组中具有共享目标文件的权限的成员可以是目标会话组中的一个成员,也可以是目标会话组中的多个部分成员,还可以是目标会话组中的全部成员。Wherein, the target whitelist information is used to identify members in the target conversation group who have the permission to share the target file. The target file can be office documents, pictures, or other files. The member with the permission to share the target file in the target conversation group may be a member of the target conversation group, may also be a plurality of partial members in the target conversation group, or may be all members of the target conversation group.
在本申请实施例中,当第二用户需要与目标会话组中的成员共享某一文件(即目标文件)时,第二用户可以通过第二终端在目标会话组的对话窗口中,选择需要共享的目标文件,并确定目标会话组中允许共享目标文件的其他成员。相应的,第二终端则可以获取目标文件和对应的目标白名单信息。In the embodiment of the present application, when the second user needs to share a file (ie, target file) with members of the target conversation group, the second user can select the need to share in the dialog window of the target conversation group through the second terminal Target file and determine other members of the target conversation group that are allowed to share the target file. Correspondingly, the second terminal can obtain the target file and the corresponding target whitelist information.
S402:向服务器发送目标文件和目标白名单信息,以使服务器在接收到第一终端发送的用于访问目标文件的访问请求时,根据预先存储的文件标识与白名单信息的对应关系,确定与目标文件的文件标识对应的目标白名单信息。并根据目标白名单信息和第一用户的用户标识,判断第一用户是否具有共享目标文件的权限,如果第一用户不具有共享目标文件的权限,则拒绝向第一终端发送目标文件。S402: Send the target file and target whitelist information to the server, so that when the server receives the access request for accessing the target file sent by the first terminal, it determines the corresponding relationship based on the pre-stored file identifier and the whitelist information. Target whitelist information corresponding to the file identifier of the target file. And based on the target whitelist information and the user identification of the first user, it is determined whether the first user has the permission to share the target file, and if the first user does not have the permission to share the target file, the target file is refused to be sent to the first terminal.
在本申请实施例中,第二终端可以将目标文件和目标白名单信息发送至服务器。In the embodiment of the present application, the second terminal may send the target file and target whitelist information to the server.
相应的,服务器则可以接收到第二终端发送的目标文件和目标白名单信息,并保存目标文件的标识和目标白名单信息的对应关系。Correspondingly, the server can receive the target file and target whitelist information sent by the second terminal, and save the correspondence between the target file identifier and the target whitelist information.
后续,当服务器接收到其他终端(即第一终端)根据目标文件的文件标识发送的针对目标文件的访问请求时,服务器可以根据目标白名单信息,判断登录第一终端的第一用户是否具有共享目标文件的权限。当服务器判定第一用户不具有共享目标文件的权限时,服务器可以拒绝向第一终端发送目标文件。Subsequently, when the server receives an access request for the target file sent by another terminal (ie, the first terminal) according to the file identifier of the target file, the server can determine whether the first user who logs in to the first terminal has sharing based on the target whitelist information The permissions of the target file. When the server determines that the first user does not have the right to share the target file, the server may refuse to send the target file to the first terminal.
服务器的处理步骤在上述实施例中已详细介绍,此处不再赘述。The processing steps of the server have been described in detail in the foregoing embodiment, and will not be repeated here.
可见,基于本申请实施例提供的文件共享方法,第二用户在共享目标文件时,可以通过第二终端向服务器发送对应的目标白名单信息。相应的,服务器在接收到第一用户通过第一终端发送的访问请求时,则可以通过文件标识和白名单信息的对应关系、目标文件的文件标识和第一用户的用户标识,来判断第一用户是否具有共享目标文件的权限,以确定该第一用户是否可以访问该目标文件。即,目标白名单所标识的成员以外的其他用户没有访问权限,进而使得目标白名单所标识的成员以外的其他用户即使获得目标文件的文件标识,也无法获取目标文件,进而能够提高文件共享的安全性。It can be seen that, based on the file sharing method provided by the embodiment of the present application, when the second user shares the target file, the corresponding target whitelist information can be sent to the server through the second terminal. Correspondingly, when the server receives the access request sent by the first user through the first terminal, it can determine the first user through the correspondence between the file identifier and the whitelist information, the file identifier of the target file, and the user identifier of the first user. Whether the user has the right to share the target file to determine whether the first user can access the target file. That is, users other than the members identified by the target whitelist do not have access rights, so that even if users other than the members identified by the target whitelist obtain the file identifier of the target file, they cannot obtain the target file, thereby improving the file sharing performance. safety.
另外,第二终端可以根据用户的操作,获取目标白名单信息。在一实施方式中,获取目标白名单信息可以包括以下步骤:In addition, the second terminal may obtain target whitelist information according to the user's operation. In an implementation manner, obtaining target whitelist information may include the following steps:
接收针对预定区域的操作所触发的信号。Receive a signal triggered by an operation in a predetermined area.
其中,预定区域位于第二终端展示的文件访问权限设置界面中,信号中包括目标文件对应的目标白名单信息。The predetermined area is located in the file access permission setting interface displayed by the second terminal, and the signal includes target whitelist information corresponding to the target file.
当第二用户在目标会话组中选择共享目标文件时,第二终端可以展示针对目标文件的文件访问权限设置界面。进而,第二用户可以在第二终端展示的界面中预定区域进行操作,以选择目标会话组中允许共享目标文件的成员,相应的,第二终端则可以确定目标会话组中能够共享目标文件的成员,得到目标白名单信息。When the second user selects to share the target file in the target conversation group, the second terminal may display a file access permission setting interface for the target file. Furthermore, the second user can perform operations in a predetermined area in the interface displayed by the second terminal to select members in the target conversation group that are allowed to share the target file. Accordingly, the second terminal can determine which members of the target conversation group can share the target file. Members, get target whitelist information.
例如,当第二用户在目标会话组中上传目标文件时,第二终端可以目标会话组的对话窗口中显示一个选择对话框。该选择对话框中可以显示有“在当前会话组中的所有成员中 共享目标文件”的选项。第二用户可以通过第二终端勾选该选项,第二终端则可以确定目标会话组中的所有成员均具有共享目标文件的权限,得到目标白名单信息。For example, when the second user uploads the target file in the target conversation group, the second terminal may display a selection dialog box in the conversation window of the target conversation group. The selection dialog box can display the option of "Share the target file among all members in the current conversation group". The second user can check this option through the second terminal, and the second terminal can determine that all members in the target conversation group have the permission to share the target file, and obtain the target whitelist information.
或者,当第二用户在目标会话组中上传目标文件时,第二终端可以在目标会话组的对话窗口中显示一个多选对话框。该多选对话框中可以显示有目标会话组中所有成员的用户名。第二用户可以通过第二终端勾选允许共享目标文件的成员的用户名,第二终端可以根据第二用户勾选的用户名,确定目标会话组中能够共享目标文件的成员,得到目标白名单信息。Or, when the second user uploads the target file in the target conversation group, the second terminal may display a multi-selection dialog box in the conversation window of the target conversation group. The multiple selection dialog box can display the user names of all members in the target conversation group. The second user can check the user names of the members who are allowed to share the target file through the second terminal, and the second terminal can determine the members of the target conversation group who can share the target file according to the user names checked by the second user to obtain the target whitelist information.
在一种实施方式中,目标白名单信息为目标会话组的会话标识。当第二用户在目标会话组中上传目标文件时,无需进行权限设置,默认目标会话组中的所有成员都将自动获得访问目标文件的权限。In an embodiment, the target whitelist information is the session identifier of the target session group. When the second user uploads the target file in the target conversation group, there is no need to set permissions. By default, all members in the target conversation group will automatically obtain the permission to access the target file.
在一种实施方式中,目标白名单信息可以包括目标会话组的会话组标识和预设参数,预设参数用于表示目标会话组中的所有成员是否均具有共享目标文件的权限。In an embodiment, the target whitelist information may include the session group identifier of the target session group and preset parameters, and the preset parameters are used to indicate whether all members of the target session group have the right to share the target file.
预设参数可以由技术人员根据经验进行设置。例如,预设参数为A,A为第一数值,可以表示目标会话组中的所有成员均具有共享目标文件的权限,A为第二数值,可以表示目标会话组中的所有成员不都具有共享目标文件的权限。The preset parameters can be set by technicians based on experience. For example, the preset parameter is A, A is the first value, which can indicate that all members in the target conversation group have the permission to share the target file, and A is the second value, which can indicate that all members in the target conversation group do not have sharing The permissions of the target file.
作为示例,当第二用户在目标会话组中上传目标文件时,第二终端可以目标会话组的对话窗口中显示一个选择对话框,该选择对话框中可以显示有“在当前会话组中的所有成员中共享目标文件”的选项。第二用户可以通过第二终端勾选该选项。As an example, when the second user uploads the target file in the target conversation group, the second terminal may display a selection dialog box in the conversation window of the target conversation group, and the selection dialog box may display "in the current conversation group "Share target files among members" option. The second user can check this option through the second terminal.
相应的,第二终端则可以确定预设参数为上述第一数值,进而,第二终端可以将目标文件和包含预设参数的目标白名单信息发送至服务器。Correspondingly, the second terminal may determine that the preset parameter is the aforementioned first value, and further, the second terminal may send the target file and the target whitelist information including the preset parameter to the server.
或者,当第二用户在目标会话组中上传目标文件时,第二终端可以在目标会话组的对话窗口中显示一个多选对话框,该多选对话框中可以显示有目标会话组中所有成员的用户名。第二用户可以通过第二终端勾选允许共享目标文件的成员的用户名。Or, when the second user uploads the target file in the target conversation group, the second terminal may display a multi-selection dialog box in the conversation window of the target conversation group, and the multi-selection dialog box may display all members in the target conversation group User name. The second user can check the user names of the members who are allowed to share the target file through the second terminal.
相应的,第二终端则可以确定预设参数为上述第二数值,第二终端还可以获取第二用户选择的允许共享目标文件的成员的用户标识。进而,第二终端可以将目标文件、包含确定出的预设参数和获取的用户标识的目标白名单信息发送至服务器。Correspondingly, the second terminal may determine that the preset parameter is the aforementioned second value, and the second terminal may also obtain the user identification of the member selected by the second user who is allowed to share the target file. Furthermore, the second terminal may send the target file and the target whitelist information including the determined preset parameters and the acquired user identification to the server.
在一种实施方式中,目标白名单信息可以包括目标会话组中具有共享目标文件的权限的成员的用户标识。In an embodiment, the target whitelist information may include user identifications of members in the target conversation group who have the right to share the target file.
在第二用户通过第二终端勾选允许共享目标文件的成员的用户名后,第二终端可以获取第二用户选择的允许共享目标文件的成员的用户标识,进而,第二终端可以将目标文件、包含获取的用户标识的目标白名单信息发送至服务器。After the second user selects the user name of the member who is allowed to share the target file through the second terminal, the second terminal may obtain the user ID of the member who is allowed to share the target file selected by the second user, and further, the second terminal may transfer the target file , Send the target whitelist information containing the obtained user ID to the server.
相应的,当服务器接收到第一终端发送的针对目标文件的访问请求后,服务器可以根据目标白名单信息中是否包含预设参数,以及预设参数当前的数值,结合第一用户的用户标识,判断第一用户是否具有共享目标文件的权限,并根据判定结果对访问请求进行处理。服务器的处理方法可以参考上述实施例中的详细介绍,此处不再赘述。Correspondingly, after the server receives the access request for the target file sent by the first terminal, the server can combine the user ID of the first user according to whether the target whitelist information contains preset parameters and the current value of the preset parameters, It is determined whether the first user has the authority to share the target file, and the access request is processed according to the determination result. For the processing method of the server, reference may be made to the detailed introduction in the foregoing embodiment, which is not repeated here.
参见图5,图5为本申请实施例提供的一种文件共享方法示例的流程图,该方法可以包括以下步骤:Referring to FIG. 5, FIG. 5 is a flowchart of an example of a file sharing method provided by an embodiment of the application. The method may include the following steps:
S501:第二终端获取登录第二终端的第二用户需要在目标会话组中共享的目标文件。S501: The second terminal obtains the target file that the second user who logs in to the second terminal needs to share in the target conversation group.
S502:第二终端向服务器发送目标文件和目标会话组的会话组标识。S502: The second terminal sends the target file and the conversation group identifier of the target conversation group to the server.
S503:服务器保存目标文件的文件标识与目标会话组的会话组标识的对应关系,并向目标会话组中除第二用户以外的其他用户登录的终端发送目标文件的文件标识。S503: The server saves the correspondence between the file identifier of the target file and the conversation group identifier of the target conversation group, and sends the file identifier of the target file to the terminal logged in by users other than the second user in the target conversation group.
S504:第一终端向服务器发送针对目标文件的第一访问请求。S504: The first terminal sends a first access request for the target file to the server.
第一访问请求携带登录第一终端的第一用户的用户标识和目标文件的文件标识。The first access request carries the user ID of the first user who logs in to the first terminal and the file ID of the target file.
S505:第三终端向服务器发送针对目标文件的第二访问请求。S505: The third terminal sends a second access request for the target file to the server.
第二访问请求携带登录第三终端的第三用户的用户标识和目标文件的文件标识。The second access request carries the user identification of the third user who logs in to the third terminal and the file identification of the target file.
S506:服务器根据第一访问请求,判定登录第一终端的第一用户不属于目标会话组的成员。S506: The server determines, according to the first access request, that the first user who logs in to the first terminal is not a member of the target conversation group.
S507:服务器根据第二访问请求,判定登录第三终端的第三用户属于目标会话组的成员。S507: The server determines, according to the second access request, that the third user who logs in to the third terminal is a member of the target conversation group.
S508:服务器向第一终端发送提醒消息,以通告第一终端第一用户无权共享目标文件。S508: The server sends a reminder message to the first terminal to notify the first terminal that the first user has no right to share the target file.
S509:服务器向第三终端发送目标文件。S509: The server sends the target file to the third terminal.
S510:第一终端显示“无权共享目标文件”的消息。S510: The first terminal displays a message of "No right to share the target file".
可见,基于本申请实施例的文件共享方法,只有属于目标会话组的成员才能获取目标文件,能够提高文件共享的安全性。It can be seen that based on the file sharing method of the embodiment of the present application, only members belonging to the target conversation group can obtain the target file, which can improve the security of file sharing.
参见图6,图6为本申请实施例提供的一种文件共享方法示例的流程图,该方法可以包括以下步骤:Referring to FIG. 6, FIG. 6 is a flowchart of an example of a file sharing method provided by an embodiment of the application. The method may include the following steps:
S601:第二终端获取登录第二终端的第二用户需要在目标会话组中共享的目标文件,以及对应的目标白名单信息。S601: The second terminal obtains the target file that the second user who logs in to the second terminal needs to share in the target conversation group, and the corresponding target whitelist information.
其中,目标白名单信息包括预设参数,预设参数当前的数值表示目标会话组中的所有成员均具有共享目标文件的权限。The target whitelist information includes preset parameters, and the current value of the preset parameters indicates that all members in the target conversation group have the right to share the target file.
S602:第二终端向服务器发送目标文件和目标白名单信息。S602: The second terminal sends the target file and target whitelist information to the server.
S603:服务器保存目标文件的文件标识与目标白名单信息的对应关系,并将目标文件 的文件标识发送至目标会话组中除第二用户以外的其他用户登录的终端。S603: The server saves the correspondence between the file identifier of the target file and the target whitelist information, and sends the file identifier of the target file to the terminal logged in by users other than the second user in the target conversation group.
S604:第一终端向服务器发送针对目标文件的第一访问请求。S604: The first terminal sends a first access request for the target file to the server.
S605:第三终端向服务器发送针对目标文件的第二访问请求。S605: The third terminal sends a second access request for the target file to the server.
S606:服务器根据第一访问请求,判定目标会话组中所有成员的用户标识中,不存在登录第一终端的第一用户的用户标识。S606: According to the first access request, the server determines that among the user IDs of all members in the target conversation group, there is no user ID of the first user who logs in to the first terminal.
S607:服务器根据第二访问请求,判定目标会话组中所有成员的用户标识中,存在登录第三终端的第三用户的用户标识。S607: According to the second access request, the server determines that among the user IDs of all members in the target conversation group, there is the user ID of the third user who logs in to the third terminal.
S608:服务器向第一终端发送提醒消息,以通告第一终端第一用户无权共享目标文件。S608: The server sends a reminder message to the first terminal to notify the first terminal that the first user has no right to share the target file.
S609:服务器向第三终端发送目标文件。S609: The server sends the target file to the third terminal.
S610:第一终端显示“无权共享目标文件”的消息。S610: The first terminal displays a message "No right to share the target file".
参见图7,图7为本申请实施例提供的一种文件共享方法示例的流程图,该方法可以包括:S701至S710。Referring to FIG. 7, FIG. 7 is a flowchart of an example of a file sharing method provided by an embodiment of the application. The method may include: S701 to S710.
其中,S701-S705与S601-S605相同,S708-S710与S608-S610相同。Among them, S701-S705 are the same as S601-S605, and S708-S710 are the same as S608-S610.
本申请实施例中,在S701中,第二终端获取到的目标白名单信息包括:目标会话组中具有共享目标文件的权限的成员的用户标识,该目标白名单信息不包括预设参数。In this embodiment of the present application, in S701, the target whitelist information acquired by the second terminal includes: user identifiers of members in the target conversation group who have the permission to share target files, and the target whitelist information does not include preset parameters.
在S705、第三终端向服务器发送针对目标文件的第二访问请求之后,可以执行S706至S707。In S705, after the third terminal sends the second access request for the target file to the server, S706 to S707 may be executed.
S706:服务器根据第一访问请求,判定目标白名单信息包含的用户标识中,不存在登录第一终端的第一用户的用户标识。S706: The server determines, according to the first access request, that the user identifier of the first user who logs in to the first terminal does not exist among the user identifiers included in the target whitelist information.
S707:服务器根据第二访问请求,判定目标白名单信息包含的用户标识中,存在登录第三终端的第三用户的用户标识。S707: According to the second access request, the server determines that among the user identifiers included in the target whitelist information, there is the user identifier of the third user who logs in to the third terminal.
在S707之后,可以继续执行S708、服务器向第一终端发送提醒消息,以通告第一终端第一用户无权共享目标文件。After S707, S708 can be continued, and the server sends a reminder message to the first terminal to notify the first terminal that the first user has no right to share the target file.
基于相同的技术构思,参见图8,图8为本申请实施例提供的一种文件共享装置的结构图,该装置应用于服务器,该装置可以包括:Based on the same technical concept, refer to FIG. 8. FIG. 8 is a structural diagram of a file sharing device provided by an embodiment of the application. The device is applied to a server, and the device may include:
接收模块801,设置为接收第一终端发送的用于访问目标文件的访问请求,其中,访问请求中携带登录第一终端的第一用户的用户标识和目标文件的文件标识;目标文件为登录第二终端的第二用户需要在目标会话组中共享的文件,第二用户属于目标会话组的成员;The receiving module 801 is configured to receive an access request for accessing a target file sent by the first terminal, wherein the access request carries the user ID of the first user who logs in to the first terminal and the file ID of the target file; the target file is the login first 2. Files that the second user of the terminal needs to share in the target conversation group, and the second user is a member of the target conversation group;
确定模块802,设置为根据预先存储的文件标识与白名单信息的对应关系,确定与目标文件的文件标识对应的目标白名单信息,其中,目标白名单信息用于标识目标会话组中具有共享目标文件的权限的成员;The determining module 802 is configured to determine the target whitelist information corresponding to the file identifier of the target file according to the correspondence between the file identifier and the whitelist information stored in advance, wherein the target whitelist information is used to identify the shared target in the target conversation group Member of the authority of the file;
判断模块803,设置为根据目标白名单信息和第一用户的用户标识,判断第一用户是否具有共享目标文件的权限;The judgment module 803 is configured to judge whether the first user has the right to share the target file according to the target whitelist information and the user identification of the first user;
第一处理模块804,设置为如果第一用户不具有共享目标文件的权限,则拒绝向第一终端发送目标文件。The first processing module 804 is configured to refuse to send the target file to the first terminal if the first user does not have the permission to share the target file.
在一种实施方式中,目标白名单信息为目标会话组的会话组标识。In an implementation manner, the target whitelist information is the session group identifier of the target session group.
接收模块801,设置为接收第一终端发送的用于访问目标文件的访问请求,其中,访问请求中携带登录第一终端的第一用户的用户标识和目标文件的文件标识;目标文件为登录第二终端的第二用户需要在目标会话组中共享的文件,第二用户属于目标会话组的成员;The receiving module 801 is configured to receive an access request for accessing a target file sent by the first terminal, wherein the access request carries the user ID of the first user who logs in to the first terminal and the file ID of the target file; the target file is the login first 2. Files that the second user of the terminal needs to share in the target conversation group, and the second user is a member of the target conversation group;
判断模块803,设置为根据预先存储的文件标识与会话组标识的对应关系、目标文件的文件标识和第一用户的用户标识,判断第一用户是否属于目标会话组的成员;The judging module 803 is configured to judge whether the first user is a member of the target conversation group based on the pre-stored correspondence between the file ID and the conversation group ID, the file ID of the target file, and the user ID of the first user;
第一处理模块804,设置为如果第一用户不属于目标会话组的成员,则拒绝向第一终端发送目标文件。The first processing module 804 is configured to refuse to send the target file to the first terminal if the first user is not a member of the target conversation group.
判断模块803,具体可以设置为:The judgment module 803 can be specifically set as:
判断第一用户是否属于目标会话组的成员;Determine whether the first user is a member of the target conversation group;
如果第一用户属于目标会话组的成员,则确定第一用户具有共享目标文件的权限;If the first user is a member of the target conversation group, it is determined that the first user has the right to share the target file;
如果第一用户不属于目标会话组的成员,则确定第一用户不具有共享所述目标文件的权限。If the first user is not a member of the target conversation group, it is determined that the first user does not have the right to share the target file.
在一种实施方式中,判断模块803,具体可以设置为:In an implementation manner, the judgment module 803 can be specifically set as:
在预先存储的文件标识与会话组标识的对应关系中,确定与目标文件的文件标识对应的会话组标识,得到目标会话组标识;In the pre-stored correspondence between the file identifier and the conversation group identifier, determine the conversation group identifier corresponding to the file identifier of the target file to obtain the target conversation group identifier;
判断目标会话组标识所标识的会话组中成员的用户标识中,是否存在第一用户的用户标识;Judging whether the user identifier of the first user exists among the user identifiers of the members in the conversation group identified by the target conversation group identifier;
如果存在第一用户的用户标识,确定第一用户属于目标会话组的成员;If the user ID of the first user exists, it is determined that the first user is a member of the target conversation group;
如果不存在第一用户的用户标识,确定第一用户不属于目标会话组的成员。If the user identity of the first user does not exist, it is determined that the first user does not belong to a member of the target conversation group.
在一种实施方式中,目标白名单信息包括目标会话组的会话组标识和预设参数,预设参数用于表示目标会话组中的所有成员是否均具有共享目标文件的权限;In one embodiment, the target whitelist information includes the session group identifier of the target session group and preset parameters, and the preset parameters are used to indicate whether all members in the target session group have the right to share the target file;
判断模块803,具体设置为在预设参数的值用于表示目标会话组中的所有成员均具有共享目标文件的权限的情况下,查询目标会话组中所有成员的用户标识;The judging module 803 is specifically set to query the user IDs of all members in the target conversation group when the value of the preset parameter is used to indicate that all members in the target conversation group have the right to share the target file;
判断目标会话组中的所有成员的用户标识中,是否存在第一用户的用户标识;Determine whether the user ID of the first user exists among the user IDs of all members in the target conversation group;
如果目标会话组中所有成员的用户标识中,存在第一用户的用户标识,确定第一用户具有共享目标文件的权限;If the user ID of the first user exists among the user IDs of all members in the target conversation group, it is determined that the first user has the right to share the target file;
如果目标会话组中所有成员的用户标识中,不存在第一用户的用户标识,确定第一用户不具有共享目标文件的权限。If there is no user ID of the first user among the user IDs of all members in the target conversation group, it is determined that the first user does not have the right to share the target file.
在一种实施方式中,目标白名单信息还包括目标会话组中具有共享目标文件的权限的成员的用户标识;In an implementation manner, the target whitelist information further includes user identifications of members in the target conversation group who have the right to share the target file;
判断模块803,还设置为在预设参数的值用于表示目标会话组中的所有成员不都具有共享目标文件的权限的情况下,判断目标白名单信息包含的用户标识中,是否存在第一用户的用户标识;The judging module 803 is also set to judge whether there is a first among the user identifiers contained in the target whitelist information when the value of the preset parameter is used to indicate that all members in the target conversation group do not have the permission to share the target file. User ID of the user;
如果目标白名单信息包含的用户标识中,存在第一用户的用户标识,确定第一用户具有共享目标文件的权限;If the user ID of the first user exists in the user ID included in the target whitelist information, it is determined that the first user has the right to share the target file;
如果目标白名单信息包含的用户标识中,不存在第一用户的用户标识,确定第一用户不具有共享目标文件的权限。If the user identification of the first user does not exist in the user identification included in the target whitelist information, it is determined that the first user does not have the right to share the target file.
在一种实施方式中,目标白名单信息包括目标会话组中具有共享目标文件的权限的成员的用户标识;In an implementation manner, the target whitelist information includes user identifications of members in the target conversation group who have the right to share the target file;
判断模块803,具体设置为判断目标白名单信息包含的用户标识中,是否存在第一用户的用户标识;The determining module 803 is specifically configured to determine whether the user identifier of the first user exists among the user identifiers included in the target whitelist information;
如果目标白名单信息包含的用户标识中,存在第一用户的用户标识,确定第一用户具有共享目标文件的权限;If the user ID of the first user exists in the user ID included in the target whitelist information, it is determined that the first user has the right to share the target file;
如果目标白名单信息包含的用户标识中,不存在第一用户的用户标识,确定第一用户不具有共享目标文件的权限。If the user identification of the first user does not exist in the user identification included in the target whitelist information, it is determined that the first user does not have the right to share the target file.
在一种实施方式中,该装置还包括:In an embodiment, the device further includes:
第二处理模块,设置为:The second processing module is set to:
接收第二终端发送的目标文件和目标文件对应的目标白名单信息;Receiving the target file sent by the second terminal and the target whitelist information corresponding to the target file;
保存目标文件的文件标识与目标白名单信息的对应关系;Save the correspondence between the file identifier of the target file and the target whitelist information;
将目标文件的文件标识发送至目标会话组中除第二用户以外的其他用户登录的终端。The file identifier of the target file is sent to the terminal logged in by users other than the second user in the target conversation group.
在一种实施方式中,若目标白名单信息为目标会话组的会话组标识,第二处理模块,具体设置为:In an implementation manner, if the target whitelist information is the session group identifier of the target session group, the second processing module is specifically set to:
接收第二终端发送的目标文件和目标会话组的会话组标识;Receiving the target file and the conversation group identifier of the target conversation group sent by the second terminal;
保存目标文件的文件标识与目标会话组的会话组标识的对应关系;Save the correspondence between the file identifier of the target file and the conversation group identifier of the target conversation group;
将目标文件的文件标识发送至目标会话组中除第二用户以外的其他用户登录的终端。The file identifier of the target file is sent to the terminal logged in by users other than the second user in the target conversation group.
在一种实施方式中,该装置还包括:In an embodiment, the device further includes:
第一发送模块,设置为如果第一用户不具有共享目标文件的权限,向第一终端发送提 醒消息,以通告第一终端第一用户无权共享目标文件。The first sending module is configured to send a reminder message to the first terminal if the first user does not have the right to share the target file to notify the first terminal that the first user has no right to share the target file.
在一种实施方式中,第一发送模块,具体设置为如果第一用户不属于目标会话组的成员,向第一终端发送提醒消息,以通告第一终端该第一用户无权共享所述目标文件。In one embodiment, the first sending module is specifically configured to send a reminder message to the first terminal if the first user is not a member of the target conversation group to notify the first terminal that the first user has no right to share the target file.
在一种实施方式中,该装置还包括:In an embodiment, the device further includes:
第二发送模块,设置为如果第一用户具有共享目标文件的权限,向第一终端发送目标文件。The second sending module is configured to send the target file to the first terminal if the first user has the permission to share the target file.
在一种实施方式中,第二发送模块,具体设置为如果第一用户属于目标会话组的成员,向第一终端发送目标文件。In an embodiment, the second sending module is specifically configured to send the target file to the first terminal if the first user is a member of the target conversation group.
基于相同的技术构思,参见图9,图9为本申请实施例提供的一种文件共享装置的结构图,该装置应用于第二终端,该装置包括:Based on the same technical concept, refer to FIG. 9. FIG. 9 is a structural diagram of a file sharing device provided by an embodiment of the application. The device is applied to a second terminal, and the device includes:
获取模块901,设置为获取登录第二终端的第二用户需要在目标会话组中共享的目标文件,以及目标文件对应的目标白名单信息,其中,目标白名单信息用于标识目标会话组中具有共享目标文件的权限的成员;The obtaining module 901 is configured to obtain the target file that the second user who logs in the second terminal needs to share in the target conversation group, and the target whitelist information corresponding to the target file, where the target whitelist information is used to identify the target conversation group with Members with permission to share target files;
发送模块902,设置为向服务器发送目标文件和目标白名单信息,以使服务器在接收到第一终端发送的用于访问目标文件的访问请求时,根据预先存储的文件标识与白名单信息的对应关系,确定与目标文件的文件标识对应的目标白名单信息,并根据目标白名单信息和第一用户的用户标识,判断第一用户是否具有共享目标文件的权限,如果第一用户不具有共享目标文件的权限,则拒绝向第一终端发送目标文件。The sending module 902 is configured to send the target file and target whitelist information to the server, so that when the server receives the access request for accessing the target file sent by the first terminal, it will be based on the correspondence between the pre-stored file identifier and the whitelist information Relationship, determine the target whitelist information corresponding to the file ID of the target file, and determine whether the first user has the permission to share the target file based on the target whitelist information and the user ID of the first user, if the first user does not have the shared target The permission of the file, the target file is refused to be sent to the first terminal.
在一种实施方式中,获取模块901,具体设置为接收针对预定区域的操作所触发的信号,其中,预定区域位于第二终端展示的文件访问权限设置界面中,信号中包括目标文件对应的目标白名单信息。In one embodiment, the acquiring module 901 is specifically configured to receive a signal triggered by an operation in a predetermined area, where the predetermined area is located in the file access permission setting interface displayed by the second terminal, and the signal includes the target corresponding to the target file. Whitelist information.
其中,目标白名单信息为目标会话组的会话标识。Among them, the target whitelist information is the session identifier of the target session group.
或者,目标白名单信息包括目标会话组的会话组标识和预设参数,预设参数用于表示目标会话组中的所有成员是否均具有共享目标文件的权限。Alternatively, the target whitelist information includes the conversation group identifier of the target conversation group and preset parameters, and the preset parameters are used to indicate whether all members in the target conversation group have the right to share the target file.
在一种实施方式中,目标白名单信息包括目标会话组中具有共享目标文件的权限的成员的用户标识。In an implementation manner, the target whitelist information includes user identifications of members in the target conversation group who have the right to share the target file.
另外,本申请实施例还提供了一种文件共享系统,该系统包括服务器和多个终端;In addition, the embodiment of the present application also provides a file sharing system, which includes a server and multiple terminals;
多个终端中的第二终端,设置为获取登录第二终端的第二用户需要在目标会话组中共享的目标文件,以及目标文件对应的目标白名单信息,其中,目标白名单信息用于标识目标会话组中具有共享目标文件的权限的成员;向服务器发送目标文件和目标白名单信息;The second terminal of the plurality of terminals is configured to obtain the target file that the second user who logs in to the second terminal needs to share in the target conversation group, and the target whitelist information corresponding to the target file, where the target whitelist information is used to identify Members of the target conversation group who have the right to share target files; send target files and target whitelist information to the server;
服务器,设置为接收多个终端中的第一终端发送的用于访问目标文件的访问请求;根 据预先存储的文件标识与白名单信息的对应关系,确定与目标文件的文件标识对应的目标白名单信息;根据目标白名单信息和第一用户的用户标识,判断第一用户是否具有共享目标文件的权限;如果第一用户不具有共享目标文件的权限,则拒绝向第一终端发送目标文件。The server is configured to receive an access request for accessing the target file sent by the first terminal of the plurality of terminals; and determine the target whitelist corresponding to the file identifier of the target file according to the correspondence relationship between the pre-stored file identifier and the whitelist information Information; According to the target whitelist information and the user ID of the first user, determine whether the first user has the permission to share the target file; if the first user does not have the permission to share the target file, refuse to send the target file to the first terminal.
在一种实施方式中,多个终端中的第一终端,设置为向服务器发送用于访问目标文件的访问请求,其中,访问请求中携带登录第一终端的第一用户的用户标识和目标文件的文件标识;目标文件为登录多个终端中的第二终端的第二用户需要在目标会话组中共享的文件,第二用户属于目标会话组的成员;In an embodiment, the first terminal of the plurality of terminals is configured to send an access request for accessing the target file to the server, wherein the access request carries the user identification of the first user who logs in to the first terminal and the target file The target file is a file that needs to be shared in the target conversation group by the second user who logs in to the second terminal of the multiple terminals, and the second user belongs to a member of the target conversation group;
服务器,设置为接收访问请求,根据预先存储的文件标识与会话组标识的对应关系、目标文件的文件标识和第一用户的用户标识,判断第一用户是否属于目标会话组的成员;如果第一用户不属于目标会话组的成员,则拒绝向第一终端发送目标文件。The server is configured to receive the access request, and determine whether the first user is a member of the target conversation group according to the pre-stored correspondence between the file ID and the conversation group ID, the file ID of the target file, and the user ID of the first user; If the user is not a member of the target conversation group, it refuses to send the target file to the first terminal.
本申请实施例还提供了一种服务器,如图10所示,包括处理器1001、通信接口1002、存储器1003和通信总线1004,其中,处理器1001,通信接口1002,存储器1003通过通信总线1004完成相互间的通信,The embodiment of the present application also provides a server, as shown in FIG. 10, including a processor 1001, a communication interface 1002, a memory 1003, and a communication bus 1004, where the processor 1001, the communication interface 1002, and the memory 1003 are implemented through the communication bus 1004 Mutual communication,
存储器1003,设置为存放计算机程序;The memory 1003 is set to store computer programs;
处理器1001,设置为执行存储器1003上所存放的程序时,实现本申请实施例提供的由服务器执行的文件共享方法。The processor 1001 is configured to implement the file sharing method executed by the server provided in the embodiment of the present application when executing the program stored in the memory 1003.
在本申请实施例中,上述由服务器执行的文件共享方法与前述方法实施例部分相同,这里不再赘述。In the embodiment of the present application, the above-mentioned file sharing method executed by the server is partly the same as the above-mentioned method embodiment, and will not be repeated here.
上述服务器提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus mentioned by the above server may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
通信接口用于上述服务器与其他设备之间的通信。The communication interface is used for communication between the aforementioned server and other devices.
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。在一种实施方式中,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk storage. In an embodiment, the memory may also be at least one storage device located far away from the foregoing processor.
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管 逻辑器件、分立硬件组件。The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processing, DSP), a dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
本申请实施例还提供了一种终端,如图11所示,包括处理器1101、通信接口1102、存储器1103和通信总线1104,其中,处理器1101,通信接口1102,存储器1103通过通信总线1104完成相互间的通信,The embodiment of the present application also provides a terminal, as shown in FIG. 11, including a processor 1101, a communication interface 1102, a memory 1103, and a communication bus 1104, where the processor 1101, the communication interface 1102, and the memory 1103 are completed through the communication bus 1104 Mutual communication,
存储器1103,设置为存放计算机程序;The memory 1103 is set to store computer programs;
处理器1101,设置为执行存储器1103上所存放的程序时,实现本申请实施例提供的由第二终端执行的文件共享方法。The processor 1101 is configured to implement the file sharing method executed by the second terminal provided in the embodiment of the present application when executing the program stored in the memory 1103.
在本申请实施例中,上述由第二终端执行的文件共享方法与前述方法实施例部分相同,这里不再赘述。In the embodiment of the present application, the file sharing method executed by the second terminal is partially the same as that of the foregoing method embodiment, and will not be repeated here.
上述终端提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus mentioned by the above terminal may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
通信接口用于上述终端与其他设备之间的通信。The communication interface is used for communication between the aforementioned terminal and other devices.
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。在一种实施方式中,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk storage. In an embodiment, the memory may also be at least one storage device located far away from the foregoing processor.
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processing, DSP), a dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
在本申请提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,计算机程序被处理器执行时实现本申请实施例所提供的由服务器执行的文件共享方法的步骤。In another embodiment provided in this application, a computer-readable storage medium is also provided. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the The steps of the file sharing method executed by the server.
在本申请提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,计算机程序被处理器执行时实现本申请实施例所提供的由第二终端执行的文件共享方法的步骤。In another embodiment provided in this application, a computer-readable storage medium is also provided. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the Steps of the file sharing method executed by the second terminal.
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序产品,包含指令的计算机程序产品在计算机上运行时,使得计算机执行由服务器执行的文件共享方法的步骤。In another embodiment provided in this application, a computer program product containing instructions is also provided. When the computer program product containing instructions runs on a computer, the computer executes the steps of the file sharing method executed by the server.
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序产品,包含指令的计算机程序产品在计算机上运行时,使得计算机执行本申请实施例所提供的由第二终端执行的文件共享方法的步骤。In another embodiment provided in this application, a computer program product containing instructions is also provided. When the computer program product containing instructions runs on a computer, the computer can execute the execution provided by the second terminal provided in the embodiments of this application. The steps of the file sharing method.
本申请提供的又一实施例中,还提供了一种计算机程序,当其在计算机上运行时,使得计算机执行本申请实施例所提供的由服务器执行的文件共享方法的步骤。In another embodiment provided in this application, a computer program is also provided, which when running on a computer, causes the computer to execute the steps of the file sharing method executed by the server provided in the embodiment of this application.
本申请提供的又一实施例中,还提供了一种计算机程序,当其在计算机上运行时,使得计算机执行本申请实施例所提供的由第二终端执行的文件共享方法的步骤。In another embodiment provided in this application, a computer program is also provided, which when running on a computer, causes the computer to execute the steps of the file sharing method performed by the second terminal provided in the embodiment of this application.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center. Transmission to another website site, computer, server or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply one of these entities or operations. There is any such actual relationship or order between. Moreover, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes those that are not explicitly listed Other elements of, or also include elements inherent to this process, method, article or equipment. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other same elements in the process, method, article, or equipment including the element.
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、系统、服务器、终端、计算机可读存储介质、计算机程序产品实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in this specification are described in a related manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of devices, systems, servers, terminals, computer-readable storage media, and computer program products, since they are basically similar to the method embodiments, the description is relatively simple. For related details, please refer to the description of the method embodiments. OK.
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则 之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。The above descriptions are only preferred embodiments of this application and are not intended to limit this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the protection of this application. Within the range.
工业实用性Industrial applicability
基于本申请实施例提供的文件共享方法、装置、系统、服务器、终端及存储介质,能够在服务器中存储文件标识和白名单信息的对应关系,使得目标白名单所标识的成员以外的其他用户无法获取目标文件,避免了目标文件被恶意攻击者获取,可以提高文件共享的安全性。Based on the file sharing method, device, system, server, terminal, and storage medium provided by the embodiments of this application, the corresponding relationship between file identification and whitelist information can be stored in the server, so that users other than the members identified by the target whitelist cannot Obtaining the target file prevents the target file from being obtained by a malicious attacker and can improve the security of file sharing.

Claims (31)

  1. 一种文件共享方法,所述方法应用于服务器,所述方法包括:A file sharing method, the method is applied to a server, and the method includes:
    接收第一终端发送的用于访问目标文件的访问请求,其中,所述访问请求中携带登录所述第一终端的第一用户的用户标识和所述目标文件的文件标识;所述目标文件为登录第二终端的第二用户需要在目标会话组中共享的文件,所述第二用户属于所述目标会话组的成员;Receiving an access request for accessing a target file sent by a first terminal, wherein the access request carries the user ID of the first user logging in the first terminal and the file ID of the target file; the target file is A file that a second user who logs in to the second terminal needs to share in a target conversation group, and the second user is a member of the target conversation group;
    根据预先存储的文件标识与白名单信息的对应关系,确定与所述目标文件的文件标识对应的目标白名单信息,其中,所述目标白名单信息用于标识所述目标会话组中具有共享所述目标文件的权限的成员;Determine the target whitelist information corresponding to the file identifier of the target file according to the pre-stored correspondence between the file identifier and the whitelist information, wherein the target whitelist information is used to identify the shared place in the target conversation group. The member who stated the authority of the target file;
    根据所述目标白名单信息和所述第一用户的用户标识,判断所述第一用户是否具有共享所述目标文件的权限;Judging whether the first user has the permission to share the target file according to the target whitelist information and the user identifier of the first user;
    如果所述第一用户不具有共享所述目标文件的权限,则拒绝向所述第一终端发送所述目标文件。If the first user does not have the right to share the target file, refuse to send the target file to the first terminal.
  2. 根据权利要求1所述的方法,其中,所述目标白名单信息为所述目标会话组的会话组标识;The method according to claim 1, wherein the target whitelist information is a conversation group identifier of the target conversation group;
    所述根据所述目标白名单信息和所述第一用户的用户标识,判断所述第一用户是否具有共享所述目标文件的权限,包括:The determining whether the first user has the permission to share the target file according to the target whitelist information and the user identifier of the first user includes:
    判断所述第一用户是否属于所述目标会话组的成员;Determining whether the first user is a member of the target conversation group;
    如果所述第一用户属于所述目标会话组的成员,则确定所述第一用户具有共享所述目标文件的权限;If the first user is a member of the target conversation group, determining that the first user has the right to share the target file;
    如果所述第一用户不属于所述目标会话组的成员,则确定所述第一用户不具有共享所述目标文件的权限。If the first user is not a member of the target conversation group, it is determined that the first user does not have the right to share the target file.
  3. 根据权利要求1所述的方法,其中,所述目标白名单信息包括所述目标会话组的会话组标识和预设参数,所述预设参数用于表示所述目标会话组中的所有成员是否均具有共享所述目标文件的权限;The method according to claim 1, wherein the target whitelist information includes a conversation group identifier of the target conversation group and preset parameters, and the preset parameters are used to indicate whether all members of the target conversation group All have the permission to share the target file;
    所述根据所述目标白名单信息和所述第一用户的用户标识,判断所述第一用户是否具有共享所述目标文件的权限,包括:The determining whether the first user has the permission to share the target file according to the target whitelist information and the user identifier of the first user includes:
    在所述预设参数的值用于表示所述目标会话组中的所有成员均具有共享所述目标文件的权限的情况下,查询所述目标会话组中所有成员的用户标识;In the case where the value of the preset parameter is used to indicate that all members in the target conversation group have the right to share the target file, query the user IDs of all members in the target conversation group;
    判断所述目标会话组中的所有成员的用户标识中,是否存在所述第一用户的用户标识;Determining whether the user identifier of the first user exists among the user identifiers of all members in the target conversation group;
    如果所述目标会话组中所有成员的用户标识中,存在所述第一用户的用户标识,确定 所述第一用户具有共享所述目标文件的权限;If the user ID of the first user exists among the user IDs of all members in the target conversation group, determining that the first user has the right to share the target file;
    如果所述目标会话组中所有成员的用户标识中,不存在所述第一用户的用户标识,确定所述第一用户不具有共享所述目标文件的权限。If the user identification of the first user does not exist among the user identifications of all members in the target conversation group, it is determined that the first user does not have the right to share the target file.
  4. 根据权利要求3所述的方法,其中,所述目标白名单信息还包括所述目标会话组中具有共享所述目标文件的权限的成员的用户标识;The method according to claim 3, wherein the target whitelist information further includes user identifications of members in the target conversation group who have the right to share the target file;
    所述根据所述目标白名单信息和所述第一用户的用户标识,判断所述第一用户是否具有共享所述目标文件的权限,包括:The determining whether the first user has the permission to share the target file according to the target whitelist information and the user identifier of the first user includes:
    在所述预设参数的值用于表示所述目标会话组中的所有成员不都具有共享所述目标文件的权限的情况下,判断所述目标白名单信息包含的用户标识中,是否存在所述第一用户的用户标识;In the case where the value of the preset parameter is used to indicate that all members in the target conversation group do not have the right to share the target file, it is determined whether all the user identifiers included in the target whitelist information exist The user ID of the first user;
    如果所述目标白名单信息包含的用户标识中,存在所述第一用户的用户标识,确定所述第一用户具有共享所述目标文件的权限;If the user identification of the first user exists in the user identification included in the target whitelist information, determining that the first user has the right to share the target file;
    如果所述目标白名单信息包含的用户标识中,不存在所述第一用户的用户标识,确定所述第一用户不具有共享所述目标文件的权限。If the user identification of the first user does not exist in the user identification included in the target whitelist information, it is determined that the first user does not have the right to share the target file.
  5. 根据权利要求1所述的方法,其中,所述目标白名单信息包括所述目标会话组中具有共享所述目标文件的权限的成员的用户标识;The method according to claim 1, wherein the target whitelist information includes user identifications of members in the target conversation group who have the right to share the target file;
    所述根据所述目标白名单信息和所述第一用户的用户标识,判断所述第一用户是否具有共享所述目标文件的权限,包括:The determining whether the first user has the permission to share the target file according to the target whitelist information and the user identifier of the first user includes:
    判断所述目标白名单信息包含的用户标识中,是否存在所述第一用户的用户标识;Determining whether the user identifier of the first user exists among the user identifiers included in the target whitelist information;
    如果所述目标白名单信息包含的用户标识中,存在所述第一用户的用户标识,确定所述第一用户具有共享所述目标文件的权限;If the user identification of the first user exists in the user identification included in the target whitelist information, determining that the first user has the right to share the target file;
    如果所述目标白名单信息包含的用户标识中,不存在所述第一用户的用户标识,确定所述第一用户不具有共享所述目标文件的权限。If the user identification of the first user does not exist among the user identifications included in the target whitelist information, it is determined that the first user does not have the right to share the target file.
  6. 根据权利要求1-5任一项所述的方法,其中,在所述接收第一终端发送的用于访问目标文件的访问请求之前,所述方法还包括:The method according to any one of claims 1 to 5, wherein before the receiving the access request for accessing the target file sent by the first terminal, the method further comprises:
    接收所述第二终端发送的目标文件和所述目标文件对应的目标白名单信息;Receiving the target file sent by the second terminal and the target whitelist information corresponding to the target file;
    保存所述目标文件的文件标识与所述目标白名单信息的对应关系;Save the correspondence between the file identifier of the target file and the target whitelist information;
    将所述目标文件的文件标识发送至所述目标会话组中除所述第二用户以外的其他用户登录的终端。The file identifier of the target file is sent to the terminal logged in by users other than the second user in the target conversation group.
  7. 根据权利要求1所述的方法,其中,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    如果所述第一用户不具有共享所述目标文件的权限,向所述第一终端发送提醒消息, 以通告所述第一终端所述第一用户无权共享所述目标文件。If the first user does not have the right to share the target file, sending a reminder message to the first terminal to notify the first terminal that the first user has no right to share the target file.
  8. 根据权利要求1所述的方法,其中,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    如果所述第一用户具有共享所述目标文件的权限,向所述第一终端发送所述目标文件。If the first user has the right to share the target file, sending the target file to the first terminal.
  9. 一种文件共享方法,所述方法应用于第二终端,所述方法包括:A file sharing method, the method is applied to a second terminal, and the method includes:
    获取登录所述第二终端的第二用户需要在目标会话组中共享的目标文件,以及所述目标文件对应的目标白名单信息,其中,所述目标白名单信息用于标识所述目标会话组中具有共享所述目标文件的权限的成员;Acquire the target file that the second user who logs in to the second terminal needs to share in the target conversation group and the target whitelist information corresponding to the target file, where the target whitelist information is used to identify the target conversation group Members who have the right to share the target file;
    向服务器发送所述目标文件和所述目标白名单信息,以使所述服务器在接收到第一终端发送的用于访问所述目标文件的访问请求时,根据预先存储的文件标识与白名单信息的对应关系,确定与所述目标文件的文件标识对应的目标白名单信息,并根据所述目标白名单信息和所述第一用户的用户标识,判断所述第一用户是否具有共享所述目标文件的权限,如果所述第一用户不具有共享所述目标文件的权限,则拒绝向所述第一终端发送所述目标文件。Send the target file and the target whitelist information to the server, so that when the server receives the access request for accessing the target file sent by the first terminal, it will be based on the pre-stored file identification and whitelist information To determine the target whitelist information corresponding to the file identifier of the target file, and determine whether the first user has shared the target according to the target whitelist information and the user identifier of the first user File permission, if the first user does not have the permission to share the target file, refuse to send the target file to the first terminal.
  10. 根据权利要求9所述的方法,其中,获取所述目标文件对应的目标白名单信息包括:The method according to claim 9, wherein obtaining the target whitelist information corresponding to the target file comprises:
    接收针对预定区域的操作所触发的信号,其中,所述预定区域位于所述第二终端展示的文件访问权限设置界面中,所述信号中包括所述目标文件对应的目标白名单信息。Receive a signal triggered by an operation in a predetermined area, where the predetermined area is located in a file access permission setting interface displayed by the second terminal, and the signal includes target whitelist information corresponding to the target file.
  11. 根据权利要求9所述的方法,其中,所述目标白名单信息为所述目标会话组的会话标识。The method according to claim 9, wherein the target whitelist information is a session identifier of the target conversation group.
  12. 根据权利要求9所述的方法,其中,所述目标白名单信息包括所述目标会话组的会话组标识和预设参数,所述预设参数用于表示所述目标会话组中的所有成员是否均具有共享所述目标文件的权限。The method according to claim 9, wherein the target whitelist information includes a conversation group identifier of the target conversation group and preset parameters, and the preset parameters are used to indicate whether all members of the target conversation group Both have the permission to share the target file.
  13. 根据权利要求9所述的方法,其中,所述目标白名单信息包括所述目标会话组中具有共享所述目标文件的权限的成员的用户标识。8. The method according to claim 9, wherein the target whitelist information includes user identifications of members in the target conversation group who have the right to share the target file.
  14. 一种文件共享方法,所述方法应用于服务器,所述方法包括:A file sharing method, the method is applied to a server, and the method includes:
    接收第一终端发送的用于访问目标文件的访问请求,其中,所述访问请求中携带登录所述第一终端的第一用户的用户标识和所述目标文件的文件标识;所述目标文件为登录第二终端的第二用户需要在目标会话组中共享的文件,所述第二用户属于所述目标会话组的成员;Receiving an access request for accessing a target file sent by a first terminal, wherein the access request carries the user ID of the first user logging in the first terminal and the file ID of the target file; the target file is A file that a second user who logs in to the second terminal needs to share in a target conversation group, and the second user is a member of the target conversation group;
    根据预先存储的文件标识与会话组标识的对应关系、所述目标文件的文件标识和所述第一用户的用户标识,判断所述第一用户是否属于所述目标会话组的成员;Judging whether the first user is a member of the target conversation group according to the pre-stored correspondence between the file identifier and the conversation group identifier, the file identifier of the target file, and the user identifier of the first user;
    如果所述第一用户不属于所述目标会话组的成员,则拒绝向所述第一终端发送所述目标文件。If the first user is not a member of the target conversation group, refuse to send the target file to the first terminal.
  15. 一种文件共享装置,所述装置应用于服务器,所述装置包括:A file sharing device, the device is applied to a server, and the device includes:
    接收模块,设置为接收第一终端发送的用于访问目标文件的访问请求,其中,所述访问请求中携带登录所述第一终端的第一用户的用户标识和所述目标文件的文件标识;所述目标文件为登录第二终端的第二用户需要在目标会话组中共享的文件,所述第二用户属于所述目标会话组的成员;A receiving module, configured to receive an access request for accessing a target file sent by the first terminal, wherein the access request carries the user ID of the first user logging in the first terminal and the file ID of the target file; The target file is a file that a second user who logs in to the second terminal needs to share in a target conversation group, and the second user is a member of the target conversation group;
    确定模块,设置为根据预先存储的文件标识与白名单信息的对应关系,确定与所述目标文件的文件标识对应的目标白名单信息,其中,所述目标白名单信息用于标识所述目标会话组中具有共享所述目标文件的权限的成员;The determining module is configured to determine the target whitelist information corresponding to the file identifier of the target file according to the correspondence between the file identifier and the whitelist information stored in advance, wherein the target whitelist information is used to identify the target session Members in the group who have the right to share the target file;
    判断模块,设置为根据所述目标白名单信息和所述第一用户的用户标识,判断所述第一用户是否具有共享所述目标文件的权限;A judging module, configured to judge whether the first user has the right to share the target file according to the target whitelist information and the user identification of the first user;
    第一处理模块,设置为如果所述第一用户不具有共享所述目标文件的权限,则拒绝向所述第一终端发送所述目标文件。The first processing module is configured to refuse to send the target file to the first terminal if the first user does not have the right to share the target file.
  16. 根据权利要求15所述的装置,其中,所述目标白名单信息为所述目标会话组的会话组标识;The apparatus according to claim 15, wherein the target whitelist information is a conversation group identifier of the target conversation group;
    所述判断模块,具体设置为:The judgment module is specifically set as:
    判断所述第一用户是否属于所述目标会话组的成员;Determining whether the first user is a member of the target conversation group;
    如果所述第一用户属于所述目标会话组的成员,则确定所述第一用户具有共享所述目标文件的权限;If the first user is a member of the target conversation group, determining that the first user has the right to share the target file;
    如果所述第一用户不属于所述目标会话组的成员,则确定所述第一用户不具有共享所述目标文件的权限。If the first user is not a member of the target conversation group, it is determined that the first user does not have the right to share the target file.
  17. 根据权利要求15所述的装置,其中,所述目标白名单信息包括所述目标会话组的会话组标识和预设参数,所述预设参数用于表示所述目标会话组中的所有成员是否均具有共享所述目标文件的权限;The device according to claim 15, wherein the target whitelist information includes a conversation group identifier of the target conversation group and preset parameters, and the preset parameters are used to indicate whether all members of the target conversation group All have the permission to share the target file;
    所述判断模块,具体设置为:The judgment module is specifically set as:
    在所述预设参数的值用于表示所述目标会话组中的所有成员均具有共享所述目标文件的权限的情况下,查询所述目标会话组中所有成员的用户标识;In the case where the value of the preset parameter is used to indicate that all members in the target conversation group have the right to share the target file, query the user IDs of all members in the target conversation group;
    判断所述目标会话组中的所有成员的用户标识中,是否存在所述第一用户的用户标识;Determining whether the user identifier of the first user exists among the user identifiers of all members in the target conversation group;
    如果所述目标会话组中所有成员的用户标识中,存在所述第一用户的用户标识,确定所述第一用户具有共享所述目标文件的权限;If the user ID of the first user exists among the user IDs of all members in the target conversation group, determining that the first user has the right to share the target file;
    如果所述目标会话组中所有成员的用户标识中,不存在所述第一用户的用户标识,确定所述第一用户不具有共享所述目标文件的权限。If the user identification of the first user does not exist among the user identifications of all members in the target conversation group, it is determined that the first user does not have the right to share the target file.
  18. 根据权利要求17所述的装置,其中,所述目标白名单信息还包括所述目标会话组中具有共享所述目标文件的权限的成员的用户标识;The apparatus according to claim 17, wherein the target whitelist information further comprises user identifications of members in the target conversation group who have the right to share the target file;
    所述判断模块,具体设置为:The judgment module is specifically set as:
    在所述预设参数的值用于表示所述目标会话组中的所有成员不都具有共享所述目标文件的权限的情况下,判断所述目标白名单信息包含的用户标识中,是否存在所述第一用户的用户标识;In the case where the value of the preset parameter is used to indicate that all members in the target conversation group do not have the permission to share the target file, it is determined whether there are all user identifiers included in the target whitelist information. The user ID of the first user;
    如果所述目标白名单信息包含的用户标识中,存在所述第一用户的用户标识,确定所述第一用户具有共享所述目标文件的权限;If the user identification of the first user exists in the user identification included in the target whitelist information, determining that the first user has the right to share the target file;
    如果所述目标白名单信息包含的用户标识中,不存在所述第一用户的用户标识,确定所述第一用户不具有共享所述目标文件的权限。If the user identification of the first user does not exist in the user identification included in the target whitelist information, it is determined that the first user does not have the right to share the target file.
  19. 根据权利要求15所述的装置,其中,所述目标白名单信息包括所述目标会话组中具有共享所述目标文件的权限的成员的用户标识;The apparatus according to claim 15, wherein the target whitelist information includes user identifications of members in the target conversation group who have the right to share the target file;
    所述判断模块,具体设置为判断所述目标白名单信息包含的用户标识中,是否存在所述第一用户的用户标识;The determining module is specifically configured to determine whether the user identifier of the first user exists among the user identifiers included in the target whitelist information;
    如果所述目标白名单信息包含的用户标识中,存在所述第一用户的用户标识,确定所述第一用户具有共享所述目标文件的权限;If the user identification of the first user exists in the user identification included in the target whitelist information, determining that the first user has the right to share the target file;
    如果所述目标白名单信息包含的用户标识中,不存在所述第一用户的用户标识,确定所述第一用户不具有共享所述目标文件的权限。If the user identification of the first user does not exist in the user identification included in the target whitelist information, it is determined that the first user does not have the right to share the target file.
  20. 一种文件共享装置,所述装置应用于第二终端,所述装置包括:A file sharing device, which is applied to a second terminal, and includes:
    获取模块,设置为获取登录所述第二终端的第二用户需要在目标会话组中共享的目标文件,以及所述目标文件对应的目标白名单信息,其中,所述目标白名单信息用于标识所述目标会话组中具有共享所述目标文件的权限的成员;The acquiring module is configured to acquire the target file that the second user logging in the second terminal needs to share in the target conversation group, and the target whitelist information corresponding to the target file, wherein the target whitelist information is used to identify Members of the target conversation group who have the right to share the target file;
    发送模块,设置为向服务器发送所述目标文件和所述目标白名单信息,以使所述服务器在接收到第一终端发送的用于访问所述目标文件的访问请求时,根据预先存储的文件标识与白名单信息的对应关系,确定与所述目标文件的文件标识对应的目标白名单信息,并根据所述目标白名单信息和所述第一用户的用户标识,判断所述第一用户是否具有共享所述目标文件的权限,如果所述第一用户不具有共享所述目标文件的权限,则拒绝向所述第一终端发送所述目标文件。The sending module is configured to send the target file and the target whitelist information to the server, so that when the server receives the access request for accessing the target file sent by the first terminal, it will be based on the pre-stored file Identify the correspondence between the identifier and the whitelist information, determine the target whitelist information corresponding to the file identifier of the target file, and determine whether the first user is the first user based on the target whitelist information and the user identifier of the first user Having the right to share the target file, and if the first user does not have the right to share the target file, refuse to send the target file to the first terminal.
  21. 根据权利要求20所述的装置,其中,所述获取模块,具体设置为接收针对预定区 域的操作所触发的信号,其中,所述预定区域位于所述第二终端展示的文件访问权限设置界面中,所述信号中包括所述目标文件对应的目标白名单信息。The device according to claim 20, wherein the acquisition module is specifically configured to receive a signal triggered by an operation in a predetermined area, wherein the predetermined area is located in a file access authority setting interface displayed by the second terminal , The signal includes target whitelist information corresponding to the target file.
  22. 一种文件共享装置,所述装置应用于服务器,所述装置包括:A file sharing device, the device is applied to a server, and the device includes:
    接收模块,用于接收第一终端发送的用于访问目标文件的访问请求,其中,所述访问请求中携带登录所述第一终端的第一用户的用户标识和所述目标文件的文件标识;所述目标文件为登录第二终端的第二用户需要在目标会话组中共享的文件,所述第二用户属于所述目标会话组的成员;A receiving module, configured to receive an access request for accessing a target file sent by a first terminal, wherein the access request carries the user ID of the first user logging in the first terminal and the file ID of the target file; The target file is a file that a second user who logs in to the second terminal needs to share in a target conversation group, and the second user is a member of the target conversation group;
    判断模块,用于根据预先存储的文件标识与会话组标识的对应关系、所述目标文件的文件标识和所述第一用户的用户标识,判断所述第一用户是否属于所述目标会话组的成员;The judgment module is configured to judge whether the first user belongs to the target conversation group based on the pre-stored correspondence between the file ID and the conversation group ID, the file ID of the target file, and the user ID of the first user member;
    第一处理模块,用于如果所述第一用户不属于所述目标会话组的成员,则拒绝向所述第一终端发送所述目标文件。The first processing module is configured to refuse to send the target file to the first terminal if the first user is not a member of the target conversation group.
  23. 一种文件共享系统,所述系统包括服务器和多个终端;A file sharing system, the system including a server and multiple terminals;
    所述多个终端中的第二终端,设置为获取登录所述第二终端的第二用户需要在目标会话组中共享的目标文件,以及所述目标文件对应的目标白名单信息,其中,所述目标白名单信息用于标识所述目标会话组中具有共享所述目标文件的权限的成员;向所述服务器发送所述目标文件和所述目标白名单信息;The second terminal of the plurality of terminals is configured to obtain the target file that the second user logging in the second terminal needs to share in the target conversation group, and the target whitelist information corresponding to the target file, where The target whitelist information is used to identify members in the target conversation group who have the right to share the target file; sending the target file and the target whitelist information to the server;
    所述服务器,设置为接收所述多个终端中的第一终端发送的用于访问所述目标文件的访问请求;根据预先存储的文件标识与白名单信息的对应关系,确定与所述目标文件的文件标识对应的目标白名单信息;根据所述目标白名单信息和所述第一用户的用户标识,判断所述第一用户是否具有共享所述目标文件的权限;如果所述第一用户不具有共享所述目标文件的权限,则拒绝向所述第一终端发送所述目标文件。The server is configured to receive an access request for accessing the target file sent by a first terminal of the plurality of terminals; and determine a connection with the target file according to the correspondence relationship between the file identifier and whitelist information stored in advance The target whitelist information corresponding to the file identifier of the file ID; according to the target whitelist information and the user ID of the first user, determine whether the first user has the right to share the target file; if the first user does not Having the right to share the target file, refuse to send the target file to the first terminal.
  24. 一种服务器,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;A server includes a processor, a communication interface, a memory, and a communication bus. The processor, the communication interface, and the memory communicate with each other through the communication bus;
    存储器,设置为存放计算机程序;Memory, set to store computer programs;
    处理器,设置为执行存储器上所存放的程序时,实现权利要求1-8或14任一所述的方法步骤。The processor is configured to implement the method steps of any one of claims 1-8 or 14 when it is configured to execute the program stored in the memory.
  25. 一种终端,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;A terminal includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
    存储器,设置为存放计算机程序;Memory, set to store computer programs;
    处理器,设置为执行存储器上所存放的程序时,实现权利要求9-13任一所述的方法步 骤。The processor is configured to implement the method steps of any one of claims 9-13 when it is configured to execute the program stored in the memory.
  26. 一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-8或14任一所述的方法步骤。A computer-readable storage medium in which a computer program is stored, and when the computer program is executed by a processor, the method steps of any one of claims 1-8 or 14 are realized.
  27. 一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求9-13任一所述的方法步骤。A computer-readable storage medium in which a computer program is stored, and when the computer program is executed by a processor, the method steps of any one of claims 9-13 are realized.
  28. 一种包含指令的计算机程序产品,所述包含指令的计算机程序产品在计算机上运行时,使得计算机执行权利要求1-8或14任一所述的方法步骤。A computer program product containing instructions, which when running on a computer, causes the computer to execute the method steps of any one of claims 1-8 or 14.
  29. 一种包含指令的计算机程序产品,所述包含指令的计算机程序产品在计算机上运行时,使得计算机执行权利要求9-13任一所述的方法步骤。A computer program product containing instructions, when the computer program product containing instructions runs on a computer, the computer executes the method steps of any one of claims 9-13.
  30. 一种计算机程序,所述计算机程序在计算机上运行时,使得计算机执行权利要求1-8或14任一所述的方法步骤。A computer program, which when running on a computer, causes the computer to execute the method steps of any one of claims 1-8 or 14.
  31. 一种计算机程序,所述计算机程序在计算机上运行时,使得计算机执行权利要求9-13任一所述的方法步骤。A computer program that, when running on a computer, causes the computer to execute the method steps of any one of claims 9-13.
PCT/CN2020/092665 2019-05-31 2020-05-27 File sharing method, apparatus and system, server, terminal, and storage medium WO2020238971A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201910473086.2A CN110191131A (en) 2019-05-31 2019-05-31 A kind of file sharing method, device, system, server and storage medium
CN201910472070.X 2019-05-31
CN201910473086.2 2019-05-31
CN201910472070.XA CN110138801A (en) 2019-05-31 2019-05-31 File sharing method, device, system, server, terminal and storage medium

Publications (1)

Publication Number Publication Date
WO2020238971A1 true WO2020238971A1 (en) 2020-12-03

Family

ID=73552462

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/092665 WO2020238971A1 (en) 2019-05-31 2020-05-27 File sharing method, apparatus and system, server, terminal, and storage medium

Country Status (1)

Country Link
WO (1) WO2020238971A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116226499A (en) * 2023-03-22 2023-06-06 北京字跳网络技术有限公司 Information query method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118418A (en) * 2009-12-30 2011-07-06 比亚迪股份有限公司 Mobile terminal data sharing system and method
CN103595760A (en) * 2013-10-15 2014-02-19 北京航空航天大学 File picture sharing method based on cloud
CN106060017A (en) * 2016-05-19 2016-10-26 上海承蓝科技股份有限公司 Cloud platform and method of data management and control
JP6092057B2 (en) * 2013-09-13 2017-03-08 株式会社日立ソリューションズ File access control device, file access control program, and file access control method
CN110138801A (en) * 2019-05-31 2019-08-16 北京金山云网络技术有限公司 File sharing method, device, system, server, terminal and storage medium
CN110191131A (en) * 2019-05-31 2019-08-30 北京金山云网络技术有限公司 A kind of file sharing method, device, system, server and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118418A (en) * 2009-12-30 2011-07-06 比亚迪股份有限公司 Mobile terminal data sharing system and method
JP6092057B2 (en) * 2013-09-13 2017-03-08 株式会社日立ソリューションズ File access control device, file access control program, and file access control method
CN103595760A (en) * 2013-10-15 2014-02-19 北京航空航天大学 File picture sharing method based on cloud
CN106060017A (en) * 2016-05-19 2016-10-26 上海承蓝科技股份有限公司 Cloud platform and method of data management and control
CN110138801A (en) * 2019-05-31 2019-08-16 北京金山云网络技术有限公司 File sharing method, device, system, server, terminal and storage medium
CN110191131A (en) * 2019-05-31 2019-08-30 北京金山云网络技术有限公司 A kind of file sharing method, device, system, server and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116226499A (en) * 2023-03-22 2023-06-06 北京字跳网络技术有限公司 Information query method and device and electronic equipment

Similar Documents

Publication Publication Date Title
US11218460B2 (en) Secure authentication for accessing remote resources
US10616278B1 (en) Secure virtual meetings
EP3164793B1 (en) Dual channel identity authentication
US10021098B2 (en) Account login method, device, and system
US9979715B2 (en) Aggregator technology without usernames and passwords
US8869258B2 (en) Facilitating token request troubleshooting
KR20180081113A (en) Message management method, device and storage medium
US20090019517A1 (en) Method and System for Restricting Access of One or More Users to a Service
US11770385B2 (en) Systems and methods for malicious client detection through property analysis
US20150373026A1 (en) Permission management method, device and system for cloud platform service
WO2022143174A1 (en) Data transmission method and apparatus, device, storage medium, and computer program product
US11706224B2 (en) Entity authentication for pre-authenticated links
EP3975522A1 (en) Registration in communication networks
US20230254146A1 (en) Cybersecurity guard for core network elements
WO2020238971A1 (en) File sharing method, apparatus and system, server, terminal, and storage medium
WO2023202214A1 (en) Communication method, apparatus and system, terminal, and server
US9742776B2 (en) Contact identification validation via social invitation
WO2018010256A1 (en) Method and device for wi-fi sharing
WO2022247525A1 (en) Method for handling internet of things device, and method for setting device resource in internet of things device
CN110048864B (en) Method and apparatus for authenticating an administrator of a device-specific message group
US11184162B1 (en) Privacy preserving secure task automation
US9571478B2 (en) Conditional request processing
WO2017080232A1 (en) Method, device and system for logging in to microblog on television
US12034713B2 (en) Secure authentication for accessing remote resources
US9094439B2 (en) End network decider

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20812988

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20812988

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22/03/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20812988

Country of ref document: EP

Kind code of ref document: A1