CN114595195A - File sharing method, device, system, server and readable storage medium - Google Patents

File sharing method, device, system, server and readable storage medium Download PDF

Info

Publication number
CN114595195A
CN114595195A CN202110956722.4A CN202110956722A CN114595195A CN 114595195 A CN114595195 A CN 114595195A CN 202110956722 A CN202110956722 A CN 202110956722A CN 114595195 A CN114595195 A CN 114595195A
Authority
CN
China
Prior art keywords
file
shared
source terminal
database
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110956722.4A
Other languages
Chinese (zh)
Inventor
余海舟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Yaxin Software Co ltd
Original Assignee
Nanjing Yaxin Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Yaxin Software Co ltd filed Critical Nanjing Yaxin Software Co ltd
Priority to CN202110956722.4A priority Critical patent/CN114595195A/en
Publication of CN114595195A publication Critical patent/CN114595195A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a file sharing method, a file sharing device, a file sharing system, a file sharing server and a readable storage medium. The method comprises the following steps: the method comprises the steps of receiving a file to be shared uploaded by a source terminal, transmitting the file to be shared to a database and a storage space corresponding to the source terminal, determining at least one target terminal according to subscriber information carried by the source terminal when the file to be shared is uploaded, calling the file to be shared in the database, and issuing the file to be shared to the target terminal. The embodiment of the application solves the technical problem that the existing file transmission scheme is lack of standardization in file management.

Description

