File storage method and device
By directly storing files to the corresponding storage space and associating the storage results, the problem of low file storage efficiency is solved, resource saving and information query convenience is achieved, and file storage flexibility and security is enhanced.
Patent Information
- Application Number
- CN202310632000.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-30
- Publication Date
- 2024-12-03
AI Technical Summary
In the prior art, file storage processes need to be stored on the computer side, resulting in low file storage efficiency and occupying system resources of computers and related servers.
The document identification determines the stored information and the file to be stored, directly store the file in the corresponding storage space, and associates the storage results and document information, use the QR code to obtain the document information, determine whether the QR code expires, and according to the current link Determine storage conditions.
It improves file storage efficiency, saves system resources, facilitates query and display of storage results, improves flexibility and security in obtaining document information, and adapts to storage needs in different environments.
Smart Images

Figure CN119065585A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for storing files. Background Art
[0002] During the execution of business processes, pictures, audio, video, documents and other files are usually used to record, archive and back up the execution process. For example, during the product maintenance process, in order for users to query the product maintenance progress in a timely manner, it is necessary to upload the corresponding fault status diagram, maintenance progress diagram or maintenance document description at each maintenance link. When storing the above files, it is usually necessary to first transfer the files to the computer, and then send them to the cloud storage end for storage.
[0003] In the process of implementing the present invention, the inventors found that the prior art has at least the following problems:
[0004] The file storage process needs to be stored on the computer side, which makes the file storage process more complicated, makes the file storage efficiency low, and occupies the system resources of the computer and related servers when storing files. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a method and device for file storage, which can improve file storage efficiency and save system resources.
[0006] To achieve the above object, according to a first aspect of an embodiment of the present invention, a method for storing a file is provided, comprising:
[0007] In response to receiving the document identification, determining corresponding document information according to the document identification, and acquiring corresponding storage information according to the document information;
[0008] In response to receiving the screening request, determining the to-be-stored file corresponding to the document information, and storing the to-be-stored file in the storage space corresponding to the storage information;
[0009] In response to receiving the storage result corresponding to the file to be stored, the storage result and the document information are stored in association.
[0010] Optionally, determining corresponding document information according to the document identifier includes:
[0011] Generate corresponding token information according to the document identification and real-time timestamp, and generate a corresponding QR code according to the token information;
[0012] In response to receiving the decoding request, the token information corresponding to the QR code is parsed to obtain the document information corresponding to the document identifier.
[0013] Optionally, before storing the file to be stored in the storage space corresponding to the storage information, the method further includes:
[0014] Determine whether the usage status of the QR code is expired;
[0015] When the usage status of the QR code is expired, the QR code is covered to generate corresponding first prompt information;
[0016] In response to receiving a refresh request, corresponding new token information is generated according to the document identification and the real-time timestamp, a corresponding new QR code is generated according to the new token information, and the new QR code is used to replace the QR code.
[0017] Optionally, the method further comprises:
[0018] In response to receiving the status query request, the usage status of the QR code is queried according to the token information corresponding to the QR code.
[0019] Optionally, determining the file to be stored corresponding to the document information includes:
[0020] Parsing the screening request to determine the corresponding selected files;
[0021] Determining whether the selected file meets a preset storage condition;
[0022] In the case where the selected file meets the storage condition, the selected file is used as a file to be stored corresponding to the document information;
[0023] When the selected file does not meet the storage condition, corresponding second prompt information is generated.
[0024] Optionally, the document information includes a current link identifier; before determining whether the selected file meets a preset storage condition, the method further includes:
[0025] The corresponding storage condition is determined according to the current link identifier.
[0026] Optionally, the method further comprises:
[0027] The document information and the storage conditions are visually rendered.
[0028] Optionally, the method further comprises:
[0029] Before determining whether the selected file meets the preset storage condition, in response to receiving a first preview request, previewing the selected file;
[0030] Before storing the file to be stored in the storage space corresponding to the storage information, in response to receiving a second preview request, previewing the file to be stored.
[0031] Optionally, the method further comprises:
[0032] Before determining whether the selected file meets the preset storage condition, in response to receiving a first cancellation request, removing a first target file corresponding to the first cancellation request from the selected file;
[0033] Before storing the file to be stored in the storage space corresponding to the storage information, in response to receiving a second revocation request, removing a second target file corresponding to the second revocation request from the file to be stored.
[0034] Optionally, after receiving the storage result corresponding to the file to be stored, the method further includes:
[0035] Perform visual rendering on the file to be stored.
[0036] Optionally, the method further comprises:
[0037] In response to receiving the result query request, a corresponding target document identifier is obtained, corresponding target document information is determined according to the target document identifier, and a stored result corresponding to each link identifier included in the target document information is queried.
[0038] According to a second aspect of an embodiment of the present invention, there is provided a file storage device, comprising:
[0039] An acquisition module, configured to, in response to receiving a document identifier, determine corresponding document information according to the document identifier, and acquire corresponding storage information according to the document information;
[0040] A storage module, configured to determine, in response to receiving a screening request, a file to be stored corresponding to the document information, and store the file to be stored in a storage space corresponding to the storage information;
[0041] The association module is used for, in response to receiving the storage result corresponding to the file to be stored, associating and storing the storage result with the document information.
[0042] Optionally, determining corresponding document information according to the document identifier includes:
[0043] Generate corresponding token information according to the document identification and real-time timestamp, and generate a corresponding QR code according to the token information;
[0044] In response to receiving the decoding request, the token information corresponding to the QR code is parsed to obtain the document information corresponding to the document identifier.
[0045] Optionally, the device further comprises:
[0046] A determination module, used to determine whether the usage status of the QR code is expired;
[0047] A generating module, configured to cover the QR code and generate corresponding first prompt information when the usage status of the QR code is expired;
[0048] The replacement module is used to generate corresponding new token information according to the document identification and real-time timestamp in response to receiving a refresh request, generate a corresponding new QR code according to the new token information, and use the new QR code to replace the QR code.
[0049] Optionally, the device further comprises:
[0050] The first query module is used to query the usage status of the two-dimensional code according to the token information corresponding to the two-dimensional code in response to receiving the status query request.
[0051] Optionally, determining the file to be stored corresponding to the document information includes:
[0052] Parsing the screening request to determine the corresponding selected files;
[0053] Determining whether the selected file meets a preset storage condition;
[0054] In the case where the selected file meets the storage condition, the selected file is used as a file to be stored corresponding to the document information;
[0055] When the selected file does not meet the storage condition, corresponding second prompt information is generated.
[0056] Optionally, the document information includes a current link identifier; and the device further includes:
[0057] A determination module is used to determine a corresponding storage condition according to the current link identifier.
[0058] Optionally, the device further comprises:
[0059] The first rendering module is used to perform visual rendering on the document information and the storage conditions.
[0060] Optionally, the device further comprises:
[0061] A first preview module, configured to preview the selected file in response to receiving a first preview request before determining whether the selected file meets a preset storage condition;
[0062] The second preview module is used to preview the file to be stored in response to receiving a second preview request before storing the file to be stored in the storage space corresponding to the storage information.
[0063] Optionally, the device further comprises:
[0064] A first revocation module, configured to remove a first target file corresponding to the first revocation request from the selected file in response to receiving a first revocation request before determining whether the selected file meets a preset storage condition;
[0065] The second revocation module is used for removing a second target file corresponding to the second revocation request from the file to be stored in response to receiving a second revocation request before storing the file to be stored in the storage space corresponding to the storage information.
[0066] Optionally, the device further comprises:
[0067] The second rendering module is used to perform visual rendering on the file to be stored.
[0068] Optionally, the device further comprises:
[0069] The second query module is used to obtain the corresponding target document identifier in response to receiving the result query request, determine the corresponding target document information according to the target document identifier, and query the stored result corresponding to each link identifier included in the target document information.
[0070] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, including:
[0071] one or more processors;
[0072] a storage device for storing one or more programs,
[0073] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of the above embodiments.
[0074] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method described in any one of the above embodiments is implemented.
[0075] An embodiment of the above invention has the following advantages or beneficial effects: determining storage information and files to be stored according to the document identification, so that the files to be stored and the storage information are associated through the document information; directly storing the storage files in the corresponding storage space can improve storage efficiency and save system resources; associating the storage results and document information for storage can facilitate the query and display of storage results; obtaining the corresponding document information according to the QR code can make the document information acquisition more convenient and improve the flexibility of document information acquisition; judging whether the QR code is expired can avoid the QR code from being bound to a certain document information and improve the security of document information acquisition; determining the corresponding storage conditions according to the current link can enable different environments to upload different files to be stored, and modify the storage conditions according to actual needs to improve the flexibility and universal applicability of file storage; querying the corresponding document information and storage results according to the document identification can facilitate the query of the storage results corresponding to each link and improve information acquisition efficiency.
[0076] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0078] Figure 1 is a schematic diagram of the main process of the file storage method according to an embodiment of the present invention;
[0079] Figure 2 is a timing diagram of multi-terminal collaboration of a file storage method according to a reference embodiment of the present invention;
[0080] Figure 3 It is a main flow chart of a computer side of a file storage method according to a reference embodiment of the present invention;
[0081] Figure 4 It is a schematic diagram of the main process of a mobile terminal of a file storage method according to a reference embodiment of the present invention;
[0082] Figure 5 is a schematic diagram of the main process of a method for storing files according to a reference embodiment of the present invention;
[0083] Figure 6 is a schematic diagram of the main process of a method for storing files according to another reference embodiment of the present invention;
[0084] Figure 7 is a schematic diagram of the main process of a method for storing files according to yet another reference embodiment of the present invention;
[0085] Figure 8 is a schematic diagram of main modules of a file storage device according to an embodiment of the present invention;
[0086] Fig. 9 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0087] Fig.10 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0088] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0089] It should be noted that in the technical solution of the present invention, the collection, use, storage, sharing and transfer of user personal information involved are in compliance with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.
[0090] Business processes often have multiple links. During the execution of business processes, pictures, audio, video, documents and other files are usually used to record, archive and back up the execution process of each link. For example, during online consultations, in order for users to be able to query the progress and effect of treatment in a timely manner, it is necessary to upload corresponding treatment effect pictures, treatment progress descriptions, etc. in each consultation link. When storing the above files, it is usually necessary to transfer the files to the computer first, and then send them to the cloud storage end for storage.
[0091] The file storage process needs to be stored on the computer side, which makes the file storage process more complicated, makes the file storage efficiency low, and occupies the system resources of the computer and related servers when storing files.
[0092] In view of this, according to a first aspect of an embodiment of the present invention, a method for storing a file is provided.
[0093] Figure 1 FIG. 1 is a schematic diagram of the main process of the file storage method according to an embodiment of the present invention. Figure 1 As shown, the file storage method according to the embodiment of the present invention mainly includes the following steps S101 to S103.
[0094] Step S101, in response to receiving a document identifier, determining corresponding document information according to the document identifier, and acquiring corresponding storage information according to the document information.
[0095] The document identifier is an information included in the business document. The document identifier has directionality and uniqueness. According to the document identifier, the document information included in the corresponding business document can be queried. The business document can be a maintenance document in a product maintenance business, a consultation document in an online consultation business, or a transportation document in a logistics transportation business, etc. The document information determined according to the document identifier includes: document number, link code, document details, the number of files to be stored in the current link, etc. According to the document number and link number, the corresponding storage information is obtained from the pre-set cloud storage server, and the storage information includes: storage path, access key, validity period, etc. Preferably, according to the number of files to be stored in the current link, a corresponding number of storage paths are obtained, so that each storage path is used to store a file, and the files are stored in different storage paths, which is convenient for distinguishing and querying files. It should be noted that the step of obtaining the corresponding storage information according to the document information can also be performed after determining the file to be stored corresponding to the document information, that is, first determine the corresponding file to be stored according to the document information, and then obtain the corresponding storage information according to the document information, and store the file to be stored in the storage space corresponding to the storage information.
[0096] For example, the received document identifier is "A001", and the document information associated with the document identifier includes "{'orderId':'A001'; 'orderCode':'abcd'; 'linkCode':'recheck'; 'numberSave':'2'}", where "'orderCode':'abcd'" indicates that the document code is "abcd", "'linkCode':'recheck'" indicates that the link code is "recheck" (that is, the current link is the review link), and "'numberSave':'2'" indicates that the current link needs to store 2 files; the storage information obtained from the cloud storage server The information includes "{'filePath1':'https: / / A.oss.com / abcd / link01 / 1.png?accessKeyId=123&Expires=114182';'filePath2':'https: / / A.oss.com / abcd / link01 / 2.png?accessKeyId=123&expires=114182'}", where the values corresponding to "filePath1" and "filePath2" are two storage paths, "accessKeyId" represents the access key, and "expires" represents the validity period of the stored information.
[0097] By associating the document number and link number included in the document information with the storage information, different links have different storage information, thereby improving the flexibility of file storage.
[0098] According to a reference embodiment of the present invention, corresponding token information is generated according to the document identification and real-time timestamp. The token information is a string of fixed length. The use of real-time timestamp can make the token generated each time different, avoiding the reuse of old tokens. A corresponding QR code is generated according to the token information, one QR code corresponding to each token information, and the generated QR code is displayed. For example, the QR code is rendered using a QR code rendering tool library such as qrcodejs2, and the QR code is rendered next to the document identification on the page, so that the user can scan the corresponding QR code according to the document identification. After the user scans the QR code, a decoding request is generated. After receiving the decoding request, the execution subject of the embodiment of the present invention determines the corresponding QR code, obtains the token information corresponding to the QR code, parses the token information, and obtains the document information corresponding to the document identification.
[0099] For example, there are document identification "B1", document identification "B2", and document identification "B3" on the page, and a corresponding QR code under each document identification. The user can scan the QR code under the document identification "B1" to obtain the document information corresponding to the document identification "B1", which is convenient for subsequent acquisition of storage information corresponding to different document information, so that the storage files corresponding to different document information can be stored in different storage spaces.
[0100] Step S102, in response to receiving the screening request, determining the to-be-stored file corresponding to the document information, and storing the to-be-stored file in the storage space corresponding to the storage information.
[0101] The screening request is a request for screening files. The screening request is parsed to obtain the temporary storage path of the file to be stored in the system where the execution subject of the embodiment of the present invention is located, and the corresponding file to be stored is obtained according to the storage path. According to the storage path included in the storage information, the obtained file to be stored is stored in the storage space corresponding to the storage information. It should be noted that the execution subject of the embodiment of the present invention directly stores the file to be stored in the corresponding storage space according to the storage path, rather than uploading the file to be stored to a pre-set transfer server, and then the transfer server stores the file to be stored in the corresponding storage space.
[0102] Exemplarily, the received filtering request is parsed to obtain "{'file1':' / c1 / c2 / 3.png'; 'file2':' / c3 / c4 / 5.png'}", wherein "'file1':' / c1 / c2 / 3.png'" represents the temporary storage path of the first file to be stored, and "'file2':' / c3 / c4 / 5.png'" represents the temporary storage path of the second file to be stored. The corresponding file to be stored is obtained from the above temporary storage path, and the file to be stored is stored in the storage space corresponding to the storage information.
[0103] By directly storing the files to be stored in the corresponding storage space according to the storage information, the file storage efficiency can be improved, the system resources of other servers can be avoided, and the network overhead can be saved.
[0104] According to a reference embodiment of the present invention, the usage status of the QR code includes: waiting to be scanned, scanned, uploaded, expired, etc. After the QR code is generated, the usage status of the QR code is "waiting to be scanned". After the user scans the QR code, the usage status of the QR code is converted to "scanned". After the file to be stored is stored in the corresponding storage space, the usage status of the QR code is converted to "uploaded". The effective time of the QR code is pre-set. When the generated time of the QR code is greater than the effective time, the use state of the QR code is converted to "expired". Before storing the file to be stored in the storage space corresponding to the storage information, it is repeatedly determined whether the use state of the QR code is expired; when the use state of the QR code is not expired, the QR code continues to be displayed on the page; when the use state of the QR code is expired, the QR code is covered to prevent the user from scanning the expired QR code, and a corresponding first prompt message is generated to prompt the user to refresh the QR code (for example, click the QR code, click the refresh button next to the QR code, etc.) to generate a new QR code; in response to receiving a refresh request, the QR code corresponding to the refresh request is determined, and then the document identifier corresponding to the QR code is determined, and the corresponding new token information is generated according to the determined document identifier and the real-time timestamp, and the corresponding new QR code is generated according to the new token information. The old QR code corresponding to the refresh request is replaced with the new QR code, and the use state of the new QR code is set to "to be scanned". Each QR code corresponds to a token information, and different QR codes correspond to different token information.
[0105] Exemplarily, after the QR code is generated, multiple threads are used to concurrently poll the usage status of the QR code to determine whether the usage status of the QR code is "expired". After detecting that the usage status of the QR code has been converted to "expired", the QR code is covered and a prompt message is sent; or in the case where the execution subject of an embodiment of the present invention includes a server and a client, a long link communication protocol such as WebSocket is used. When the usage status of the QR code is converted to "expired", the server sends a usage status change notification to the client. After receiving the usage status change notification, the client covers the QR code and sends a prompt message.
[0106] Using concurrent polling can cover the QR code in time; using the long link communication protocol, the QR code usage status change notification can be obtained in real time, saving the resource consumption caused by polling.
[0107] According to another referenceable embodiment of the present invention, the method further includes: in response to receiving a status query request, parsing the status query request, determining a QR code corresponding to the status query request, acquiring token information corresponding to the QR code, and querying the usage status of the QR code according to the token information. The usage status of the QR code is displayed next to the QR code.
[0108] Exemplarily, Redis is used to store the token information of the QR code and the corresponding QR code status, wherein the token information is used as the key, and the QR code status, document number, link code, QR code status conversion timestamp and other information are used as key-associated values; according to the query instructions supported by Redis, the corresponding QR code status, document number, link code and other information are queried according to the token information carried by the status query request.
[0109] According to another reference embodiment of the present invention, when determining the to-be-stored file corresponding to the document information, the screening request is parsed to determine the corresponding selected file. It is judged whether the selected file meets the preset storage conditions, and the storage conditions include: whether the number of selected files is less than or equal to the preset file number threshold, whether the file type of the selected file meets the preset file type, whether the file size of the selected file is less than or equal to the preset file size threshold, etc. In the case that the selected file meets the above multiple storage conditions, the selected file is used as the to-be-stored file corresponding to the document information; in the case that the selected file does not meet any of the above storage conditions, a corresponding second prompt message is generated to prompt the user that the selected file does not meet the storage conditions, so that the user can adjust the selected file.
[0110] For example, when the pre-set file type is the "jpg" format, and the selected files include other file types such as "png", "gif", etc., the user is prompted that "the file type of the selected file does not meet the requirements, please reselect the file according to the storage conditions"; the pre-set file quantity threshold is 5, and each time the user selects a file, the file is set as the selected file. When the user selects the 6th file, the user is prompted that "the file number of selected files has reached the upper limit of the file number corresponding to the storage requirements."
[0111] According to another reference embodiment of the present invention, the selected file is generated by the execution subject of the embodiment of the present invention, for example, the selected file is an image obtained by the execution subject of the embodiment of the present invention by photographing the surrounding environment, a document generated after acquiring, editing, and typesetting data, an audio file generated by recording the surrounding environment, a video file generated by recording the surrounding environment, etc. The execution subject of the embodiment of the present invention directly uses the generated file as the selected file, and accordingly, the storage condition can also include a limit on the number of times the selected file is generated. When the number of generated selected files is equal to the preset file number threshold, the user is prompted not to generate more files or the user is prompted to filter among the generated multiple files, thereby obtaining the selected file; the execution subject of the embodiment of the present invention then judges the selected files and uses the selected files that meet the storage conditions as the files to be stored.
[0112] Using storage conditions to judge the selected files can ensure that the files to be stored meet the storage conditions, avoid storing files that do not meet the storage conditions, and improve storage efficiency and accuracy.
[0113] According to another reference embodiment of the present invention, the document information includes a current link identifier, the link identifier indicates a link in the business process, one link identifier corresponds to one link, and different links have different link identifiers. The document information includes a completed link identifier, a current link identifier, and an unfinished link identifier, wherein the completed link identifier indicates the link identifier corresponding to the completed link, the current link identifier indicates the link identifier corresponding to the current link, and the unfinished link identifier indicates the link identifier corresponding to the unfinished link. Each link needs to store the corresponding file to be stored, therefore, each link corresponds to a storage condition, and different links have different corresponding storage conditions. Before judging whether the selected file meets the preset storage condition, the corresponding storage condition is determined according to the current link identifier.
[0114] Exemplarily, the business process includes three links, among which the storage conditions corresponding to link D1 are "file format is 'doc', 'txt', 'xlsx'; the number of files does not exceed 5; the size of each file does not exceed 1MB", the storage conditions corresponding to link D2 are "file type is image; the number of files exceeds 10; the total file size does not exceed 10MB", and the storage conditions corresponding to link D3 are "file type is audio file or video file; the number of files does not exceed 7; the time difference of each audio file or video file does not exceed 10 minutes"; according to the current link identifier, it is determined that the current link is link D2, and then it is determined whether the selected file meets the storage conditions corresponding to link D2.
[0115] Setting different storage conditions according to different links can increase the flexibility of storage conditions and further improve the efficiency and accuracy of file storage.
[0116] According to another reference embodiment of the present invention, the method further includes: visually rendering the document information and storage conditions. For example, the current link and the storage conditions corresponding to the current link are determined according to the link identifier, and the document information and the storage conditions corresponding to the current link are visually rendered, or the document information and the storage conditions corresponding to all links are visually rendered. The storage conditions are visually rendered so that the user can understand the specific content of the storage conditions, so that the user can first judge the file according to the storage conditions when filtering the selected files. For example, the storage condition is: the file type is a picture, specifically, the file includes a six-sided picture of the target product and a specific fault condition picture showing the target product. When it is difficult for the executor of the embodiment of the present invention to judge some more subjective storage conditions, the user is allowed to filter and judge the files according to the storage conditions after visual rendering, so as to further improve the flexibility of the storage conditions and improve the efficiency and accuracy of file storage.
[0117] According to a reference embodiment of the present invention, the method further includes: before determining whether the selected file meets the preset storage conditions, the user can send a first preview request to the execution subject of the embodiment of the present invention, and after receiving the first preview request, the execution subject of the embodiment of the present invention determines the file to be previewed in the selected file, and previews the file to be previewed in the selected file. For example, if the file to be previewed is a picture, the file to be previewed is scaled, the original picture is displayed, etc.; if the file to be previewed is a document, the specific content of the file to be previewed is checked; if the file to be previewed is an audio, the file to be previewed is converted into text; if the file to be previewed is a video, the file to be previewed is played.
[0118] Before storing the file to be stored in the storage space corresponding to the storage information, the user can send a second preview request to the execution subject of the embodiment of the present invention. After receiving the second preview request, the execution subject of the embodiment of the present invention determines the file to be previewed in the file to be stored, and previews the file to be previewed in the file to be stored. For example, if the file to be previewed is a picture, the file to be previewed is scaled, the original picture is displayed, etc.; if the file to be previewed is a document, the specific content of the file to be previewed is checked; if the file to be previewed is an audio, the file to be previewed is converted into text; if the file to be previewed is a video, the file to be previewed is played.
[0119] Previewing the selected files and the files to be stored enables users to view the corresponding files in a timely manner, and promptly discover the selected files that do not meet the storage conditions and the files to be stored that should not be stored, thereby improving the user experience and further improving the accuracy and flexibility of file storage.
[0120] According to another reference embodiment of the present invention, the method further includes: before determining whether the selected file meets the preset storage conditions, the user can send a first revocation request to the execution subject of the embodiment of the present invention, and after receiving the first revocation request, the execution subject of the embodiment of the present invention determines the first target file in the selected file and removes the first target file corresponding to the first revocation request in the selected file. Before storing the file to be stored in the storage space corresponding to the storage information, the user can send a second revocation request to the execution subject of the embodiment of the present invention, and after receiving the second revocation request, the execution subject of the embodiment of the present invention determines the second target file in the file to be stored and removes the second target file corresponding to the second revocation request in the file to be stored.
[0121] Exemplarily, multiple file states such as "to be selected", "selected", "to be stored", and "stored" are pre-set, each file corresponds to a file state, and before the files are screened, the file state of each file is "to be selected"; after the selected file is obtained according to the screening request, the file state corresponding to the selected file is converted to "selected"; before the selected file is judged, if the user sends a first revocation request, the file state of the first target file corresponding to the first revocation request in the selected file is converted from "selected" to "to be selected", that is, the first target file is removed from the selected file; if the selected file meets the storage condition, the file state corresponding to the selected file is converted to "to be stored", and if the selected file does not meet the storage condition, the file state corresponding to the selected file is converted to "to be selected"; before the file to be stored is stored in the corresponding storage space, if the user sends a second revocation request, the file state of the second target file corresponding to the second revocation request in the file to be stored is converted from "to be stored" to "to be selected", that is, the second target file is removed from the file to be stored; after the file to be stored is stored in the corresponding storage space, the file state of the file to be stored is converted to "stored".
[0122] Removing the selected files according to the user's first revocation request and removing the files to be stored according to the user's second revocation request can improve the flexibility and accuracy of file screening and file storage and improve the user experience.
[0123] Step S103, in response to receiving the storage result corresponding to the file to be stored, the storage result and the document information are stored in association with each other.
[0124] When storing the file to be stored in the corresponding storage space on the pre-set cloud storage server, the document number, link code and other information corresponding to the storage file are also sent to the cloud storage server, so that after the cloud storage server completes the storage of the storage file, the corresponding storage result is returned according to the document number and link code and other information. The storage result includes: document number, link code, storage path of the storage file, storage status of the storage file, etc.; wherein, the storage status includes: storage success, storage abnormality, and when the storage status is "storage abnormality", the storage result also includes specific abnormal information, such as the cause of the storage abnormality, the method of repairing the storage abnormality, etc. The corresponding storage file can be accessed according to the storage path included in the storage result. The above storage results are stored in association with the document information. Since each storage result corresponds to a completed link, in the case of multiple links included in the document information, each document information corresponds to one or more storage results, which means that one or more links corresponding to the document information have been completed.
[0125] Exemplarily, the received storage result is "{'docId':'321'; 'linkCode':'repair'; 'URL':'http: / / xxxx.com / bucket / 456.jpg'; 'result':'success'}", wherein "'docId':'321'" indicates that the document number is "321", "'linkCode':'repair'" indicates that the link code is "repair" (that is, the current link is the maintenance link), "'URL':'http: / / xxxx.com / bucket / 456.jpg'" indicates that the storage path of the storage file corresponding to the current link is "http: / / xxxx.com / bucket / 456.jpg", and "'result':'success'" indicates that the storage status is successful storage.
[0126] As another example, an information table of document information and corresponding associated storage results is generated, as shown in Table 1:
[0127] Table 1
[0128] Document number Link Coding Storage path Storage Status ... FW2023E1 REPAIR http: / / xxx.com / storage / a.jpg SUCCESS ... FW2023E1 RECHECK http: / / xxx.com / storage / b.jpg SUCCESS ... FW2023E2 REPAIR http: / / xxx.com / storage / c.jpg SUCCESS ... ... ... ... ... ...
[0129] Among them, the first two pieces of data in Table 1 are the storage results corresponding to the same document number and different link codes, and the third piece of data is the storage result corresponding to a link code of another document number. According to the information table, the storage path, storage status and other storage results under different links corresponding to each document can be determined, and the corresponding storage file can be viewed by clicking the storage path.
[0130] Storing the stored results and document information in association can facilitate the query of all stored results corresponding to each document information, thereby improving the query efficiency and management efficiency of the stored results.
[0131] According to a reference embodiment of the present invention, after receiving the storage result corresponding to the file to be stored, the file to be stored is visually rendered according to the file type of the file to be stored. For example, when the file to be stored is a picture, the picture (or thumbnail) is rendered on the page; when the file to be stored is a document, the document is rendered into a text box on the page, and the entire content of the document is viewed by dragging the scroll bar up and down; when the file to be stored is a video or audio, the video or audio is embedded in the page, and the video or audio is played by clicking the corresponding play button. For another example, according to the file type of the file to be stored, the corresponding thumbnail icon is obtained, and the obtained thumbnail icon is rendered into the above-mentioned information table showing the storage result, and the corresponding file is viewed by clicking the thumbnail icon. Visual rendering of the file to be stored can facilitate viewing of files, viewing the file storage status of each link, and quickly determining whether the corresponding files are stored in certain links.
[0132] According to another embodiment of the present invention, the method further includes: in response to receiving a result query request, the result query request is a request for querying the storage result, parsing the result query request, obtaining the corresponding target document identifier, determining the corresponding target document information according to the target document identifier, and querying the storage result corresponding to each link identifier included in the target document information. Exemplarily, the target document information corresponding to the target document identifier includes: link "F1", link "F2" and link "F3", querying the storage result corresponding to the target unit price information, obtaining the storage path and storage status corresponding to link "F1", the storage path and storage status corresponding to link "F2", and the storage path and storage status corresponding to link "F3"; since the current link is link "F2", the storage path and storage status corresponding to link "F3" are empty, and after storing the to-be-stored file corresponding to link "F3" in the corresponding storage space, the storage path and storage status corresponding to link "F3" can be queried.
[0133] Querying the storage results corresponding to the document information can quickly determine the storage results corresponding to each link included in the document information, thereby improving the query efficiency and accuracy of the storage results.
[0134] Figure 2 FIG. 1 is a timing diagram of multi-terminal collaboration of a file storage method according to a reference embodiment of the present invention. For example, Figure 2As shown, the file storage method is completed by the collaboration of multiple terminals such as a computer, a mobile terminal, an application server, and a cloud storage server. First, the computer terminal sends a document identifier to the application server, and the application server returns the token information corresponding to the document identifier to the computer terminal. The computer terminal generates a corresponding QR code based on the received token information and displays the QR code so that the user can scan the QR code. The user scans the QR code through the mobile terminal, that is, sends a decoding request to the computer terminal, and the computer terminal returns the token information corresponding to the QR code to the mobile terminal. The mobile terminal sends the received token information to the application server, and the application server returns the document information to the mobile terminal based on the received token information. The mobile terminal sends the document information to the cloud storage server, and the cloud storage server returns the corresponding storage information to the mobile terminal based on the document information. The mobile terminal screens the locally stored files to obtain the files to be stored, and then stores the files to be stored in the corresponding storage space on the cloud storage server, and receives the storage success response returned by the cloud storage server. After the storage is successful, the cloud storage server sends the storage result to the application server, and the application server associates and stores the storage result and the corresponding document information, and returns the receiving response to the cloud storage server.
[0135] Figure 3 FIG. 1 is a schematic diagram of the main flow chart of a computer-side method for storing files according to a reference embodiment of the present invention. Figure 3 As shown, in response to receiving the document identification, the corresponding token information is obtained according to the document identification and the real-time timestamp; the corresponding QR code is generated according to the token information, and the QR code is rendered on the page; the use status of the QR code is set to "waiting to be scanned"; it is determined whether the QR code has expired, and if the QR code has expired, the use status of the QR code is modified to "expired", the QR code is covered, a prompt message is generated, and in response to receiving a refresh request, new token information is obtained according to the document identification and the real-time timestamp, and a new QR code is generated according to the new token information, so that the new QR code replaces the previous QR code; if the QR code has not expired, in response to receiving the solution Code request, parse the corresponding token information, and obtain the corresponding document information; change the usage status of the QR code to "scanned code"; determine whether the corresponding file to be stored has been stored, and if the file to be stored has been stored, change the usage status of the QR code to "stored"; render the file to be stored on the page; if the file to be stored has not been stored, determine again whether the QR code has expired, if the QR code has not expired, then if it is determined that the storage is successful, change the usage status of the QR code to "stored", and render the file to be stored on the page; if the QR code has expired, generate a new QR code to replace the previous one.
[0136] Figure 4FIG. 1 is a schematic diagram of the main flow of a mobile terminal of a file storage method according to a reference embodiment of the present invention. Figure 4 As shown, the mobile terminal scans the QR code located on the computer terminal to obtain the corresponding document information; enters the file screening page, filters the files to obtain the selected files; determines whether the selected files meet the storage conditions, and generates a prompt message when the selected files do not meet the storage conditions, so that the user can cancel the selected files, and then enters the file screening page again to filter the files to obtain new selected files; when the selected files meet the storage conditions, the selected files are used as the files to be stored, the storage information corresponding to the document information is obtained, and the files to be stored are stored in the corresponding storage space on the cloud storage server.
[0137] Figure 5 FIG. 1 is a schematic diagram of the main process of a method for storing files according to a reference embodiment of the present invention. Figure 5 As shown, the file storage method may include:
[0138] Step S501, generating corresponding token information according to the document identification and real-time timestamp;
[0139] Step S502, generating a corresponding QR code according to the token information;
[0140] Step S503, determine whether the usage status of the QR code is expired, if so, jump to step S504, otherwise, jump to step S506;
[0141] Step S504, covering the QR code and generating corresponding first prompt information;
[0142] Step S505, in response to receiving the refresh request, generating corresponding new token information according to the document identifier and the real-time timestamp;
[0143] Step S506, in response to receiving the decoding request, parsing the token information corresponding to the QR code to obtain the document information corresponding to the document identifier;
[0144] Step S507, obtaining corresponding storage information according to the document information;
[0145] Step S508, in response to receiving the screening request, parsing the screening request to determine the corresponding selected files;
[0146] Step S509, determining whether the selected file meets the storage condition, if yes, jump to step S511, otherwise, jump to step S510;
[0147] Step S510, generating a second prompt message to enable the user to re-initiate a screening request;
[0148] Step S511, taking the selected file as the file to be stored corresponding to the document information;
[0149] Step S512, storing the file to be stored in the storage space corresponding to the storage information;
[0150] Step S513, associating and storing the received storage result with the corresponding document information;
[0151] Step S514: Visually render the file to be stored.
[0152] The specific implementation content of the file storage method of the above-mentioned reference embodiment of the present invention has been described in detail in the above-mentioned file storage method, so the repeated content will not be described again here.
[0153] Figure 6 FIG. 1 is a schematic diagram of the main process of a method for storing files according to another reference embodiment of the present invention. Figure 6 As shown, the file storage method may include:
[0154] Step S601, generating corresponding token information according to the document identification and real-time timestamp;
[0155] Step S602, generating a corresponding QR code according to the token information;
[0156] Step S603, determine whether the usage status of the QR code is expired, if so, jump to step S604, otherwise, jump to step S606;
[0157] Step S604, covering the QR code and generating corresponding first prompt information;
[0158] Step S605, in response to receiving the refresh request, generating corresponding new token information according to the document identifier and the real-time timestamp;
[0159] Step S606, in response to receiving the decoding request, parsing the token information corresponding to the QR code to obtain the document information corresponding to the document identifier;
[0160] Step S607, obtaining corresponding storage information according to the document information;
[0161] Step S608, determining the corresponding storage condition according to the current link identifier, and visually rendering the document information and the storage condition;
[0162] Step S609, in response to receiving the screening request, parsing the screening request to determine the corresponding selected file;
[0163] Step S610, in response to receiving the first preview request, previewing the selected file;
[0164] Step S611, determine whether the selected file meets the storage conditions, if yes, jump to step S613, otherwise, jump to step S612;
[0165] Step S612, generating a second prompt message to enable the user to re-initiate a screening request;
[0166] Step S613, taking the selected file as the file to be stored corresponding to the document information;
[0167] Step S614, in response to receiving the second preview request, previewing the file to be stored;
[0168] Step S615, storing the file to be stored in the storage space corresponding to the storage information;
[0169] Step S616, associating and storing the received storage result with the corresponding document information;
[0170] Step S617: Visually render the file to be stored.
[0171] The specific implementation content of the file storage method of another reference embodiment of the present invention has been described in detail in the above-mentioned file storage method, so the repeated content will not be described again here.
[0172] Figure 7 FIG. 1 is a schematic diagram of the main process of a method for storing files according to another reference embodiment of the present invention. Figure 7 As shown, the file storage method may include:
[0173] Step S701, generating corresponding token information according to the document identification and real-time timestamp;
[0174] Step S702, generating a corresponding QR code according to the token information;
[0175] Step S703, determine whether the usage status of the QR code is expired, if so, jump to step S704, otherwise, jump to step S706;
[0176] Step S704, covering the QR code and generating corresponding first prompt information;
[0177] Step S705, in response to receiving the refresh request, generating corresponding new token information according to the document identifier and the real-time timestamp;
[0178] Step S706, in response to receiving the decoding request, parsing the token information corresponding to the QR code to obtain the document information corresponding to the document identifier;
[0179] Step S707, obtaining corresponding storage information according to the document information;
[0180] Step S708, determining the corresponding storage condition according to the current link identifier, and visually rendering the document information and storage condition;
[0181] Step S709, in response to receiving the screening request, parsing the screening request to determine the corresponding selected file;
[0182] Step S710, in response to receiving the first cancellation request, removing the first target file corresponding to the first cancellation request from the selected files;
[0183] Step S711, determine whether the selected file meets the storage conditions, if yes, jump to step S713, otherwise, jump to step S712;
[0184] Step S712, generating a second prompt message to enable the user to re-initiate a screening request;
[0185] Step S713, taking the selected file as the file to be stored corresponding to the document information;
[0186] Step S714, in response to receiving the second cancellation request, removing the second target file corresponding to the second cancellation request from the files to be stored;
[0187] Step S715, storing the file to be stored in the storage space corresponding to the storage information;
[0188] Step S716, associating and storing the received storage result with the corresponding document information;
[0189] Step S717, performing visual rendering on the file to be stored;
[0190] Step S718, in response to receiving the result query request, obtaining the corresponding target document identifier;
[0191] Step S719, determine the corresponding target document information according to the target document identifier, and query the storage result corresponding to each link identifier included in the target document information.
[0192] The specific implementation content of the file storage method of another reference embodiment of the present invention has been described in detail in the above-mentioned file storage method, so the repeated content will not be described again here.
[0193] According to a second aspect of an embodiment of the present invention, a file storage device is provided.
[0194] Figure 8 is a schematic diagram of main modules of a file storage device according to an embodiment of the present invention, such as Figure 8As shown, the file storage device 800 mainly includes:
[0195] An acquisition module 801 is used to determine corresponding document information according to the document identification in response to receiving the document identification, and acquire corresponding storage information according to the document information;
[0196] The storage module 802 is used for determining the to-be-stored file corresponding to the document information in response to receiving the screening request, and storing the to-be-stored file in the storage space corresponding to the storage information;
[0197] The association module 803 is used for, in response to receiving the storage result corresponding to the file to be stored, associating and storing the storage result with the document information.
[0198] According to a reference embodiment of the present invention, determining corresponding document information according to the document identifier includes:
[0199] Generate corresponding token information according to the document identification and real-time timestamp, and generate a corresponding QR code according to the token information;
[0200] In response to receiving the decoding request, the token information corresponding to the QR code is parsed to obtain the document information corresponding to the document identifier.
[0201] According to another reference embodiment of the present invention, the file storage device 800 further includes:
[0202] A determination module, used to determine whether the usage status of the QR code is expired;
[0203] A generating module, configured to cover the QR code and generate corresponding first prompt information when the usage status of the QR code is expired;
[0204] The replacement module is used to generate corresponding new token information according to the document identification and real-time timestamp in response to receiving a refresh request, generate a corresponding new QR code according to the new token information, and use the new QR code to replace the QR code.
[0205] According to another reference embodiment of the present invention, the file storage device 800 further includes:
[0206] The first query module is used to query the usage status of the two-dimensional code according to the token information corresponding to the two-dimensional code in response to receiving the status query request.
[0207] According to another reference embodiment of the present invention, determining the file to be stored corresponding to the document information includes:
[0208] Parsing the screening request to determine the corresponding selected files;
[0209] Determining whether the selected file meets a preset storage condition;
[0210] In the case where the selected file meets the storage condition, the selected file is used as a file to be stored corresponding to the document information;
[0211] When the selected file does not meet the storage condition, corresponding second prompt information is generated.
[0212] According to another reference embodiment of the present invention, the document information includes a current link identifier; the file storage device 800 further includes:
[0213] A determination module is used to determine a corresponding storage condition according to the current link identifier.
[0214] According to a reference embodiment of the present invention, the file storage device 800 further includes:
[0215] The first rendering module is used to perform visual rendering on the document information and the storage conditions.
[0216] According to another reference embodiment of the present invention, the file storage device 800 further includes:
[0217] A first preview module, configured to preview the selected file in response to receiving a first preview request before determining whether the selected file meets a preset storage condition;
[0218] The second preview module is used to preview the file to be stored in response to receiving a second preview request before storing the file to be stored in the storage space corresponding to the storage information.
[0219] According to another reference embodiment of the present invention, the file storage device 800 further includes:
[0220] A first revocation module, configured to remove a first target file corresponding to the first revocation request from the selected file in response to receiving a first revocation request before determining whether the selected file meets a preset storage condition;
[0221] The second revocation module is used for removing a second target file corresponding to the second revocation request from the file to be stored in response to receiving a second revocation request before storing the file to be stored in the storage space corresponding to the storage information.
[0222] According to another reference embodiment of the present invention, the file storage device 800 further includes:
[0223] The second rendering module is used to perform visual rendering on the file to be stored.
[0224] According to another reference embodiment of the present invention, the file storage device 800 further includes:
[0225] The second query module is used to obtain the corresponding target document identifier in response to receiving the result query request, determine the corresponding target document information according to the target document identifier, and query the stored result corresponding to each link identifier included in the target document information.
[0226] It should be noted that the specific implementation content of the file storage device in the embodiment of the present invention has been described in detail in the file storage method described above, so the repeated content will not be described again here.
[0227] According to the technical solution of the embodiment of the present invention, the storage information and the file to be stored are determined according to the document identification, so that the file to be stored and the storage information are associated through the document information; the storage file is directly stored in the corresponding storage space, which can improve the storage efficiency and save system resources; the storage result and the document information are associated and stored, which can facilitate the query and display of the storage result; the corresponding document information is obtained according to the QR code, which can make the document information acquisition more convenient and improve the flexibility of document information acquisition; judging whether the QR code is expired can avoid the QR code and a certain document information from being bound, and improve the security of document information acquisition; determining the corresponding storage conditions according to the current link can enable different environments to upload different files to be stored, and modify the storage conditions according to actual needs, thereby improving the flexibility and universal applicability of file storage; querying the corresponding document information and storage results according to the document identification can facilitate the query of the storage results corresponding to each link and improve the efficiency of information acquisition.
[0228] According to a third aspect of an embodiment of the present invention, there is provided an electronic device for storing files, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided by the first aspect of the embodiment of the present invention.
[0229] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present invention is implemented.
[0230] Fig. 9 An exemplary system architecture 900 is shown to which the file storage method or file storage apparatus according to the embodiment of the present invention can be applied.
[0231] like Fig. 9 As shown, system architecture 900 may include terminal devices 901, 902, 903, network 904 and server 905. Network 904 is used to provide a medium for communication links between terminal devices 901, 902, 903 and server 905. Network 904 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0232] Users can use terminal devices 901, 902, 903 to interact with server 905 through network 904 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 901, 902, 903, such as file storage applications, file transfer applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).
[0233] The terminal devices 901 , 902 , and 903 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0234] The server 905 may be a server that provides various services, such as a background management server (for example only) that supports file storage requests sent by the upstream terminal devices 901, 902, and 903. In response to receiving a document identifier, the background management server may determine the corresponding document information according to the document identifier, and obtain the corresponding storage information according to the document information; in response to receiving a screening request, determine the file to be stored corresponding to the document information, and store the file to be stored in the storage space corresponding to the storage information; in response to receiving a storage result corresponding to the file to be stored, associate the storage result with the document information and store it; and feedback the file storage situation (for example only) to the terminal device.
[0235] It should be noted that the file storage method provided in the embodiment of the present invention is generally executed by the server 905, and accordingly, the file storage device is generally set in the server 905. The file storage method provided in the embodiment of the present invention can also be executed by the terminal devices 901, 902, and 903, and accordingly, the file storage device can be set in the terminal devices 901, 902, and 903.
[0236] It should be understood that Fig. 9 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0237] Reference below Fig.10, which shows a schematic diagram of the structure of a computer system 1000 of a terminal device suitable for implementing an embodiment of the present invention. Fig.10 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0238] like Fig.10 As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the system 1000 are also stored. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0239] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0240] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the central processing unit (CPU) 1001, the above-mentioned functions defined in the system of the embodiment of the present invention are executed.
[0241] It should be noted that the computer-readable medium shown in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In an embodiment of the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0242] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0243] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes an acquisition module, a storage module, and an association module, wherein the names of these modules do not constitute a limitation on the modules themselves under certain circumstances, for example, the acquisition module may also be described as "a module for acquiring corresponding storage information according to document information".
[0244] As another aspect, an embodiment of the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device implements the following method: in response to receiving a document identification, determining the corresponding document information according to the document identification, and obtaining the corresponding storage information according to the document information; in response to receiving a screening request, determining the file to be stored corresponding to the document information, and storing the file to be stored in the storage space corresponding to the storage information; in response to receiving a storage result corresponding to the file to be stored, the storage result and the document information are stored in association.
[0245] According to the technical solution of the embodiment of the present invention, the storage information and the file to be stored are determined according to the document identification, so that the file to be stored and the storage information are associated through the document information; the storage file is directly stored in the corresponding storage space, which can improve the storage efficiency and save system resources; the storage result and the document information are associated and stored, which can facilitate the query and display of the storage result; the corresponding document information is obtained according to the QR code, which can make the document information acquisition more convenient and improve the flexibility of document information acquisition; judging whether the QR code is expired can avoid the QR code and a certain document information from being bound, and improve the security of document information acquisition; determining the corresponding storage conditions according to the current link can enable different environments to upload different files to be stored, and modify the storage conditions according to actual needs, thereby improving the flexibility and universal applicability of file storage; querying the corresponding document information and storage results according to the document identification can facilitate the query of the storage results corresponding to each link and improve the efficiency of information acquisition.
[0246] The above specific implementations do not constitute a limitation on the protection scope of the embodiments of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.
Claims
1. A method for storing files, characterized in that: include: In response to receiving the document identification, determining corresponding document information according to the document identification, and acquiring corresponding storage information according to the document information; In response to receiving the screening request, determining the to-be-stored file corresponding to the document information, and storing the to-be-stored file in the storage space corresponding to the storage information; In response to receiving the storage result corresponding to the file to be stored, the storage result and the document information are stored in association.
2. The method according to claim 1, characterized in that Determining corresponding document information according to the document identifier includes: Generate corresponding token information according to the document identification and real-time timestamp, and generate a corresponding QR code according to the token information; In response to receiving the decoding request, the token information corresponding to the QR code is parsed to obtain the document information corresponding to the document identifier.
3. The method according to claim 2, characterized in that Before storing the file to be stored in the storage space corresponding to the storage information, the method further includes: Determine whether the usage status of the QR code is expired; When the usage status of the QR code is expired, the QR code is covered to generate corresponding first prompt information; In response to receiving a refresh request, corresponding new token information is generated according to the document identification and the real-time timestamp, a corresponding new QR code is generated according to the new token information, and the new QR code is used to replace the QR code.
4. The method according to claim 3, characterized in that The method further comprises: In response to receiving the status query request, the usage status of the QR code is queried according to the token information corresponding to the QR code.
5. The method according to claim 1, characterized in that Determining the file to be stored corresponding to the document information includes: Parsing the screening request to determine the corresponding selected files; Determining whether the selected file meets a preset storage condition; In the case where the selected file meets the storage condition, the selected file is used as a file to be stored corresponding to the document information; When the selected file does not meet the storage condition, corresponding second prompt information is generated.
6. The method according to claim 5, characterized in that The document information includes a current link identifier; before determining whether the selected file meets the preset storage condition, the method further includes: The corresponding storage condition is determined according to the current link identifier.
7. The method according to claim 5, characterized in that The method further comprises: The document information and the storage conditions are visually rendered.
8. The method according to claim 5, characterized in that The method further comprises: Before determining whether the selected file meets the preset storage condition, in response to receiving a first preview request, previewing the selected file; Before storing the file to be stored in the storage space corresponding to the storage information, in response to receiving a second preview request, previewing the file to be stored.
9. The method according to claim 5, characterized in that The method further comprises: Before determining whether the selected file meets the preset storage condition, in response to receiving a first cancellation request, removing a first target file corresponding to the first cancellation request from the selected file; Before storing the file to be stored in the storage space corresponding to the storage information, in response to receiving a second revocation request, removing a second target file corresponding to the second revocation request from the file to be stored.
10. The method according to claim 1, characterized in that After receiving the storage result corresponding to the file to be stored, the method further includes: Perform visual rendering on the file to be stored.
11. The method according to claim 1, characterized in that: The method further comprises: In response to receiving the result query request, a corresponding target document identifier is obtained, corresponding target document information is determined according to the target document identifier, and a stored result corresponding to each link identifier included in the target document information is queried.
12. A file storage device, characterized in that: include: An acquisition module, configured to, in response to receiving a document identifier, determine corresponding document information according to the document identifier, and acquire corresponding storage information according to the document information; A storage module, configured to determine, in response to receiving a screening request, a file to be stored corresponding to the document information, and store the file to be stored in a storage space corresponding to the storage information; The association module is used for, in response to receiving the storage result corresponding to the file to be stored, associating and storing the storage result with the document information.
13. An electronic device, characterized in that: include: One or more processors; A storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 11.
14. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
