File sharing method and device, equipment, computer storage medium and program product
The file transfer server method addresses insecure file sharing by using unique identifiers and encryption, improving reliability and security in point-to-point and mesh file transfers.
Patent Information
- Application Number
- CN202411373712.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-09-29
AI Technical Summary
Current file transfer solutions lack secure and reliable methods for point-to-point and mesh file sharing between different business centers and banking institutions, particularly in scenarios involving large files and high transaction concurrency, leading to instability and security risks.
A file sharing method utilizing a file transfer server that generates unique file identifiers and employs session keys for encryption, verifying node numbers, and implementing file summary checks to ensure secure and reliable transmission.
Enhances the reliability and security of file sharing by ensuring accurate matching of node numbers and encryption, reducing system load, and preventing data tampering, thus stabilizing file transfer processes.
Smart Images

Figure CN119172378A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of big data technology, and in particular relates to a file sharing method, device, equipment, computer storage medium and program product. Background Art
[0002] At present, with the growth of massive data on the Internet and the increasing demand for the use of data resources in a wide range of application scenarios, data sharing has become a development trend of the Internet. In traditional file transfer solutions, for point-to-point and mesh file sharing between different business centers and different banking institutions, it is often impossible to provide secure and reliable file transmission and sharing.
[0003] Based on this, the industry is still in urgent need of a new file sharing solution to achieve accurate and effective file data sharing among different organizations, thereby improving the stability and security of data transmission. Summary of the invention
[0004] The embodiments of the present application provide a file sharing method, apparatus, device, computer storage medium and program product, which can realize file sharing between different organizations in a more targeted and accurate manner, thereby effectively improving the reliability and security of file sharing between the entire organizations.
[0005] In a first aspect, an embodiment of the present application provides a file sharing method, which is applied to a file transfer server. The file sharing method includes:
[0006] Receiving a file upload request for a target file from a file upload mechanism, wherein the file upload request includes a first sender node number of the file upload mechanism and a first receiver node number of a designated target file;
[0007] Sending the unique file identifier of the target file to the file uploading agency;
[0008] When the file downloading agency obtains the unique identifier of the file sent by the file uploading agency, receiving a file downloading request for the target file from the file downloading agency, the file downloading request including the unique identifier of the file, the second sender node number and the second receiver node number of the file downloading agency;
[0009] When it is verified that the first receiver node number matches the second sender node number, and the first sender node number matches the second receiver node number, the target file is obtained based on the file unique identifier query, and the target file is returned to the file download mechanism.
[0010] In some possible implementations, the file upload request includes a first encrypted file and a first business type of the target file; before sending the file unique identifier of the target file to the file upload mechanism, the file sharing method further includes:
[0011] Decrypting the first encrypted file based on the first session key corresponding to the first service type to obtain a target file;
[0012] The file download request also includes a second service type specified by the file download agency; obtaining a target file based on the file unique identifier query, and returning the target file to the file download agency, including:
[0013] The target file is obtained based on the file unique identifier query, and the target file is encrypted based on the second session key corresponding to the second business type to obtain a second encrypted file, and the second encrypted file is returned to the file download mechanism.
[0014] In some possible implementations, sending the unique file identifier of the target file to the file uploading mechanism includes:
[0015] Encrypting the file unique identifier based on the first session key to obtain a first encrypted file unique identifier;
[0016] The first encrypted file unique identifier is transmitted to the file upload mechanism, and the file upload mechanism is used to decrypt the first encrypted file identifier based on the first session key to obtain the file unique identifier;
[0017] The file download request includes a second encrypted file identifier, which is obtained by encrypting the file unique identifier by the file download mechanism based on the second session key; before obtaining the target file based on the file unique identifier, the file sharing method further includes:
[0018] The second encrypted file identifier is decrypted based on the second session key to obtain a unique file identifier.
[0019] In some possible implementations, after receiving a file upload request for a target file from a file upload mechanism and before decrypting the first encrypted file to obtain the target file, the file sharing method further includes:
[0020] Verify the number of file uploads by the file uploading organization within a preset time period;
[0021] Decrypting the first encrypted file to obtain the target file includes:
[0022] When the number of file uploads does not exceed a first preset threshold, the first encrypted file is decrypted to obtain a target file.
[0023] In some possible implementations, after obtaining the target file based on the file unique identifier query and before returning the second encrypted file to the file downloading mechanism, the file sharing method further includes:
[0024] Verify the number of times the file downloading organization downloads the target file;
[0025] Encrypting the target file based on the second session key corresponding to the second service type to obtain a second encrypted file, and returning the second encrypted file to the file download mechanism, including:
[0026] When the number of file downloads does not exceed a second preset threshold, the target file is encrypted based on the second session key to obtain a second encrypted file, and the second encrypted file is returned to the file download mechanism.
[0027] In some possible implementations, the file upload request also includes a first request timestamp; and decrypting the first encrypted file to obtain the target file includes:
[0028] When the time difference between the first request timestamp and the current time of the file transfer server is less than the first preset time difference, decrypting the first encrypted file to obtain the target file;
[0029] The file download request also includes a second request timestamp; encrypting the target file based on the second session key corresponding to the second service type to obtain a second encrypted file includes:
[0030] When it is verified that the time difference between the second request timestamp and the current time of the file transfer server is less than the second preset time difference, the target file is encrypted based on the second session key to obtain a second encrypted file.
[0031] In some possible implementations, before decrypting the first encrypted file to obtain the target file based on the first session key corresponding to the first service type, the file sharing method further includes:
[0032] Performing digital sign-in based on the first sender node number to obtain a first correspondence between a business type corresponding to the file uploading organization and a session key;
[0033] Based on the first corresponding relationship, determining a first session key corresponding to the first service type;
[0034] Before encrypting the target file based on the second session key corresponding to the second service type to obtain the second encrypted file, the file sharing method further includes:
[0035] Performing digital sign-in based on the second sender node number to obtain a second correspondence between the service type corresponding to the file downloading organization and the session key;
[0036] Based on the second corresponding relationship, a second session key corresponding to the second service type is determined.
[0037] In some possible implementations, the file upload mechanism is further used to generate corresponding first file summary information based on the target file, and transmit the first file summary to the file download mechanism;
[0038] The file download request also includes first file summary information; after obtaining the target file based on the file unique identifier query, the file sharing method also includes:
[0039] Generate second file summary information corresponding to the current moment based on the target file, and compare the first file summary information with the second file summary information;
[0040] Return the target file to the file download mechanism, including:
[0041] When the first file summary information and the second file summary information are consistent, the target file is returned to the file download mechanism.
[0042] In some possible implementations, the file upload mechanism is used to: after receiving the file unique identifier, push the file unique identifier to the file download mechanism;
[0043] Alternatively, in response to a query request from the file downloading agency, a request response corresponding to the query request is returned to the file downloading agency, and the request response carries a unique identifier of the file.
[0044] In some possible implementations, the unique file identifier is: a relative path where the target file is stored on the file transfer server, and / or a file index of a storage location of the target file on the file transfer server.
[0045] Based on the same inventive concept, in a second aspect, applied to a file transfer server, an embodiment of the present application provides a file sharing device, the file sharing device comprising:
[0046] A first receiving module, used for receiving a file upload request for a target file from a file upload mechanism, wherein the file upload request includes a first sender node number of the file upload mechanism and a first receiver node number of a specified target file;
[0047] A first processing module, used for sending a unique file identifier of a target file to a file uploading mechanism;
[0048] A second receiving module is used to receive a file download request for a target file from the file downloading mechanism when the file downloading mechanism obtains the file unique identifier sent by the file uploading mechanism, the file downloading request including the file unique identifier, the second sender node number and the second receiver node number of the file downloading mechanism;
[0049] The second processing module is used to obtain the target file based on the file unique identifier query when verifying that the first receiver node number matches the second sender node number and the first sender node number matches the second receiver node number, and return the target file to the file download mechanism.
[0050] In a third aspect, an embodiment of the present application provides a file sharing device, the file sharing device comprising:
[0051] a processor and a memory storing computer program instructions;
[0052] When the processor executes the computer program instructions, the file sharing method provided in any one of the above-mentioned embodiments of the present application is implemented.
[0053] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which computer readable storage medium is stored computer program instructions, and when the computer program instructions are executed by a processor, a file sharing method as provided in any one of the above-mentioned embodiments of the present application is implemented.
[0054] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes a file sharing method provided in any one of the above-mentioned embodiments of the present application.
[0055] The present application provides a file sharing method, device, equipment, computer storage medium and program product. A file transfer server is provided as an intermediary in a file upload mechanism and a file download mechanism. The file transfer server receives a file upload request from the file upload mechanism, which includes the first sender node number of the file upload mechanism and the first receiver node number of the specified target file. The file transfer server then generates a file unique identifier of the target file and sends it to the file upload mechanism. When the file download mechanism obtains the file unique identifier sent by the file upload mechanism, it receives the file download request for the target file from the file download mechanism. When it is verified that the first receiver node number matches the second sender node number, and the first sender node number matches the second receiver node number, the file transfer server obtains the target file based on the file unique identifier query and returns it to the file download mechanism.
[0056] It can be seen from the above description that a file sharing method, device, equipment, computer storage medium and program product of an embodiment of the present application, when uploading and downloading, the requesting party carries the respective sender node number and the receiver node number, so that the file transfer server can perform corresponding records and comparisons, which is conducive to the realization of meshed secure transmission sharing of file sharing. Therefore, by adopting the file sharing method, device, equipment, computer storage medium and program product provided by the embodiment of the present application, stable file sharing between different institutions can be realized more specifically and accurately, thereby effectively improving the reliability and security of file sharing between the entire institutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0058] Figure 1 It is a schematic diagram of the architecture of a traditional file sharing solution provided in an embodiment of the present application;
[0059] Figure 2 It is a flowchart of a file sharing method provided by an embodiment of the present application;
[0060] Figure 3 This is one of the scenario flow diagrams of the file sharing method provided in one embodiment of the present application;
[0061] Figure 4 This is the second scenario flow diagram of the file sharing method provided in one embodiment of the present application;
[0062] Figure 5 This is a logical flow chart of file upload of a file transfer server provided by an embodiment of the present application;
[0063] Figure 6 This is a logical flow chart of file downloading of a file transfer server provided by an embodiment of the present application;
[0064] Figure 7 This is a schematic diagram of the file management function of an external file management system provided by an embodiment of the present application;
[0065] Figure 8 It is a structural diagram of a file sharing device provided by an embodiment of the present application;
[0066] Fig. 9 It is a structural diagram of a file sharing device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0067] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0068] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" 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 includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0069] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations.
[0070] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0071] Currently, housing provident fund business is a key area of concern for housing and urban and rural construction. When implementing housing provident fund business, it often involves point-to-point or network file data sharing between different institutions. Figure 1 As shown, Figure 1 This is a schematic diagram of the architecture of the traditional file sharing solution provided by an embodiment of the present application. The file uploading institution A (such as a business processing center for provident funds, etc.) may share image file information to the file downloading institution D (such as a bank institution), or the file uploading institution B may share image file information to the file downloading institution D and other file sharing requests. However, the current business processing efficiency of process linkage and file data sharing between local housing provident fund management centers and bank institutions is relatively low. In order to solve the information barriers between local provident fund centers and various bank institutions and realize efficient linkage and data sharing of combined loans, the existing solution is to build a public-bank linkage combined loan system based on the current settlement platform.
[0072] Information sharing in the combined loan system can be done by direct transmission of interface messages, but the amount of data that can be carried by the request message is relatively small; file data can also be shared by direct push or query of files. In the case of large shared file memory, the connection takes a long time when the file is directly transmitted in this way, and transactions are prone to problems. However, in actual business scenarios, in addition to some small amount of structured data, the combined loan information that needs to be shared often also contains some large video or image file data such as authorization and contracts, which are not suitable for online transmission in transactions.
[0073] Specifically, the current traditional file transfer methods usually involve the use of communication protocols such as FTP (File Transfer Protocol) or HTTP (Hypertext Transfer Protocol) to achieve file transmission in the network. Although these methods have been widely used, they still have some limitations:
[0074] HTTP protocol is mostly used in WEB (World Wide Web) system, FTP protocol involves dynamic ports and may be more suitable for file transfer in LAN, both of which tend to use long links. However, in the trading platform system, trading ports are often opened on demand and cannot support dynamic ports. Short connections are often used to ensure system security. Moreover, file transfer in the trading platform system is often related to business and is often handled as a transaction attachment. The above scheme is not very applicable. The above scheme only supports file transfer from client to server, which is difficult to support the scenario where the trading platform is used as a trading channel between different institutional systems (point-to-point mesh transmission scenario), and the security and reliability of long-term online transmission of large files in the trading scenario cannot be guaranteed. In the case of high transaction concurrency, online file transfer will cause a high system load, and coupled with the trading system, high concurrency is very likely to cause failures.
[0075] In view of the above, in order to solve the problems of the prior art, the embodiments of the present application provide a file sharing method, device, equipment, computer storage medium and program product. It should be noted that the embodiments provided in the present application are not intended to limit the scope of the present application.
[0076] The following first introduces the file sharing method provided in the embodiment of the present application.
[0077] Figure 2 FIG. 1 is a flow chart of a file sharing method provided by an embodiment of the present application. The file sharing method is applied to a file transfer server. Figure 1 As shown, the file sharing method includes the following steps:
[0078] S210, receiving a file upload request for a target file from a file upload mechanism, wherein the file upload request includes a first sender node number of the file upload mechanism and a first receiver node number of a designated target file;
[0079] S220, sending the unique file identifier of the target file to the file uploading agency;
[0080] S230, when the file downloading mechanism obtains the unique identifier of the file sent by the file uploading mechanism, receiving a file downloading request for the target file from the file downloading mechanism, the file downloading request including the unique identifier of the file, the second sender node number and the second receiver node number of the file downloading mechanism;
[0081] S240, when it is verified that the first receiving party node number matches the second sending party node number, and the first sending party node number matches the second receiving party node number, the target file is obtained based on the file unique identifier query, and the target file is returned to the file download mechanism.
[0082] The present application provides a file sharing method, in which a file transfer server is provided as an intermediary in a file upload mechanism and a file download mechanism, and the file transfer server receives a file upload request from the file upload mechanism, the file upload request includes a first sender node number of the file upload mechanism and a first receiver node number of a specified target file, and then generates a file unique identifier of the target file by the file transfer server and sends it to the file upload mechanism. When the file download mechanism obtains the file unique identifier sent by the file upload mechanism, it receives the file download request for the target file from the file download mechanism, and when it is verified that the first receiver node number matches the second sender node number, and the first sender node number matches the second receiver node number, the file transfer server obtains the target file based on the file unique identifier query, and then returns it to the file download mechanism.
[0083] It can be seen from the above description that a file sharing method of an embodiment of the present application, when uploading and downloading, the requesting party carries the respective sender node number and the receiver node number, so that the file transfer server can perform corresponding records and comparisons, thereby facilitating the realization of meshed secure transmission sharing of file sharing. Therefore, by adopting the file sharing method provided by the embodiment of the present application, file sharing between different organizations can be realized more specifically and accurately, thereby effectively improving the reliability and stability of file sharing between the entire organization.
[0084] The specific implementation of the above steps 210 to 240 is described in detail below.
[0085] In S210, during specific implementation, a file upload request for a target file from a file upload mechanism is received, wherein the file upload request includes a first sender node number of the file upload mechanism and a first receiver node number of a designated target file.
[0086] In this embodiment, a file upload request for a target file from a file upload mechanism is received by using a communication protocol such as FTP (File Transfer Protocol) or HTTP (Hypertext Transfer Protocol).
[0087] The above-mentioned target files are, for example, picture image files, video image files or other text files, etc., which are not strictly limited in this embodiment.
[0088] The file upload request includes the first sender node number of the file upload mechanism and the first receiver node number of the specified target file. The above file upload request can directly include the plain text file or encrypted file of the target file, or the storage address of the target file, etc., which is not strictly limited here.
[0089] The above-mentioned first sender node number can be the organization code, organization label, etc. of the above-mentioned file upload organization, and the above-mentioned first receiver node number can be the organization code or organization number of at least one file download organization designated by the file upload organization that is allowed to share the target file, etc. This application does not make strict restrictions here.
[0090] In S220, during specific implementation, the unique file identifier of the target file is sent to a file uploading agency.
[0091] For example, if the file upload request includes a plain text file of the target file, the file transfer server can directly obtain the target file through the file upload request. In this case, the file transfer server stores the target file, generates a unique file identifier for the target file, and then returns the unique file identifier for the target file to the file upload mechanism.
[0092] In order to fully ensure that the target file can be accurately queried based on the above-mentioned file unique identifier in the future, the above-mentioned file unique identifier can specifically be: the relative path where the target file is stored on the file transfer server, and / or the file index of the storage location of the target file on the file transfer server.
[0093] It should be added that the encrypted file of the target file is included in the above file upload request, and the encrypted file can also be decrypted according to the agreed encryption and decryption method to obtain the plain text target file. In this way, the file transfer server stores the target file, generates a file unique identifier for the target file, and then returns the file unique identifier of the target file to the file upload mechanism, which is not strictly limited in this embodiment.
[0094] In S230, during the specific implementation, when the file downloading agency obtains the unique identifier of the file sent by the file uploading agency, it receives the file downloading agency's file downloading request for the target file, and the file downloading request includes the unique identifier of the file, the second sender node number of the file downloading agency, and the second receiver node number.
[0095] The above-mentioned second sender node number can be the organization code, organization number, etc. of the above-mentioned file download organization, and the above-mentioned second receiver node number can be the organization code or organization number, etc. of the above-mentioned file upload organization. This application does not make strict restrictions here.
[0096] According to some embodiments of the present application, optionally, in combination with the actual business transaction handling requirements between different structures, the file upload mechanism can be used to: after receiving the file unique identifier, push the file unique identifier to the file download mechanism;
[0097] Alternatively, in response to a query request from the file downloading agency, a request response corresponding to the query request is returned to the file downloading agency, and the request response carries a unique identifier of the file.
[0098] That is to say, after receiving the unique identifier of the file sent by the file transfer server, the file upload agency can push the unique identifier of the file to the file download agency in the actual business transaction scenario. Alternatively, when the file download agency has a corresponding information query request, the unique identifier of the file can be packaged together with the information required for the response and then sent. In this way, the unique identifier of the file can be transmitted to the file download agency only through daily transactions. After receiving the unique identifier of the file, the file download agency determines whether it needs to send a download request to the file transfer server based on the actual file demand.
[0099] In this embodiment, business dealings between institutions and high-concurrency transaction scenarios are taken into consideration, and the business transaction scenario with high processing time requirements and inability to support online transmission of large files is selected to transmit the unique file identifier. The transmission of the unique file identifier is isolated and decoupled from the target file transmission to avoid mutual influence, and the information load of the transaction system and the file transfer server can be effectively reduced.
[0100] In S240, in the specific implementation, when verifying that the first receiving party node number matches the second sending party node number, and the first sending party node number matches the second receiving party node number, the target file is obtained based on the file unique identifier query, and the target file is returned to the file download agency.
[0101] In this embodiment, the above-mentioned file download request is parsed to obtain the second sender node number and the second receiver node number of the file download mechanism, and then the first receiver node number is compared to see whether it matches the second sender node number, and the first sender node number and the second receiver node number are compared to see whether they match.
[0102] When the first receiving party node number matches the second sending party node number and the first sending party node number matches the second receiving party node number, it is determined that the file downloading mechanism has the download qualification for the target file. In this way, according to the sending party node number and the receiving party node number carried by the requester during uploading and downloading, the file transfer server performs corresponding records and comparisons, thereby realizing the meshed secure transmission sharing of file sharing.
[0103] When the check node number matches, the target file is obtained based on the file unique identifier in the file download request, and then the target file is returned to the file download mechanism.
[0104] It should be understood that the plain text file of the target file can be directly fed back to the file downloading mechanism. Alternatively, in order to effectively ensure the security of the file, the file transfer server can also encrypt the target file and feed it back to the file downloading mechanism, which is not strictly limited here.
[0105] According to some embodiments of the present application, optionally, in order to fully ensure the security of file data, the above-mentioned file upload request includes the first encrypted file and the first business type of the target file; before sending the file unique identifier of the target file to the file upload mechanism, the file sharing method further includes:
[0106] Decrypting the first encrypted file to obtain a target file based on a first session key corresponding to the first service type;
[0107] The file download request also includes a second service type specified by the file download agency; obtaining a target file based on the file unique identifier query, and returning the target file to the file download agency, including:
[0108] The target file is obtained based on the file unique identifier query, and the target file is encrypted based on the second session key corresponding to the second business type to obtain a second encrypted file, and the second encrypted file is returned to the file download mechanism.
[0109] The file upload mechanism can pre-agreed with the file upload structure on session keys corresponding to different business types. Before uploading the file, the file upload mechanism first encrypts the target file according to the first session key corresponding to the first business type, obtains the first encrypted file and then transmits it, thereby ensuring the security of file transmission and effectively reducing the possibility of malicious interception and tampering of the transmitted data to cause information leakage and security risks. Among them, the encryption method is, for example, DESede (3DES) symmetric key.
[0110] In a specific implementation, the file transfer server parses the file upload request to obtain the first business type carried in the request, decrypts the first encrypted file based on the first session key corresponding to the first business type to obtain the target file, and stores the decrypted target file.
[0111] After storing the target file, the file transfer server generates a unique file identifier for the target file, and then returns the unique file identifier for the target file to the file upload mechanism.
[0112] Accordingly, after the file transfer server receives the file download request from the file download agency, if the target file is obtained based on the file unique identifier query, in this case, the target file can be encrypted based on the second session key corresponding to the second service type to obtain a second encrypted file, and the second encrypted file is returned to the file download agency to fully ensure that the transmitted data is not easy to be tampered with and the data security. After receiving the second encrypted file, the file download agency can decrypt it according to the second session key to obtain the plaintext data of the shared target file.
[0113] The encryption method is, for example, DESede (3DES) symmetric key. The second session key is a session key corresponding to the second service type pre-agreed by the file downloading agency.
[0114] In the embodiment of the present application, the files transmitted during the communication process between the file transfer server and the file upload mechanism or the file download mechanism are all encrypted files. The file transfer server decrypts the files using the first session key corresponding to the business type carried in the request of the file upload mechanism. When downloading files, in order to fully ensure the secure download and transmission of shared files, the files are also encrypted using the second session key corresponding to the business type carried in the request of the file download mechanism before returning them to the file download mechanism.
[0115] In this way, data is encrypted and protected during the file upload and download process, and the file transfer server can obtain the corresponding session key based on the business type carried in the request to decrypt the file after upload or encrypt the file before download, thereby fully ensuring the security of the file data.
[0116] According to some embodiments of the present application, optionally, in order to further ensure reliable transmission of data, the sending of the unique file identifier of the target file to the file upload mechanism may include:
[0117] Encrypting the file unique identifier based on the first session key to obtain a first encrypted file unique identifier;
[0118] The first encrypted file unique identifier is transmitted to the file upload mechanism, and the file upload mechanism is used to decrypt the first encrypted file identifier based on the first session key to obtain the file unique identifier;
[0119] The file download request may include a second encrypted file identifier, which is obtained by encrypting the file unique identifier by the file download mechanism based on the second session key; before obtaining the target file based on the file unique identifier, the file sharing method may further include:
[0120] The second encrypted file identifier is decrypted based on the second session key to obtain a unique file identifier.
[0121] In this embodiment, after the file transfer server generates a file unique identifier for the target file, it will encrypt the file unique identifier according to the first session key specified by the file upload agency and then transmit it, thereby fully ensuring the reliability of the file unique identifier returned to the file upload agency. After receiving the above-mentioned first encrypted file identifier, the file upload agency decrypts it according to the first session key to obtain the plaintext data of the file unique identifier.
[0122] After the file upload agency transmits the file unique identifier to the file download agency, in order to ensure the reliability of the file unique identifier received by the file transfer server, the file unique identifier will be encrypted according to the second session key before sending the file download request. After receiving the encrypted second encrypted file identifier, the file transfer server decrypts it according to the second session key corresponding to the second business type in the file download request, thereby obtaining the plaintext data of the file unique identifier for subsequent target file query. In this way, the data security and reliability of the file unique identifier of the target file during the data transmission process are fully guaranteed.
[0123] According to some embodiments of the present application, optionally, in order to fully ensure accurate and effective sharing of the target file, the above-mentioned file uploading mechanism is also used to generate corresponding first file summary information based on the target file, and transmit the first file summary to the file downloading mechanism;
[0124] The file download request may further include first file summary information; after obtaining the target file based on the file unique identifier query, the file sharing method may further include:
[0125] Generate second file summary information corresponding to the current moment based on the target file, and compare the first file summary information with the second file summary information;
[0126] The above-mentioned returning the target file to the file downloading mechanism may include:
[0127] When the first file summary information and the second file summary information are consistent, the target file is returned to the file download mechanism.
[0128] In this embodiment, the file upload mechanism can generate the first summary information of the target file in advance, and the summary generation method is, for example, the encrypted hash function MD5 (Message Digest Algorithm 5). In this way, after the file upload mechanism receives the file unique identifier sent by the file transfer server, the file unique identifier and the first file summary information can be sent to the file download mechanism.
[0129] In this way, when sending a file download request, the file download agency can package the file unique identifier and the first file summary information into the file download request to send to the file transfer server. After the file transfer server finds the target file according to the file unique identifier, it can generate the second file summary information of the found target file in the same file summary generation method.
[0130] Next, the second file summary information is compared with the first file summary information. If the verification is consistent, it means that the target file is safe and reliable and has not been tampered with. In this case, the target file is returned to the file download agency.
[0131] It should be added that in some embodiments, the first file summary information of the target file can also be uploaded when the file upload mechanism sends a file upload request. In this way, the first file summary information can be used to check whether the uploaded file of the file upload mechanism is duplicated.
[0132] In some more specific embodiments, in combination with the above embodiment of encrypting data to ensure data security, the above encrypting the target file based on the second session key corresponding to the second service type to obtain the second encrypted file may include:
[0133] When the first file digest information and the second file digest information are consistent, the target file is encrypted based on the second session key to obtain a second encrypted file.
[0134] In this way, by verifying that the first file digest information and the second file digest information are consistent before encryption, unnecessary encryption operations on the target file by the file transfer server can be effectively avoided, thereby effectively saving server resources.
[0135] According to some embodiments of the present application, optionally, in order to fully ensure the stable performance of the file transfer server, after receiving the file upload request for the target file from the file upload mechanism, and before decrypting the first encrypted file to obtain the target file, the file sharing method may further include:
[0136] Verify the number of file uploads by the file uploading organization within a preset time period;
[0137] Decrypting the first encrypted file to obtain the target file may include:
[0138] When the number of file uploads does not exceed a first preset threshold, the first encrypted file is decrypted to obtain a target file.
[0139] In this embodiment, by verifying the recent number of file uploads by the file upload mechanism, it is possible to avoid frequent file uploads due to malfunctions in the file upload mechanism system, thereby avoiding the problem of excessive uploads leading to the crash of the file transfer server system. This is also beneficial to avoid unnecessary occupation of file transfer server resources.
[0140] According to some embodiments of the present application, optionally, based on similar reasons to the aforementioned embodiments, in order to ensure the stability of the data transmission load of the file transfer server, after obtaining the target file based on the file unique identifier query and before returning the second encrypted file to the file download mechanism, the file sharing method may further include:
[0141] Verify the number of times the file downloading organization downloads the target file;
[0142] Encrypting the target file based on the second session key corresponding to the second service type to obtain a second encrypted file, and returning the second encrypted file to the file download mechanism may include:
[0143] When the number of file downloads does not exceed a second preset threshold, the target file is encrypted based on the second session key to obtain a second encrypted file, and the second encrypted file is returned to the file download mechanism.
[0144] In this embodiment, by verifying the number of times the file download mechanism downloads the target file, it is avoided that the file download mechanism downloads the same target file at a high frequency, which leads to excessive occupation of the relevant data processing resources of the file transfer server, which is beneficial to reducing the overload situation of the file transfer server.
[0145] According to some embodiments of the present application, optionally, in order to fully verify the validity of the request and to fully avoid unnecessary resource calls caused by the file transfer server processing an outdated request, the file upload request may further include a first request timestamp; decrypting the first encrypted file to obtain the target file may include:
[0146] When the time difference between the first request timestamp and the current time of the file transfer server is less than the first preset time difference, decrypting the first encrypted file to obtain the target file;
[0147] The file download request may further include a second request timestamp; encrypting the target file based on the second session key corresponding to the second service type to obtain a second encrypted file may include:
[0148] When it is verified that the time difference between the second request timestamp and the current time of the file transfer server is less than the second preset time difference, the target file is encrypted based on the second session key to obtain a second encrypted file.
[0149] The first preset time difference is, for example, 5 seconds, and the second preset time difference is, for example, 10 seconds, etc., which are not strictly limited in this embodiment. The first request timestamp can be the time point when the file upload mechanism sends the file upload request, and the second request timestamp can be the time point when the file download mechanism sends the file download request. In this embodiment, by verifying the time difference of the request reception, the timeliness of the current processing request is fully guaranteed.
[0150] According to some embodiments of the present application, optionally, in order to more effectively fully ensure the security of the file during the file transmission process based on the session key, before decrypting the first encrypted file to obtain the target file based on the first session key corresponding to the first service type, the file sharing method may further include:
[0151] Performing digital sign-in based on the first sender node number to obtain a first correspondence between a business type corresponding to the file uploading organization and a session key;
[0152] Based on the first corresponding relationship, determining a first session key corresponding to the first service type;
[0153] Before encrypting the target file based on the second session key corresponding to the second service type to obtain the second encrypted file, the file sharing method may further include:
[0154] Performing digital sign-in based on the second sender node number to obtain a second correspondence between the service type corresponding to the file downloading organization and the session key;
[0155] Based on the second corresponding relationship, a second session key corresponding to the second service type is determined.
[0156] In specific implementation, each organization sets different session keys for different business types, and the file transfer server can pre-agree with each organization on the session keys corresponding to the business types. In this way, after the file uploading organization sends a file upload request, the file transfer server can query and obtain the first correspondence between the business type and the session key corresponding to the file uploading organization according to the first sender node number of the file uploading organization in the file upload request, so as to determine and obtain the first session key corresponding to the first business type based on the first correspondence.
[0157] Correspondingly, after the file download agency sends a file download request, the file transfer server can query and obtain the second correspondence between the business type and the session key corresponding to the file upload agency based on the second sender node number of the file download agency carried in the file download request, so that the second session key corresponding to the second business type can be determined based on the second correspondence.
[0158] In this embodiment, the correspondence between the business types and session keys set by different organizations is different. This can effectively ensure the uniqueness of the encryption and decryption session keys between each organization and the file transfer server, thereby ensuring the high isolation and shared security of the file data of each organization in the file transfer server.
[0159] In order to facilitate understanding of the file sharing method provided by the above embodiment, the above method is described below using a specific scenario embodiment. Figure 3 This is one of the flow charts of a scenario implementation of a file sharing method provided in an embodiment of the present application. Figure 4 The present invention is a second flow chart of a scenario implementation of a file sharing method provided in an embodiment of the present application.
[0160] The application scenario of this scenario embodiment can be: the file uploading institution can be a provident fund center institution, and the file downloading institution can be a commercial bank institution. In the business transaction scenario, the provident fund center and the commercial bank can forward transaction information through the combined loan system, and the combined loan system is isolated from the file transfer server newly added in this application to achieve decoupling of business transactions and file sharing transmission.
[0161] In view of the current situation that point-to-point and mesh file sharing between different provident fund centers and different commercial banks cannot provide secure and reliable file transfer and sharing, this scenario implementation example builds a file transfer server (file server) as a file transfer mesh transmission transit station to solve the problem of secure, stable and efficient file transfer and sharing of such mesh file sharing between provident fund centers and commercial banks.
[0162] For the combined loan process, when the combined loan information is shared, at the provident fund-commercial combined loan application stage, the loan can be accepted by either party. After one party accepts the application, the combined loan application information will be shared with the other party. There are two ways to share, one is to actively push the application information, and the other is to passively query the application information.
[0163] 1. Please see Figure 3 Example of push mode in :
[0164] The provident fund center zips the target files such as the image information files to be shared, generates the first file summary information, and uses the first session key corresponding to the first business type to encrypt the target file, and then calls the upload interface of the file server to send a request. After receiving the upload request, the file transfer server performs corresponding summary verification and file decryption, stores the decrypted target file, generates a unique identifier for the target file, encrypts the file unique identifier according to the first session key, and finally uploads the encrypted file unique identifier to the file server.
[0165] After that, the Housing Provident Fund Center actively pushes the loan application materials to the commercial bank through the combined loan system, including the unique file identifier of the shared target file and the first file summary information. The combined loan system verifies the legality of the request, records the request flow, and forwards the information according to the normal business transaction processing process.
[0166] The commercial bank obtains the file unique identifier and the first file summary information of the provident fund transmission, and then sends a file download request including the encrypted file unique identifier and the first file summary information to the file transfer server to download the shared image file information. After receiving the file download request, the file transfer server decrypts the file unique identifier and other information according to the corresponding bank node session key (second session key), and verifies the request timestamp and the number of downloads. After the verification is passed, the target file is obtained through the file unique identifier and the second file summary information of the obtained target file is generated, and the first file summary information and the second file summary information are compared. If the summary information verification passes and the file exists, the encrypted file stream of the target file is returned to the commercial bank. At this point, the shared image information interaction actively pushed by the provident fund center is completed.
[0167] 2. Please see Figure 4 Example of pull mode in :
[0168] After the provident fund center zips the target files such as the image information files to be shared, it generates the first file summary information, and uses the first session key corresponding to the first business type to encrypt the target file, and then calls the upload interface of the file server to send a request. After receiving the upload request, the file transfer server performs corresponding summary verification and file decryption, stores the decrypted target file, generates a unique identifier for the target file, encrypts the file unique identifier according to the first session key, and finally uploads the encrypted file unique identifier to the file server.
[0169] Afterwards, the commercial bank proactively inquires about the loan application materials from the Housing Provident Fund Center through the combined loan system. The query results returned by the Housing Provident Fund Center include the unique file identifier of the shared image file and the first file summary information. During this process, the combined loan system verifies the legitimacy of the request, records the request flow, and forwards information in accordance with the normal business transaction processing process.
[0170] The commercial bank obtains the file unique identifier and the first file summary information transmitted by the provident fund, and then sends a file download request including the encrypted file unique identifier and the first file summary information to the file transfer server to download the shared image file information. After receiving the file download request, the file transfer server decrypts the file unique identifier and other information according to the corresponding bank node session key (second session key), and verifies the request timestamp and the number of downloads. After the verification is passed, the target file is obtained through the file unique identifier and the second file summary information of the obtained target file is generated, and the first file summary information and the second file summary information are compared. If the summary information verification passes and the file exists, the encrypted file stream of the target file is returned to the commercial bank. At this point, the shared image information interaction actively queried by the commercial bank is completed.
[0171] The above push mode and pull mode combined loan image file sharing methods all achieve secure file sharing through the established file transmission mesh transmission transfer station (file transmission server). This embodiment can ensure the security of mesh file sharing transmission between the provident fund center and multiple commercial banks, and between commercial banks and multiple provident fund centers.
[0172] In addition, it is necessary to add that when the provident fund center requests to upload a shared file or a commercial bank requests to download a shared file, the sender node number and the receiver node number must be carried. When the file server processes the upload and download, it will record the file transfer information. The receiver node number specified during the upload is the institution that can download the file during the download. For example, in the push mode and pull mode, when the provident fund center uploads a file, the provident fund center needs to share the image file with which commercial bank, and the corresponding receiver node number during the file upload should be the node number of the corresponding commercial bank. When the commercial bank downloads the file, it will also carry the sender node number. At this time, the file server obtains the shared image file based on the node number information and the file identifier, and finally completes the file download. In this way, according to the sender node number and the receiver node number carried by the requester during the upload and download, the file transfer server performs corresponding records and comparisons, thereby realizing the mesh security transmission sharing of file sharing.
[0173] To better understand the working logic of the file transfer server in the embodiment of the present application after receiving a file upload request, please refer to Figure 5 , Figure 5This is a logical flow chart of file upload of a file transfer server provided in one embodiment of the present application. Figure 5 The complete file upload processing logic flow of the file transfer server shown in FIG. 5 includes steps 510 to 560:
[0174] S510, receiving a file upload request from a file upload agency;
[0175] S520, acquiring a first signed-in session key according to the first sender node number and the service type;
[0176] S530, verifying the number of file uploads by the file upload mechanism;
[0177] S540, verifying the time difference between the first request timestamp and the current time of the file transfer server;
[0178] S550, decrypting the first encrypted file using the first session key to obtain a target file;
[0179] S560, generating a file unique identifier of the target file and encrypting it based on the first session key, and returning the encrypted first encrypted file unique identifier to the file uploading mechanism.
[0180] It can be understood here that the specific implementation methods of the above steps 510 to 560 are all described in detail in the above embodiments. For the sake of brevity, the specific implementation of the above steps will not be repeated here.
[0181] It should be added that when uploading a file: the file uploading agency uses the HTTP POST method to transmit the file upload request to the address corresponding to the file transfer server. The file upload request carries the first encrypted file of the target file to be shared, the first business type, the first sender node number of the file uploading agency, and the first receiver node number of the specified target file.
[0182] The file transfer may also be implemented by using communication methods such as FTP, SFTP (Secure File Transfer Protocol) or SCP (Secure Copy Protocol).
[0183] Among them, the first business type: can be the HTTP request header parameter TxCode, for example, the business type is 10 when uploading the combined loan business data file. The first sender node number: can be, for example, the HTTP request header parameter SendNode. The above-mentioned first receiver node number: can be, for example, the HTTP request header parameter Receive Node. In some other embodiments, the file upload request can also include the sender serial number: that is, the HTTP request header parameter SendSeqNo.
[0184] Also, before uploading files, business files should be organized according to the business interface agreement, and the files should be compressed and encrypted (DESede (3DES) symmetric key encryption). The compressed file format is uniformly agreed to be zip, and the naming convention is uniformly in accordance with the business interface agreement. Finally, the compressed and encrypted files are uploaded. In actual scenarios, in order to fully ensure the security of file transfer, a single file uploader only uploads one file at a time. Unless there is a special business agreement, the uploaded file cannot be larger than 50M. Also, in order to ensure the availability of memory resources on the file transfer server, the retention period can be set on the file server after the shared file is uploaded. For example, set the file to be retained only for 7 days after upload to fully avoid long-term unreasonable occupation of memory resources.
[0185] After receiving the file upload request, the file transfer server will return the corresponding file upload result to the file upload mechanism. The file upload result can be in the form of a byte stream, and the returned result information is in character encoding. Whether the upload is successful or failed, the result information will be returned: "Upload result | error code | error information | file unique identifier (such as relative path)", and the returned file upload result can be encrypted by DESede (3DES) symmetric key.
[0186] "Upload result" is SUCCESS or FAIL. If the upload result is SUCCESS, the error code and error message are empty, and the file unique identifier is not empty; if the upload result is FAIL, the error code and error message are not empty, and the file unique identifier is empty. For example, the file upload result example for success is: "SUCCESS|||20140723 / 440106198595270330.DAT". The file upload result example for failure is: "FAIL|0001|File upload error|".
[0187] The above-mentioned unique file identifier may be a relative path stored in the file transfer server, or may be a file index indicating the file storage location, which is not strictly limited in this scenario embodiment.
[0188] Corresponding to the file upload processing logic, in order to better understand the working logic of the file transfer server in the embodiment of the present application after receiving the file download request, please refer to Figure 6 , Figure 6 This is a logical flow chart of file downloading of a file transfer server provided in one embodiment of the present application. Figure 6 The complete file download processing logic flow of the file transfer server shown in FIG. 6 includes steps 610 to 670:
[0189] S610, receiving a file download request from a file download agency;
[0190] S620, acquiring a signed-in second session key according to the second sender node number and the second service type in the file download request;
[0191] S630, using the second session key to decrypt the second encrypted file unique identifier in the file download request to obtain the file unique identifier;
[0192] S640, verifying the time difference between the second request timestamp and the current time of the file transfer server;
[0193] S650, searching for the target file according to the file unique identifier, and comparing the current second file summary information of the target file with the first file summary information in the file download request;
[0194] S660, verifying the number of times the file downloading mechanism downloads the target file;
[0195] S670, encrypt the target file using the second session key to obtain a second encrypted file, and return the second encrypted file to the file downloading mechanism.
[0196] It can be understood here that the specific implementation methods of the above steps 610 to 670 are all described in detail in the above embodiments. For the sake of brevity, the specific implementation of the above steps will not be repeated here.
[0197] It should be added that when downloading a file: the file downloading agency transmits the file downloading request to the address corresponding to the file transfer server using the HTTP POST method. The file downloading request carries the file unique identifier encrypted by the second session key, the first file summary information, the second service type, the second sender node number of the file downloading agency, and the second receiver node number.
[0198] The second service type may be a HTTP request header parameter TxCode. The second sender node number may be, for example, an HTTP request header parameter SendNode. The second receiver node number may be, for example, an HTTP request header parameter ReceiveNode. In some other embodiments, the file download request may also include a sender serial number, that is, an HTTP request header parameter Send SeqNo.
[0199] Also, before downloading files, business files should be organized according to the business interface agreement, and the files should be compressed and encrypted (DESede (3DES) symmetric key encryption). The compressed file format is uniformly agreed to be zip, and the naming convention is uniformly in accordance with the business interface agreement. Finally, the compressed and encrypted files are downloaded. In actual scenarios, in order to fully ensure the security of file transfer, a single file download agency only downloads one file at a time. Also, in order to ensure the availability of memory resources on the file transfer server, the retention period can be set on the file server after the shared file is downloaded. For example, set the file to be retained only for 7 days after downloading to fully avoid long-term unreasonable occupation of memory resources.
[0200] After receiving the file download request, the file transfer server will return the corresponding file download result to the file download agency. The file download result can be in the form of a byte stream, and the returned result information uses character encoding. If the shared target file exists and is read correctly, the encrypted file byte stream is directly returned; if an error occurs during the download, the relevant error code, error message and other download result information are returned to the file download agency. The returned download result information uses character encoding: UTF-8, and the download result information can also be encrypted using the DESede (3DES) symmetric key.
[0201] In addition, in order to fully realize the operation and maintenance management of the file transfer server, the file transfer server can also be maintained through an external system. Figure 7 , Figure 7 1 is a schematic diagram of the file management function of the external file management system provided by an embodiment of the present application. In this embodiment, the combined loan system involved in the above-mentioned scenario embodiment can be used to effectively manage the shared file function in the file transfer server.
[0202] The combined loan system can configure web-side functions for file transfer server management so that it can be used by file service administrators. It provides a friendly user interface and operation process, and users can easily select files, control transmission, and monitor transmission progress. The combined loan system provides web-side file transfer management functions, supports file transfer transmission records and file download detail inquiries. It is also configured with operation and maintenance functions such as resetting upload identification and resetting download times for file transfer servers.
[0203] In summary, the embodiments of the present application solve the need for file information sharing in the combined loan system, and solve the problem that the traditional file transfer solution cannot ensure the security of point-to-point and mesh transmission of files, which better controls and monitors the transmission of files. In the embodiments of the present application, the file transfer server performs corresponding records and comparisons according to the requester carrying the sender's node number and the receiver's node number during uploading and downloading, thereby realizing meshed secure transmission sharing of file sharing. In addition, the embodiments of the present application set up a file transfer server to avoid online transmission, isolate transactions from file transmission, and avoid mutual influence.
[0204] The embodiment of the present application verifies the sign-in information of the organization when uploading or downloading files. For file upload, the file will be encrypted with DESede (3DES) symmetric key using the session password of the uploading organization, and the DM5 summary of the file needs to be uploaded. The file transfer server will compare the uploaded file with the file summary; the file transfer server will compare the request timestamp when the file is uploaded; after the file is successfully downloaded, the encrypted (DESede (3DES) symmetric key encrypted) file byte stream will be obtained, thereby ensuring the security of the file data and fully guaranteeing the reliability and integrity of the data.
[0205] Based on the file sharing method provided in the above embodiment, out of the same inventive concept, the present application also provides a file sharing device corresponding to the above file sharing method. Figure 8 A detailed introduction to the file sharing device is given.
[0206] Figure 8 A schematic diagram of the structure of a file sharing device provided in an embodiment of the present application is shown, which is applied to a file transfer server. Figure 8 The file sharing device 800 shown includes:
[0207] The first receiving module 810 is used to receive a file upload request for a target file from a file upload mechanism, wherein the file upload request includes a first sender node number of the file upload mechanism and a first receiver node number of a specified target file;
[0208] The first processing module 820 is used to send the unique file identifier of the target file to the file uploading mechanism;
[0209] The second receiving module 830 is used to receive a file download request for a target file from the file downloading mechanism when the file downloading mechanism obtains the file unique identifier sent by the file uploading mechanism, the file downloading request including the file unique identifier, the second sender node number and the second receiver node number of the file downloading mechanism;
[0210] The second processing module 840 is used to obtain the target file based on the file unique identifier query when verifying that the first receiver node number matches the second sender node number and the first sender node number matches the second receiver node number, and return the target file to the file download mechanism.
[0211] A file sharing device provided in an embodiment of the present application is applied to a file transfer server. The device receives a file upload request from a file upload mechanism by setting a corresponding functional module. The file upload request includes the first sender node number of the file upload mechanism and the first receiver node number of the specified target file. The file transfer server then generates a file unique identifier for the target file and sends it to the file upload mechanism. When the file download mechanism obtains the file unique identifier sent by the file upload mechanism, it receives a file download request for the target file from the file download mechanism. When it is verified that the first receiver node number matches the second sender node number, and the first sender node number matches the second receiver node number, the file transfer server obtains the target file based on the file unique identifier query and returns it to the file download mechanism.
[0212] It can be seen from the above description that a file sharing device in an embodiment of the present application, when uploading and downloading, the requesting party carries the respective sender node number and the receiver node number, so that the file transfer server can perform corresponding records and comparisons, thereby facilitating the realization of meshed secure transmission sharing of file sharing. Therefore, by adopting the file sharing device provided in an embodiment of the present application, file sharing between different organizations can be realized more specifically and accurately, thereby effectively improving the reliability and security of file sharing between the entire organization.
[0213] According to some embodiments of the present application, optionally, in some possible implementations, the file upload request includes a first encrypted file and a first business type of the target file; before sending the file unique identifier of the target file to the file upload mechanism, the file sharing device method further includes:
[0214] A first decryption module may be used to decrypt the first encrypted file to obtain a target file based on a first session key corresponding to the first service type;
[0215] The file download request also includes a second service type specified by the file download agency; the above-mentioned query based on the file unique identifier to obtain the target file and return the target file to the file download agency includes:
[0216] The target file is obtained based on the file unique identifier query, and the target file is encrypted based on the second session key corresponding to the second business type to obtain a second encrypted file, and the second encrypted file is returned to the file download mechanism.
[0217] According to some embodiments of the present application, optionally, sending the unique file identifier of the target file to the file uploading mechanism may include:
[0218] Encrypting the file unique identifier based on the first session key to obtain a first encrypted file unique identifier;
[0219] The first encrypted file unique identifier is transmitted to the file upload mechanism, and the file upload mechanism is used to decrypt the first encrypted file identifier based on the first session key to obtain the file unique identifier;
[0220] The file download request may include a second encrypted file identifier, which is obtained by encrypting the file unique identifier based on the second session key by the file download mechanism; before obtaining the target file based on the file unique identifier, the file sharing device may further include:
[0221] The second decryption module can be used to decrypt the second encrypted file identifier based on the second session key to obtain a unique file identifier.
[0222] According to some embodiments of the present application, optionally, after receiving a file upload request for a target file from a file upload mechanism and before decrypting the first encrypted file to obtain the target file, the file sharing device may further include:
[0223] The first verification module can be used to verify the number of file uploads by the file upload mechanism within a preset time period;
[0224] The above decrypting the first encrypted file to obtain the target file may include:
[0225] When the number of file uploads does not exceed a first preset threshold, the first encrypted file is decrypted to obtain a target file.
[0226] According to some embodiments of the present application, optionally, after obtaining the target file based on the file unique identifier query and before returning the second encrypted file to the file download mechanism, the file sharing device may further include:
[0227] The second verification module can be used to verify the number of times the file downloading mechanism downloads the target file;
[0228] The above-mentioned encrypting the target file based on the second session key corresponding to the second service type to obtain the second encrypted file, and returning the second encrypted file to the file download mechanism may include:
[0229] When the number of file downloads does not exceed a second preset threshold, the target file is encrypted based on the second session key to obtain a second encrypted file, and the second encrypted file is returned to the file download mechanism.
[0230] According to some embodiments of the present application, optionally, the file upload request may further include a first request timestamp; and the decrypting the first encrypted file to obtain the target file may include:
[0231] When the time difference between the first request timestamp and the current time of the file transfer server is less than the first preset time difference, decrypting the first encrypted file to obtain the target file;
[0232] The file download request may further include a second request timestamp; the above-mentioned encrypting the target file based on the second session key corresponding to the second service type to obtain the second encrypted file may include:
[0233] When it is verified that the time difference between the second request timestamp and the current time of the file transfer server is less than the second preset time difference, the target file is encrypted based on the second session key to obtain a second encrypted file.
[0234] According to some embodiments of the present application, optionally, before decrypting the first encrypted file to obtain the target file based on the first session key corresponding to the first service type, the file sharing device may further include:
[0235] A first acquisition module may be used to perform digital sign-in based on the first sender node number to acquire a first correspondence between a business type corresponding to the file uploading organization and a session key;
[0236] A first determination module may be configured to determine a first session key corresponding to a first service type based on a first corresponding relationship;
[0237] Before encrypting the target file based on the second session key corresponding to the second service type to obtain the second encrypted file, the file sharing device may further include:
[0238] A second acquisition module may be used to perform digital sign-in based on the second sender node number to acquire a second correspondence between the service type corresponding to the file downloading agency and the session key;
[0239] The second determining module may be configured to determine a second session key corresponding to the second service type based on the second corresponding relationship.
[0240] According to some embodiments of the present application, optionally, the file upload mechanism is further used to generate corresponding first file summary information based on the target file, and transmit the first file summary to the file download mechanism;
[0241] The file download request may further include first file summary information; after obtaining the target file based on the file unique identifier query, the file sharing device may further include:
[0242] A first comparison module may be used to generate second file summary information corresponding to the current moment based on the target file, and compare the first file summary information with the second file summary information;
[0243] The above-mentioned returning the target file to the file downloading mechanism may include:
[0244] When the first file summary information and the second file summary information are consistent, the target file is returned to the file download mechanism.
[0245] According to some embodiments of the present application, optionally, the above-mentioned file upload mechanism may be used to: after receiving the file unique identifier, push the file unique identifier to the file download mechanism;
[0246] Alternatively, in response to a query request from the file downloading agency, a request response corresponding to the query request is returned to the file downloading agency, and the request response carries a unique identifier of the file.
[0247] According to some embodiments of the present application, optionally, the above-mentioned unique file identifier can be: a relative path where the target file is stored on the file transfer server, and / or a file index of the storage location of the target file on the file transfer server.
[0248] Based on the file sharing method provided in the above embodiment, out of the same inventive concept, the present application also provides a file sharing device corresponding to the above file sharing method. Fig. 9 Provides a detailed introduction to file sharing devices.
[0249] See below Fig. 9 , Fig. 9 It is a structural diagram of a file sharing device provided in one embodiment of the present application.
[0250] The file sharing device may include a processor 901 and a memory 902 storing computer program instructions.
[0251] Specifically, the processor 901 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0252] The memory 902 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 902 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 902 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 902 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 902 is a non-volatile solid-state memory.
[0253] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0254] The processor 901 implements any one of the file sharing methods in the above embodiments by reading and executing computer program instructions stored in the memory 902 .
[0255] In one example, the data file sharing device may further include a communication interface 903 and a bus 910. Fig. 9 As shown, the processor 901, the memory 902, and the communication interface 903 are connected via a bus 910 and communicate with each other.
[0256] The communication interface 903 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0257] Bus 910 includes hardware, software or both, and the parts of file sharing device are coupled to each other.For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In suitable cases, bus 910 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0258] The file sharing device executes the file sharing method in the embodiment of the present application, thereby realizing the file sharing method described in the embodiment of the present application.
[0259] In addition, in combination with the file sharing method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the file sharing methods in the above embodiment is implemented.
[0260] Based on the file sharing method in the above embodiment, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the file sharing method provided in any one of the above embodiments of the present application.
[0261] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0262] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0263] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0264] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0265] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A file sharing method, characterized in that: Applied to a file transfer server, the method comprises: Receiving a file upload request for a target file from a file upload mechanism, wherein the file upload request includes a first sender node number of the file upload mechanism and a first receiver node number of the specified target file; Sending the unique file identifier of the target file to the file uploading mechanism; When the file download mechanism obtains the file unique identifier sent by the file upload mechanism, receiving a file download request for the target file from the file download mechanism, the file download request including the file unique identifier, the second sender node number and the second receiver node number of the file download mechanism; When it is verified that the first receiving node number matches the second sending node number and the first sending node number matches the second receiving node number, the target file is obtained based on the file unique identifier query and the target file is returned to the file download mechanism.
2. The method according to claim 1, characterized in that The file upload request includes a first encrypted file and a first business type of the target file; before sending the file unique identifier of the target file to the file upload mechanism, the method further includes: decrypting the first encrypted file based on a first session key corresponding to the first service type to obtain the target file; The file download request also includes a second service type specified by the file download mechanism; the querying based on the file unique identifier to obtain the target file and returning the target file to the file download mechanism includes: The target file is obtained based on the unique identifier of the file, and the target file is encrypted based on the second session key corresponding to the second business type to obtain a second encrypted file, and the second encrypted file is returned to the file download mechanism.
3. The method according to claim 2, characterized in that The sending the unique file identifier of the target file to the file uploading mechanism includes: Encrypting the file unique identifier based on the first session key to obtain a first encrypted file unique identifier; Transmitting the first encrypted file unique identifier to the file upload mechanism, where the file upload mechanism is used to decrypt the first encrypted file identifier based on the first session key to obtain the file unique identifier; The file download request includes a second encrypted file identifier, which is obtained by the file download mechanism encrypting the file unique identifier based on the second session key; before obtaining the target file based on the file unique identifier through querying, the method further includes: The second encrypted file identifier is decrypted based on the second session key to obtain the file unique identifier.
4. The method according to claim 2, characterized in that: After receiving the file upload request for the target file by the file upload mechanism and before decrypting the first encrypted file to obtain the target file, the method further includes: Verifying the number of file uploads by the file upload mechanism within a preset time period; The decrypting the first encrypted file to obtain the target file includes: When the number of times the file is uploaded does not exceed a first preset threshold, the first encrypted file is decrypted to obtain the target file.
5. The method according to claim 2, characterized in that: After obtaining the target file based on the unique identifier of the file, and before returning the second encrypted file to the file download mechanism, the method further includes: Verifying the number of times the file download mechanism downloads the target file; The step of encrypting the target file based on the second session key corresponding to the second service type to obtain a second encrypted file, and returning the second encrypted file to the file download mechanism includes: When the number of file downloads does not exceed a second preset threshold, the target file is encrypted based on the second session key to obtain the second encrypted file, and the second encrypted file is returned to the file download mechanism.
6. The method according to claim 2, characterized in that The file upload request also includes a first request timestamp; and decrypting the first encrypted file to obtain the target file includes: In the case where the time difference between the first request timestamp and the current time of the file transfer server is less than a first preset time difference, decrypting the first encrypted file to obtain the target file; The file download request also includes a second request timestamp; and encrypting the target file based on the second session key corresponding to the second service type to obtain a second encrypted file includes: When it is verified that the time difference between the second request timestamp and the current time of the file transfer server is less than a second preset time difference, the target file is encrypted based on the second session key to obtain the second encrypted file.
7. The method according to claim 2, characterized in that Before decrypting the first encrypted file based on the first session key corresponding to the first service type to obtain the target file, the method further includes: Performing digital sign-in based on the first sender node number to obtain a first correspondence between the service type corresponding to the file upload mechanism and the session key; Determine, based on the first corresponding relationship, the first session key corresponding to the first service type; Before encrypting the target file based on the second session key corresponding to the second service type to obtain a second encrypted file, the method further includes: Performing digital sign-in based on the second sender node number to obtain a second correspondence between the service type corresponding to the file downloading agency and the session key; Based on the second corresponding relationship, determine the second session key corresponding to the second service type.
8. The method according to claim 1, characterized in that: The file upload mechanism is also used to generate corresponding first file summary information based on the target file, and transmit the first file summary to the file download mechanism; The file download request also includes the first file summary information; after obtaining the target file through querying based on the file unique identifier, the method further includes: generating second file summary information corresponding to the current moment based on the target file, and comparing the first file summary information with the second file summary information; The returning the target file to the file download mechanism comprises: When the first file summary information and the second file summary information are consistent, the target file is returned to the file download mechanism.
9. The method according to any one of claims 1 to 8, characterized in that: The file upload mechanism is used to: after receiving the unique identifier of the file, push the unique identifier of the file to the file download mechanism; Alternatively, in response to the query request of the file downloading agency, a request response corresponding to the query request is returned to the file downloading agency, and the request response carries the unique identifier of the file.
10. The method according to any one of claims 1 to 8, characterized in that: The unique identifier of the file is: the relative path where the target file is stored on the file transfer server, and / or the file index of the storage location of the target file on the file transfer server.
11. A file sharing device, characterized in that: Applied to a file transfer server, the device comprises: A first receiving module, used for receiving a file upload request for a target file from a file upload mechanism, wherein the file upload request includes a first sender node number of the file upload mechanism and a first receiver node number of the specified target file; A first processing module, used for sending the unique file identifier of the target file to the file uploading mechanism; A second receiving module is used to receive a file download request for the target file from the file download mechanism when the file download mechanism obtains the file unique identifier sent by the file upload mechanism, wherein the file download request includes the file unique identifier, a second sender node number and a second receiver node number of the file download mechanism; The second processing module is used to obtain the target file based on the file unique identifier when verifying that the first receiving node number matches the second sending node number and the first sending node number matches the second receiving node number, and return the target file to the file download mechanism.
12. A file sharing device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the file sharing method according to any one of claims 1 to 10 is implemented.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the file sharing method according to any one of claims 1 to 10 is implemented.
14. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the file sharing method as described in any one of claims 1-10.
Citation Information
Patent Citations
File uploading and downloading method, device, equipment, system and storage medium
CN108809960A
Authority management and control method and device, equipment and storage medium
CN111683076A
File uploading and downloading method and device, computer equipment and storage medium
CN114520807A
Data uploading method and device, equipment, storage medium and program product
CN116614495A
File transfer method and apparatus
CN1968099A