File sharing method, device, system, server and readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a file sharing method, apparatus, system, server, and readable storage medium.
Background
With the development of information technology, a plurality of service data file interaction scenes exist in the existing platform system, and the technology and the mode of interconnection and mutual transmission among the devices of the system are very complete. Currently, technical functions such as ftp transmission and http file downloading are usually adopted to realize the scene requirement of file interaction between system devices. However, at present, the problem of lack of standardization of file management still exists in various file transmission schemes.
Disclosure of Invention
The application provides a file sharing method, a file sharing device, a file sharing system, a file sharing server and a readable storage medium, which are used for solving the technical problem that file management lacks standardization in the existing file transmission scheme.
In a first aspect, an embodiment of the present application provides a file sharing method, which is applicable to a server, and includes:
receiving a file to be shared uploaded by a source terminal;
transmitting the file to be shared to a database and a storage space corresponding to the source terminal;
determining at least one target terminal according to subscriber information carried by the source terminal when uploading the file to be shared;
and calling the file to be shared in the database, and issuing the file to be shared to the target terminal.
In some embodiments, before receiving the file to be shared uploaded by the source terminal, the method includes:
receiving a data sharing request sent by the source terminal, wherein the data sharing request comprises subscriber information and file data to be shared;
responding to the data sharing request, generating response information, and creating a storage space matched with the file data to be shared in the database, wherein the response information comprises a request result;
and returning the request result to the source terminal so that the source terminal can upload the file to be shared after receiving the request result.
In some embodiments, the transmitting the file to be shared to a storage space corresponding to the source terminal in a database includes:
encrypting the file to be shared by using the encrypted file;
and uploading the encrypted file to be shared to the storage space.
In some embodiments, the generating response information in response to the data sharing request includes:
generating information to be pushed according to the subscriber information and the identification corresponding to the storage space;
the determining at least one target terminal according to the subscriber information carried by the source terminal when uploading the file to be shared includes:
and determining at least one target terminal according to the subscriber information in the information to be pushed.
In some embodiments, after the file to be shared is called from the database, sharing the file to be shared with the target terminal includes:
calling a corresponding encrypted file to be shared from the database according to the information to be pushed;
and sending the encrypted file to be shared and a decryption file corresponding to the encrypted file to the target terminal, so that the target terminal decrypts the encrypted file to be shared according to the decryption file.
In some embodiments, the retrieving the file to be shared from the database and issuing the file to be shared to the target terminal includes:
calling a corresponding encrypted file to be shared from the database according to the information to be pushed;
adding the called encrypted file to be shared to a file downloading site, and generating a file downloading token;
and sending a subscription notification to the target terminal, wherein the subscription notification comprises the file download token and a corresponding decryption file, so that when the target terminal receives the subscription notification, the encrypted file to be shared is downloaded according to the file download token, and the encrypted file to be shared is decrypted by using the decryption file.
In some embodiments, the method further comprises:
judging whether two node devices for data interaction communicate through an intranet or not, wherein the node devices comprise the source terminal, the target terminal, the server and the database; if so, carrying out file transmission through an sftp protocol; otherwise, the file transmission is carried out through the https protocol.
In a second aspect, an embodiment of the present application provides a file sharing apparatus, which is suitable for a server, and includes:
the file receiving module to be shared is used for receiving a file to be shared uploaded by a source terminal;
the storage space creating module is used for transmitting the file to be shared to a database and a storage space corresponding to the source terminal;
the target terminal determining module is used for determining at least one target terminal according to subscriber information carried by the source terminal when the source terminal uploads the file to be shared;
and the file sharing module is used for calling the file to be shared from the database and issuing the file to be shared to the target terminal.
In a third aspect, an embodiment of the present application provides a file sharing system, including: the system comprises a source terminal, a target terminal, a server and a database;
the source terminal uploads a file to be shared to a server;
the server receives a file to be shared uploaded by a source terminal and transmits the file to be shared to a storage space corresponding to the source terminal in the database;
the server determines at least one target terminal according to subscriber information carried by the source terminal when uploading the file to be shared;
the server calls the file to be shared from the database and issues the file to be shared to the target terminal;
and the target terminal receives the file to be shared sent by the server.
In a fourth aspect, an embodiment of the present application provides a server, where the server includes:
a processor; and
a memory configured to store machine readable instructions, which when executed by the processor, cause the processor to perform the file sharing method of the above embodiment.
In a fifth aspect, the present application provides a computer-readable storage medium for storing computer instructions, which, when executed on a computer, enable the computer to perform the file sharing method described in the foregoing embodiment.
According to the file sharing method, the file sharing device, the file sharing system, the server and the readable storage medium, the file to be shared is transmitted to the storage space corresponding to the database and the source terminal by receiving the file to be shared uploaded by the source terminal, at least one target terminal is determined according to the subscriber information carried by the source terminal when the file to be shared is uploaded, so that the file to be shared is called from the database and is issued to the target terminal, and therefore, in combination with the design thought of multiple tenants, the mode of one-end data generation and multi-end subscription can be realized, the subscription function facing to tenant/tenant group can be realized, meanwhile, the independent storage space is established for each file to be shared, the data isolation among the multiple tenants is realized, the file sharing method can be widely applied to the open system of file sharing, and the standardization during the file interaction among systems is improved, the technical problem that file management lacks standardization in an existing file transmission scheme is solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is a schematic structural diagram of a file sharing system according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a file sharing method according to an embodiment of the present disclosure;
fig. 3 is a schematic functional structure diagram of a server according to an embodiment of the present application;
fig. 4 is a schematic diagram of data interaction between a server and a database and between tenants according to an embodiment of the present application;
fig. 5 is a schematic diagram of data interaction of a source terminal, a server, and a database in a process of processing a data sharing request according to an embodiment of the present application;
fig. 6 is a schematic diagram of data interaction during a process of uploading a file to be shared by a source terminal, a server, and a database according to an embodiment of the present application;
fig. 7 is a schematic diagram of data interaction of a target terminal, a server, and a database in a passive subscription file pushing process according to an embodiment of the present application;
fig. 8 is a schematic diagram of data interaction of a target terminal, a server, and a database in an active subscription file downloading process according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a file sharing apparatus according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Referring to fig. 1, a schematic structural diagram of a file sharing system provided in an embodiment of the present disclosure is shown, where the file sharing system includes a server 101, a source terminal 102, a database 103, and a target terminal 104. The server 101 is connected to a source terminal 102, a database 103, and a target terminal 104. It should be noted that the terminals (i.e., the source terminal 102 and the destination terminal 104) in the file sharing system are used for data interaction between the tenant and the server 101, and may be electronic devices such as a mobile phone, a tablet computer, a smart watch, or a computer. The database 103 is used for caching files to be shared, and in a specific application, the database 103 may be configured as an independent background server, or may be configured as a data storage unit inside the server 101 in the present application, which is not limited in this application. Any two node devices connected as described above may be connected via a wired network or a wireless network, where a limited network includes, but is not limited to: universal serial bus, wireless networks including but not limited to: WiFi, bluetooth, etc.
Referring to fig. 2, a schematic flowchart of a file sharing method provided in the embodiment of the present application is applicable to the server 101, and includes steps S201 to S204.
It should be noted that the file sharing method of the present embodiment is applicable to an open platform system in a multi-tenant mode, and therefore, for implementing a file open sharing function based on multiple tenants, referring to fig. 3, a functional structure diagram of a server provided in the present embodiment is shown, where functional components of the server 101 include a registration management module 1011, a file management module 1012, a security management module 1013, and a file warehouse module 1014. The registration management module 1011 is configured to register and manage tenants in a multi-tenant mode, so as to collect registration information of platform tenants, where the registration information includes, but is not limited to, a file storage space, a contact manner, a tenant ID, a tenant key, a tenant mode (production/consumption/bidirectional), and the like, and the tenant management includes tenant state management, tenant file sharing management, tenant subscription management, tenant grouping management, and the like. The file management module 1012 is configured to share and push data files, establish a file security storage management rule for tenants, and implement, through sharing a file index, a fast search for files stored in the file repository module 1014, or implement a search for database storage files located outside the server 101. And the file warehouse module 1014 is used for realizing file storage management by adopting HDFS distribution. The security management module 1013 provides data management of communication security, transmission security, file management for file sharing, data isolation between multiple tenants, and high availability management for the file repository module 1014.
In a specific embodiment, referring to fig. 4, a schematic diagram of data interaction between a server and a database and between tenants is provided in the embodiment of the present application, in which a source terminal 102 is a tenant terminal device for generating a data file source, a destination terminal 104 is a tenant terminal device for receiving data file push, and a server 101 is used for making and controlling a transaction protocol, security control, management of a file download site, and a security mechanism in data file interaction, including compression, encryption, and decryption rules of a data file. The source terminal 102 and the target terminal 104 are registered with a registration management module of the server 101 to provide registration information. Furthermore, the source terminal 102 uploads shared data, the server 101 provides a sharing policy oriented to an intranet and a public network, provides a configured security policy for the public network and the intranet, allows the source terminal 102 to share files, and can default to a certain target terminal subscription or realize a 1- > N data push mode according to a group subscription of the target terminal. The server 101 provides a file subscription function to the target terminal 104, and there may be two sharing file acquisition modes of active downloading and passive pushing. The server 101 caches the file to be shared uploaded by the source terminal 102 in the database 103 to temporarily store the file, and reads the file to be shared from the database 103 during pushing, and shares the file to be shared to the target terminal 104.
S201, receiving a file to be shared uploaded by a source terminal.
S202, transmitting the file to be shared to a database and a storage space corresponding to the source terminal.
In some embodiments, referring to fig. 5, a schematic diagram of data interaction in a process of processing a data sharing request by a source terminal, a server, and a database provided in the embodiment of the present application includes, before step S201:
receiving a data sharing request sent by the source terminal, wherein the data sharing request comprises subscriber information and file data to be shared;
responding to the data sharing request, generating response information, and creating a storage space matched with the file data to be shared in the database, wherein the response information comprises a request result;
and returning the request result to the source terminal so that the source terminal can upload the file to be shared after receiving the request result.
In the present application, when the tenant needs to share the file in step S201, the source terminal 102 submits a data sharing request to the server 101 in advance to apply for authorization, so that the normalization and the operation security in the file sharing process can be effectively improved.
In the present application, the data sharing request includes but is not limited to: the file data to be shared comprises file data to be shared, legality information and subscriber information (such as a subscription object/subscription object group), wherein the file data to be shared comprises a file to be shared, the size of the file, the format of the file, encryption information (such as whether the file is encrypted) and a transmission mode. The tenant (i.e., the source terminal 102) submits a data sharing request to the server 101, and then the server 101 checks the validity and rules of the request according to the data sharing request, and applies for file storage allocation to the database 103 for the file to be shared that is requested after the checking is passed, so that the database 103 allocates a corresponding storage space, generates response information, and feeds back a request result in the response information to the source terminal 102. Illustratively, if the data sharing request submitted by the source terminal 102 passes the audit, the request result is that the request passes, so that the source terminal 102 uploads the shared file after obtaining the authorization; if the audit is not passed, the request result is that the request is not passed, and the source terminal 102 cannot upload the shared file subsequently because the authorization is not obtained. In addition, according to the subscriber information in the data sharing request, determining the authorization relationship between the file to be shared and the corresponding subscription object/subscription object group, so that the file to be shared is pushed to the corresponding subscriber according to the authorization relationship.
Therefore, in the embodiment, an independent storage space is created for each data sharing request, data isolation of each shared file is realized, and data collision can be effectively reduced. Meanwhile, as the number of tenants in the open platform is large, the types of the used terminal devices are various, and the shared files are cached in the database in the multi-tenant open platform, the dependence degree of information or parameters between the source terminal and the target terminal is reduced. In addition, the shared files are obtained from the database through the target terminals, so that transmission blockage caused by frequent operation of multiple tenants of the platform is avoided, and the file transmission efficiency is improved.
In some embodiments, referring to fig. 6, a schematic diagram of data interaction in a process of uploading a file to be shared by a source terminal, a server, and a database provided in an embodiment of the present application is shown, where the response information includes an encrypted file, and the transmitting the file to be shared to a storage space corresponding to the source terminal in the database includes:
encrypting the file to be shared by using the encrypted file;
and uploading the encrypted file to be shared to the storage space.
In this embodiment, the source terminal 102 uploads the shared file to the server 101, and the server 101 encrypts the shared file according to the encrypted file (such as a public key) responded after the request passes, generates a shared result after decryption, and feeds back the shared result to the source terminal 101. Further, the encrypted sharing file is uploaded to the database 103 for caching. Therefore, the embodiment enhances the security of file interaction between devices by encrypting and transmitting the shared file, and can effectively prevent the file from being tampered or lost in the transmission process.
In a preferred embodiment, the method further comprises:
judging whether two node devices for data interaction communicate through an intranet or not, wherein the node devices comprise the source terminal, the target terminal, the server and the database; if so, carrying out file transmission through an sftp protocol; otherwise, the file transmission is carried out through the https protocol.
Illustratively, if the source terminal 102 of the current data interaction communicates with the server 101 through an intranet, file transfer between the two is performed by using an sftp protocol; if the source terminal 102 of the current data interaction communicates with the server 101 through the external network, the https protocol is adopted for file transmission. According to the embodiment, the sftp protocol is adopted for intranet communication among the devices, the https protocol is adopted for extranet communication, file transmission is achieved, data encryption transmission is achieved, and the security of file transmission can be further improved.
And S203, determining at least one target terminal according to subscriber information carried by the source terminal when the source terminal uploads the file to be shared.
And S204, calling the file to be shared from the database, and issuing the file to be shared to the target terminal.
Based on the foregoing embodiment, in an embodiment, the generating response information in response to the data sharing request includes:
generating information to be pushed according to the subscriber information and the identification corresponding to the storage space;
the determining at least one target terminal according to the subscriber information carried by the source terminal when uploading the file to be shared includes:
and determining at least one target terminal according to the subscriber information in the information to be pushed.
It should be noted that, in the process of transmitting the file to be shared to the storage space corresponding to the database and the source terminal 102, the server 101 obtains the identifier corresponding to the file to be shared in the storage space, so as to read the corresponding file to be shared from the database 103 according to the identifier. Meanwhile, the server 101 acquires subscriber information corresponding to the file to be shared from the data sharing request, and determines the target terminal 104 having an authorization relationship with the file to be shared according to the subscriber information. Therefore, the server 101 organizes the identifier corresponding to the file to be shared in the storage space and the subscriber information corresponding to the file to be shared into the information to be pushed.
In an embodiment, referring to fig. 7, a schematic diagram of data interaction of a target terminal, a server, and a database in a passive file subscription pushing process is provided in the embodiment of the present application, where the server shares a file in a passive pushing manner, and step S204 includes:
calling a corresponding encrypted file to be shared from the database according to the information to be pushed;
and sending the encrypted file to be shared and a decryption file corresponding to the encrypted file to the target terminal, so that the target terminal decrypts the encrypted file to be shared according to the decryption file.
In this embodiment, when a file is pushed, the dispatcher of the server 101 retrieves information to be pushed, obtains the network address of the target terminal 104 by loading the subscriber information of the file to be shared, and retrieves a corresponding file from the database 103 according to the identifier corresponding to the file to be shared in the storage space. Further, the file to be shared is pushed to the target terminal 104 according to the network address of the target terminal 104. After the file is pushed, the server 101 sends a decryption file (such as a private key) with the same name as the file to be shared to the target terminal 104, so as to decrypt the encrypted file to be shared so as to obtain the shared content, thereby ensuring the data security during the file transmission process. Further, registration information of the tenant when the tenant registers in the platform, such as a contact manner of the tenant, is obtained according to the subscriber information, so that a file push arrival notification is sent to the target terminal 104 according to the contact manner of the target terminal to remind the tenant. Preferably, in this embodiment, data of the database is read in an sftp remote reading manner, and the data is shared to the target terminal in an sftp remote writing manner. Therefore, the data are shared in a passive push mode, the data are timely shared with the tenants, the timeliness of the shared data is guaranteed, and the data push management of the multi-tenant platform is effectively standardized.
In an embodiment, referring to fig. 8, a schematic diagram of data interaction of a target terminal, a server, and a database in an active file downloading and subscribing process is provided in the embodiment of the present application, where the server shares a file in an active downloading manner, and step S204 includes:
calling a corresponding encrypted file to be shared from the database according to the information to be pushed;
adding the called encrypted file to be shared to a file downloading site, and generating a file downloading token;
and sending a subscription notification to the target terminal, wherein the subscription notification comprises the file download token and a corresponding decryption file, so that when the target terminal receives the subscription notification, the encrypted file to be shared is downloaded according to the file download token, and the encrypted file to be shared is decrypted by using the decryption file.
In this embodiment, when a file is pushed, a scheduler of the server 101 retrieves information to be pushed, obtains a network address of a target terminal by loading subscriber information of a file to be shared, and retrieves a corresponding file from the database 103 according to an identifier corresponding to the file to be shared in the storage space, so as to add the file to be shared to a file downloading site in the server 101, where the file to be shared is preferably an encrypted file. The file downloading site is used for caching files and supporting breakpoint continuous transmission. Meanwhile, the server 101 generates a download file token according to the file to be shared. Further, the server 101 sends a subscription notification to the target terminal 104 by using the registration information of the target terminal 104, where the content of the notification includes the download file token, the decryption file (such as a private key) corresponding to the file to be shared, and the data file life cycle. Further, after receiving the subscription notification, the target terminal 104 downloads the file to be shared from the file download site of the server 101 by using the download file token, and then decrypts the file to be shared by using the decryption file in the notification after downloading the file, so as to obtain the shared content. Therefore, the data is shared in an active downloading mode, so that the client can download the shared data according to the requirement, and the data push management of the multi-tenant platform is effectively standardized.
The file sharing method suitable for the server, provided by the application, comprises the steps of receiving a file to be shared uploaded by a source terminal, transmitting the file to be shared to a database and a storage space corresponding to the source terminal, determining at least one target terminal according to subscriber information carried by the source terminal when the file to be shared is uploaded, calling the file to be shared in the database, and issuing the file to be shared to the target terminal, so that a mode of generating data at one end and subscribing at multiple ends can be realized by combining a multi-tenant design idea, a subscription function facing a tenant/tenant group can be realized, meanwhile, data sharing of data among multiple tenants can be realized by establishing an independent storage space for each file to be shared, the file sharing method can be widely applied to an open system of files, and the standardability of file interaction among systems is improved, the technical problem that file management lacks standardization in an existing file transmission scheme is solved.
Referring to fig. 9, a schematic structural diagram of a file sharing apparatus provided in an embodiment of the present application is shown, where the apparatus includes:
a to-be-shared file receiving module 301, configured to receive a to-be-shared file uploaded by a source terminal;
a storage space creating module 302, configured to transmit the file to be shared to a storage space corresponding to the source terminal in a database;
a target terminal determining module 303, configured to determine at least one target terminal according to subscriber information carried by the source terminal when uploading the file to be shared;
the file sharing module 304 is configured to call the file to be shared from the database, and issue the file to be shared to the target terminal.
In one embodiment, the apparatus further comprises:
the data sharing request unit is used for receiving a data sharing request sent by the source terminal, and the data sharing request comprises subscriber information and file data to be shared;
the response unit is used for responding to the data sharing request, generating response information and creating a storage space matched with the file data to be shared in the database, wherein the response information comprises a request result;
and the request result feedback unit is used for returning the request result to the source terminal so that the source terminal can upload the file to be shared after receiving the request result.
In an embodiment, the storage space creation module 302 includes:
the data encryption unit is used for encrypting the file to be shared by utilizing the encrypted file;
and the data storage unit is used for uploading the encrypted file to be shared to the storage space.
In some embodiments, the response unit comprises:
and the information to be pushed generating unit is used for generating information to be pushed according to the subscriber information and the identification corresponding to the storage space.
In some embodiments, the target terminal determining module 303 comprises:
and the subscriber information calling unit is used for determining at least one target terminal according to the subscriber information in the information to be pushed.
In one embodiment, the file sharing module 304 includes:
the first data calling unit is used for calling the corresponding encrypted file to be shared from the database according to the information to be pushed;
and the first data decryption unit is used for sending the encrypted file to be shared and the corresponding decrypted file to the target terminal, so that the target terminal decrypts the encrypted file to be shared according to the decrypted file.
In one embodiment, the file sharing module 304 includes:
the second data calling unit is used for calling the corresponding encrypted file to be shared from the database according to the information to be pushed;
the shared data caching unit is used for adding the called encrypted file to be shared to a file downloading site and generating a file downloading token;
and the second data decryption unit is used for sending a subscription notification to the target terminal, wherein the subscription notification comprises the file download token and a corresponding decryption file, so that when the target terminal receives the subscription notification, the encrypted file to be shared is downloaded according to the file download token, and the encrypted file to be shared is decrypted by using the decryption file.
In one embodiment, the apparatus further comprises:
the communication unit is used for judging whether two node devices for data interaction communicate through an intranet or not, and each node device comprises the source terminal, the target terminal, the server and the database; if so, carrying out file transmission through an sftp protocol; otherwise, the file transmission is carried out through the https protocol.
The file sharing device provided by the application receives the file to be shared uploaded by a source terminal, transmits the file to be shared to a database and a storage space corresponding to the source terminal, determining at least one target terminal according to subscriber information carried by the source terminal when uploading the file to be shared, therefore, the file to be shared is called from the database and is issued to the target terminal, and thus, in combination with the multi-tenant design idea, can realize the data generation at one end, the multi-end subscription mode and the subscription function facing to the tenant/tenant group, meanwhile, an independent storage space is created for each file application to be shared, data isolation of data among multiple tenants is achieved, the method can be widely applied to an open system for file sharing, standardization during file interaction among systems is improved, and the technical problem that file management is lack of standardization in the existing file transmission scheme is solved.
Referring to fig. 1, the file sharing system includes: a source terminal 102, a target terminal 104, a server 101 and a database 103; wherein the content of the first and second substances,
the source terminal 102 uploads a file to be shared to the server 101;
the server 101 receives a file to be shared uploaded by a source terminal 102, and transmits the file to be shared to a database 103 and a storage space corresponding to the source terminal 102;
the server 101 determines at least one target terminal 104 according to subscriber information carried by the source terminal 102 when uploading a file to be shared;
the server 101 calls the file to be shared from the database 103 and issues the file to be shared to the target terminal 104;
the target terminal 104 receives the file to be shared sent by the server 101.
The application provides a file sharing system, includes: the file sharing method comprises a source terminal, a target terminal, a server and a database, wherein the source terminal uploads a file to be shared to the server, the server receives the file to be shared uploaded by the source terminal and transmits the file to be shared to a storage space corresponding to the source terminal in the database, the server determines at least one target terminal according to subscriber information carried by the source terminal when uploading the file to be shared, so that the server calls the file to be shared in the database and issues the file to be shared to the target terminal, the target terminal receives the file to be shared sent by the server, and thus, by combining a multi-tenant design idea, a mode of one-end data generation and multi-end subscription can be realized, the subscription function of a tenant/tenant group is oriented, and meanwhile, an independent storage space is created for each file to be shared, the data isolation of data among multiple tenants is realized, the method can be widely applied to an open system for file sharing, the standardization during file interaction among systems is improved, and the technical problem that file management lacks standardization in the existing file transmission scheme is solved.
Referring to fig. 10, a schematic structural diagram of a server provided in the embodiment of the present application is shown, where the embodiment of the present application provides a server 101, where the server 101 includes: a memory and a processor; at least one program stored in the memory for execution by the processor, which when executed by the processor, implements: the data sharing method has the advantages that a multi-tenant design idea is combined, a mode of one-end data generation and multi-end subscription can be realized, a subscription function facing tenant/tenant groups is realized, meanwhile, an independent storage space is created for each file application to be shared, data isolation of data among multiple tenants is realized, the data sharing method can be widely applied to an open system of file sharing, the standardization during file interaction among systems is improved, and the technical problem that file management lacks standardization in the existing file transmission scheme is solved.
In an alternative embodiment, a server is provided, as shown in fig. 10, the server 101 shown in fig. 10 includes: a processor 4001 and a memory 4003. Processor 4001 is coupled to memory 4003, such as via bus 4002. Optionally, the server 101 may further include a transceiver 4004, and the transceiver 4004 may be used for data interaction between the server 101 and other electronic devices, such as data transmission and/or data reception. In practical applications, the transceiver 4004 is not limited to one, and the configuration of the server 101 is not limited to the embodiment of the present application.
The Processor 4001 may be a CPU (Central Processing Unit), a general-purpose Processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 4001 may also be a combination that performs a computational function, including, for example, a combination of one or more microprocessors, a combination of a DSP and a microprocessor, or the like.
Bus 4002 may include a path that carries information between the aforementioned components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 4002 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 8, but this is not intended to represent only one bus or type of bus.
The Memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), a magnetic Disc storage medium or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these.
The memory 4003 is used for storing application program codes (computer programs) for executing the present scheme, and is controlled by the processor 4001 to execute. Processor 4001 is configured to execute application code stored in memory 4003 to implement what is shown in the foregoing method embodiments.
The embodiment of the present application provides a computer readable storage medium, on which a computer program is stored, and when the computer program runs on a computer, the computer is enabled to execute the corresponding content in the foregoing method embodiment.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (11)

1. A file sharing method is applicable to a server and comprises the following steps:
receiving a file to be shared uploaded by a source terminal;
transmitting the file to be shared to a database and a storage space corresponding to the source terminal;
determining at least one target terminal according to subscriber information carried by the source terminal when uploading the file to be shared;
and calling the file to be shared in the database, and issuing the file to be shared to the target terminal.
2. The file sharing method according to claim 1, wherein before receiving the file to be shared uploaded by the source terminal, the method includes:
receiving a data sharing request sent by the source terminal, wherein the data sharing request comprises subscriber information and file data to be shared;
responding to the data sharing request, generating response information, and creating a storage space matched with the file data to be shared in the database, wherein the response information comprises a request result;
and returning the request result to the source terminal so that the source terminal can upload the file to be shared after receiving the request result.
3. The file sharing method according to claim 2, wherein the response information includes an encrypted file, and the transmitting the file to be shared to a storage space corresponding to the source terminal in a database includes:
encrypting the file to be shared by using the encrypted file;
and uploading the encrypted file to be shared to the storage space.
4. The file sharing method according to claim 2, wherein the generating response information in response to the data sharing request includes:
generating information to be pushed according to the subscriber information and the identification corresponding to the storage space;
the determining at least one target terminal according to the subscriber information carried by the source terminal when uploading the file to be shared includes:
and determining at least one target terminal according to the subscriber information in the information to be pushed.
5. The file sharing method according to claim 4, wherein the sharing the file to be shared with the target terminal after the file to be shared is called from the database comprises:
calling a corresponding encrypted file to be shared from the database according to the information to be pushed;
and sending the encrypted file to be shared and a decryption file corresponding to the encrypted file to the target terminal, so that the target terminal decrypts the encrypted file to be shared according to the decryption file.
6. The file sharing method according to claim 4, wherein the retrieving the file to be shared from the database and issuing the file to be shared to the target terminal includes:
calling a corresponding encrypted file to be shared from the database according to the information to be pushed;
adding the called encrypted file to be shared to a file downloading site, and generating a file downloading token;
and sending a subscription notification to the target terminal, wherein the subscription notification comprises the file download token and a corresponding decryption file, so that when the target terminal receives the subscription notification, the encrypted file to be shared is downloaded according to the file download token, and the encrypted file to be shared is decrypted by using the decryption file.
7. The method of file sharing according to claim 1, further comprising:
judging whether two node devices for data interaction communicate through an intranet or not, wherein the node devices comprise the source terminal, the target terminal, the server and the database; if so, carrying out file transmission through an sftp protocol; otherwise, the file transmission is carried out through the https protocol.
8. A file sharing apparatus adapted to a server, comprising:
the file receiving module to be shared is used for receiving a file to be shared uploaded by a source terminal;
the storage space creating module is used for transmitting the file to be shared to a database and a storage space corresponding to the source terminal;
the target terminal determining module is used for determining at least one target terminal according to subscriber information carried by the source terminal when the source terminal uploads the file to be shared;
and the file sharing module is used for calling the file to be shared from the database and issuing the file to be shared to the target terminal.
9. A file sharing system, comprising: the system comprises a source terminal, a target terminal, a server and a database;
the source terminal uploads a file to be shared to a server;
the server receives a file to be shared uploaded by a source terminal and transmits the file to be shared to a storage space corresponding to the source terminal in the database;
the server determines at least one target terminal according to subscriber information carried by the source terminal when uploading the file to be shared;
the server calls the file to be shared from the database and issues the file to be shared to the target terminal;
and the target terminal receives the file to be shared sent by the server.
10. A server, characterized in that the server comprises:
a processor; and
a memory configured to store machine readable instructions that, when executed by the processor, cause the processor to perform the file sharing method of any of claims 1-7.
11. A computer-readable storage medium storing computer instructions for causing a computer to perform the file sharing method according to any one of claims 1 to 7 when the computer instructions are executed on the computer.
CN202110956722.4A 2021-08-19 2021-08-19 File sharing method, device, system, server and readable storage medium Pending CN114595195A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110956722.4A CN114595195A (en) 2021-08-19 2021-08-19 File sharing method, device, system, server and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110956722.4A CN114595195A (en) 2021-08-19 2021-08-19 File sharing method, device, system, server and readable storage medium

Publications (1)

Publication Number Publication Date
CN114595195A true CN114595195A (en) 2022-06-07

Family

ID=81814156

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110956722.4A Pending CN114595195A (en) 2021-08-19 2021-08-19 File sharing method, device, system, server and readable storage medium

Country Status (1)

Country Link
CN (1) CN114595195A (en)

Similar Documents

Publication Publication Date Title
CN110035110B (en) Cross-domain service layer resource propagation method and equipment
JP4823602B2 (en) Method for providing access to encrypted content to one of a plurality of consumer systems, apparatus for providing access to encrypted content, and method for generating a secure content package
CA2926206C (en) A system and method for nfc peer-to-peer authentication and secure data transfer
KR100996768B1 (en) System for remotely accessing a mass storage unit and a security storage unit in a portable communicating object
JP6652767B2 (en) Methods for managing the status of connected devices
CN110543510B (en) Bill data processing method, device, storage medium and computer equipment
US20200387859A1 (en) Methods, Application Server, Block Chain Node and Media For Logistics Tracking and Source Tracing
US20200359308A1 (en) Methods, devices and media for obtaining and for providing access information of wireless access points
CN112468540B (en) Cloud platform-based data distribution method, equipment and medium
CN109522462B (en) Cloud query method, device, equipment and storage medium based on block chain
CN104349316A (en) Network sharing device, network sharing system and network sharing method
CN105450585A (en) Information transmission method and device
CN113254103A (en) Application function implementation method and device and storage medium
CN107203877B (en) Method and device for realizing service between accounts in close range
CN111277983A (en) RFID middleware, publish-subscribe system and data transmission method
CN116541320B (en) Intelligent IO module bus communication method, IO module, terminal and medium
CN115088232A (en) Data encryption method, data transmission method, related device and equipment
CN109525550B (en) Data message processing method, device and system
CN115529130B (en) Data processing method, terminal, server, system, device, medium and product
CN114595195A (en) File sharing method, device, system, server and readable storage medium
EP4283955A1 (en) Communication key configuration method and apparatus
CN114024692B (en) Signing method, device and system
CN114826772A (en) Data integrity verification system
CN114980107A (en) Data integrity verification method and device and storage medium
CN116781764A (en) Long-connection task execution method and device and related equipment

Legal Events

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