Multiple file upload method and related equipment
By calculating the text similarity of the file names, the corresponding relationship between the files and the attachments is automatically determined, which solves the problem of low efficiency of uploading multiple files in the prior art and realizes efficient uploading of multiple files.
Patent Information
- Application Number
- CN202111407679.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2041-11-24
AI Technical Summary
The existing multi-file upload solution requires manual matching and dragging of attachments to the corresponding business fields, resulting in low office efficiency.
By calculating the text similarity of the file names, the one-to-one correspondence between the file and the attachment is automatically determined, and the attachment is uploaded to the upload area of the corresponding target file name.
No manual matching is required, which significantly improves the efficiency of uploading multiple files and enhances the collaborative office capabilities of the office automation system.
Smart Images

Figure CN114153794B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and in particular to a method for uploading multiple files and related devices. Background Art
[0002] Office automation is a new way of working that combines modern office work with computer technology. While there's no single definition, any use of new technologies, machines, and equipment in traditional offices to conduct office work falls under the umbrella of office automation. By implementing office automation, or digital office work, efficiency can be improved while enhancing collaborative work capabilities.
[0003] Digital collaborative office work often requires uploading files to the office automation platform. In the existing upload solution, attachments for each business field are uploaded separately, and the attachments need to be dragged to the attachment area of the corresponding business field.
[0004] When multiple business fields need to upload attachments, they need to be matched manually one by one and the attachments need to be dragged to the corresponding upload area multiple times, which limits office efficiency. Summary of the Invention
[0005] The embodiments of the present application provide a multi-file uploading method and related equipment for improving office efficiency.
[0006] A first aspect of an embodiment of the present application provides a method for uploading multiple files, characterized by comprising:
[0007] Display multiple target file names, where the target file names are used to indicate the files that the user needs to upload;
[0008] In response to a user selecting a plurality of attachments to be uploaded, obtaining the attachment name of each attachment to be uploaded;
[0009] Calculating text similarity between each attachment name and each target file name to obtain a plurality of first text similarities;
[0010] Determining a one-to-one correspondence between the plurality of target file names and the plurality of attachment names based on the plurality of first text similarities;
[0011] Upload the plurality of attachments to be uploaded to the upload area corresponding to the target file name according to the plurality of one-to-one correspondences.
[0012] Optionally, in response to the user selecting a plurality of attachments to be uploaded, obtaining the attachment name of each attachment to be uploaded includes:
[0013] If the attachment to be uploaded is compressed, sending the compressed attachment to the server so that the server decompresses the compressed attachment and obtains the name of the compressed attachment;
[0014] Receiving the name of the compressed attachment sent by the server;
[0015] Get the attachment name of each attachment to be uploaded.
[0016] Optionally, in response to the user selecting a plurality of attachments to be uploaded, obtaining the attachment name of each attachment to be uploaded includes:
[0017] In response to the user dragging the multiple attachments to be uploaded to the attachment area, the attachment name of each attachment to be uploaded is obtained.
[0018] Optionally, after determining a one-to-one correspondence between the plurality of target file names and the plurality of attachment names based on the plurality of first text similarities, and before uploading the plurality of attachments to be uploaded to the upload area corresponding to the target file name based on the plurality of the one-to-one correspondences, the method further includes:
[0019] In response to the user modifying the one-to-one correspondence, determining a target one-to-one correspondence between the plurality of target file names and the plurality of attachment names;
[0020] Uploading the plurality of attachments to be uploaded to the upload area corresponding to the target file name according to the plurality of one-to-one correspondences includes:
[0021] Upload the plurality of attachments to be uploaded to the upload area corresponding to the target file name according to a one-to-one correspondence between the plurality of targets.
[0022] Optionally, determining a one-to-one correspondence between the plurality of target file names and the plurality of attachment names according to the plurality of first text similarities includes:
[0023] Determining a maximum first text similarity from the plurality of first text similarities;
[0024] If the maximum value of the first text similarity is one, determining a one-to-one correspondence between the attachment name corresponding to the maximum value of the first text similarity and the target file name;
[0025] deleting a target first text similarity associated with the first text similarity maximum value from the multiple first text similarities to obtain remaining first text similarities; wherein the association relationship between the first text similarity maximum value and the target first text similarity indicates that the attachment name corresponding to the target first text similarity is the same as the attachment name included in the first text similarity maximum value, or the target file name corresponding to the target first text similarity is the same as the target file name included in the first text similarity maximum value;
[0026] The step of determining the maximum first text similarity from the remaining first text similarities is returned to execution until no remaining first text similarities exist.
[0027] Optionally, after determining the maximum first text similarity from the multiple first text similarities, the method further includes:
[0028] If there are multiple first text similarity maximum values, and the corresponding relationships between each first text similarity maximum value do not overlap, then a one-to-one corresponding relationship between the attachment name and the target file name corresponding to each first text similarity maximum value is determined respectively.
[0029] Optionally, determining a one-to-one correspondence between the plurality of target file names and the plurality of attachment names based on the plurality of first text similarities further includes:
[0030] Determining a maximum first text similarity from the plurality of first text similarities;
[0031] If there are multiple first text similarity maximum values, and the corresponding relationships of the first text similarity maximum values overlap, then calculating the second text similarity between each attachment name and each target file name corresponding to the multiple first text similarity maximum values with overlapping corresponding relationships, the first text similarity and the second text similarity being different types of text similarities;
[0032] If the second maximum text similarity value is one, determining a one-to-one correspondence between the attachment name corresponding to the second maximum text similarity value and the target file name;
[0033] The target first text similarity associated with the second text similarity maximum value is deleted from the multiple first text similarities to obtain remaining first text similarities; wherein the association relationship between the second text similarity maximum value and the target first text similarity indicates that the attachment name corresponding to the target first text similarity is the same as the attachment name included in the second text similarity maximum value, or the target file name corresponding to the target first text similarity is the same as the target file name included in the second text similarity maximum value;
[0034] The step of determining the maximum first text similarity from the remaining first text similarities is returned to execution until no remaining first text similarities exist.
[0035] Optionally, the method further includes:
[0036] Determining a maximum first text similarity from the plurality of first text similarities;
[0037] If there are multiple first text similarity maximum values, and the corresponding relationships of the first text similarity maximum values overlap, then calculating the second text similarity between each attachment name and each target file name corresponding to the multiple first text similarity maximum values with overlapping corresponding relationships, the first text similarity and the second text similarity being different types of text similarities;
[0038] If there are multiple second text similarity maximum values, then for each second text similarity maximum value, determining other attachment names other than the attachment name corresponding to the second text similarity maximum value, determining other file names other than the target file name corresponding to the second text similarity maximum value, and calculating the sum of text similarities between the other attachment names and the other file names, to obtain a text similarity sum corresponding to each second text similarity value;
[0039] A maximum sum value among the plurality of text similarity sum values is determined, and the attachment name and the file name included in the second text similarity corresponding to the maximum sum value are determined to be in a one-to-one correspondence.
[0040] A second aspect of an embodiment of the present application provides a multi-file uploading device, characterized by comprising:
[0041] A display unit, used to display multiple target file names, where the target file names are used to indicate files that the user needs to upload;
[0042] An acquiring unit, configured to respond to a user selecting a plurality of attachments to be uploaded and acquire the attachment name of each of the attachments to be uploaded;
[0043] a calculation unit, configured to calculate text similarity between each attachment name and each target file name to obtain a plurality of first text similarities;
[0044] a determining unit, configured to determine a one-to-one correspondence between the plurality of target file names and the plurality of attachment names based on the plurality of first text similarities;
[0045] The uploading unit is used to upload the plurality of attachments to be uploaded to the upload area corresponding to the target file name according to the plurality of one-to-one correspondences.
[0046] Optionally, the acquiring unit is specifically configured to, if the attachment to be uploaded is compressed, send the compressed attachment to the server so that the server decompresses the compressed attachment and obtains the name of the compressed attachment;
[0047] Receiving the name of the compressed attachment sent by the server;
[0048] Get the attachment name of each attachment to be uploaded.
[0049] Optionally, the acquisition unit is specifically configured to, in response to the user dragging the multiple attachments to be uploaded to the attachment area, acquire the attachment name of each attachment to be uploaded.
[0050] Optionally, after determining the one-to-one correspondences between the plurality of target file names and the plurality of attachment names based on the plurality of first text similarities, and before uploading the plurality of attachments to be uploaded to the upload area corresponding to the target file names based on the plurality of the one-to-one correspondences, the determining unit is further configured to, in response to a modification of the one-to-one correspondence by the user, determine a target one-to-one correspondence between the plurality of target file names and the plurality of attachment names;
[0051] The uploading unit is specifically configured to upload the plurality of attachments to be uploaded to the upload area corresponding to the target file name according to a one-to-one correspondence between the plurality of targets.
[0052] Optionally, the determining unit is specifically configured to determine a maximum first text similarity from the multiple first text similarities;
[0053] If the maximum value of the first text similarity is one, determining a one-to-one correspondence between the attachment name corresponding to the maximum value of the first text similarity and the target file name;
[0054] deleting a target first text similarity associated with the first text similarity maximum value from the multiple first text similarities to obtain remaining first text similarities; wherein the association relationship between the first text similarity maximum value and the target first text similarity indicates that the attachment name corresponding to the target first text similarity is the same as the attachment name included in the first text similarity maximum value, or the target file name corresponding to the target first text similarity is the same as the target file name included in the first text similarity maximum value;
[0055] The step of determining the maximum first text similarity from the remaining first text similarities is returned to execution until no remaining first text similarities exist.
[0056] Optionally, after determining the maximum first text similarity value from the multiple first text similarities, the determination unit is specifically used to, if there are multiple first text similarity maximum values and there is no overlap between the corresponding relationships of each first text similarity maximum value, determine the one-to-one correspondence between the attachment name and the target file name corresponding to each first text similarity maximum value.
[0057] Optionally, the determining unit is further configured to determine a maximum first text similarity from the multiple first text similarities;
[0058] If there are multiple first text similarity maximum values, and the corresponding relationships of the first text similarity maximum values overlap, then calculating the second text similarity between each attachment name and each target file name corresponding to the multiple first text similarity maximum values with overlapping corresponding relationships, the first text similarity and the second text similarity being different types of text similarities;
[0059] If the second maximum text similarity value is one, determining a one-to-one correspondence between the attachment name corresponding to the second maximum text similarity value and the target file name;
[0060] The target first text similarity associated with the second text similarity maximum value is deleted from the multiple first text similarities to obtain remaining first text similarities; wherein the association relationship between the second text similarity maximum value and the target first text similarity indicates that the attachment name corresponding to the target first text similarity is the same as the attachment name included in the second text similarity maximum value, or the target file name corresponding to the target first text similarity is the same as the target file name included in the second text similarity maximum value;
[0061] The step of determining the maximum first text similarity from the remaining first text similarities is returned to execution until no remaining first text similarities exist.
[0062] Optionally, the determining unit is further configured to determine a maximum first text similarity from the multiple first text similarities;
[0063] If there are multiple first text similarity maximum values, and the corresponding relationships of the first text similarity maximum values overlap, then calculating the second text similarity between each attachment name and each target file name corresponding to the multiple first text similarity maximum values with overlapping corresponding relationships, the first text similarity and the second text similarity being different types of text similarities;
[0064] If there are multiple second text similarity maximum values, then for each second text similarity maximum value, determining other attachment names other than the attachment name corresponding to the second text similarity maximum value, determining other file names other than the target file name corresponding to the second text similarity maximum value, and calculating the sum of text similarities between the other attachment names and the other file names, to obtain a text similarity sum corresponding to each second text similarity value;
[0065] A maximum sum value among the plurality of text similarity sum values is determined, and the attachment name and the file name included in the second text similarity corresponding to the maximum sum value are determined to be in a one-to-one correspondence.
[0066] A third aspect of an embodiment of the present application provides a computer device, characterized by comprising:
[0067] CPU, memory and input / output interfaces;
[0068] The memory is a transient storage memory or a persistent storage memory;
[0069] The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method described in the first aspect.
[0070] A fourth aspect of an embodiment of the present application provides a computer storage medium, characterized in that instructions are stored in the computer storage medium, and when the instructions are executed on a computer, the computer executes the method described in the first aspect.
[0071] A fifth aspect of the embodiments of the present application provides a computer program product comprising instructions, characterized in that when the computer program product is run on a computer, the computer is caused to execute the method described in the first aspect.
[0072] It can be seen from the above technical solution that the embodiment of the present application has the following advantages: the one-to-one correspondence between the target file name and the attachment name is determined based on the first text similarity, and the attachment to be uploaded is uploaded to the upload area of the corresponding target file name according to the correspondence, without the need for manual matching and uploading one by one, which greatly improves the efficiency of uploading multiple files and improves office efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 This is a flow chart of the method for uploading multiple files according to an embodiment of the present application;
[0074] Figure 2 This is an interface diagram of the method for uploading multiple files in an embodiment of the present application;
[0075] Figure 3 This is another interface diagram of the multi-file uploading method according to an embodiment of the present application;
[0076] Figure 4 This is another interface diagram of the multi-file uploading method according to an embodiment of the present application;
[0077] Figure 5 This is a structural diagram of the multi-file upload device according to an embodiment of the present application;
[0078] Figure 6 This is another structural diagram of the multi-file upload device according to an embodiment of the present application. DETAILED DESCRIPTION
[0079] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0080] The embodiment of the present application provides a method for uploading multiple files to improve office efficiency.
[0081] See also Figure 1 , an embodiment of the present application provides a method for uploading multiple files, including:
[0082] 101. Display multiple target file names, where the target file names are used to indicate files that the user needs to upload.
[0083] Before uploading a file, it is necessary to obtain multiple target file names from the server to display them to the user, and at the same time facilitate the user to select multiple attachments to be uploaded based on the multiple target file names displayed on the interface.
[0084] 102. In response to the user selecting multiple attachments to be uploaded, obtain the attachment name of each attachment to be uploaded.
[0085] After the user selects multiple attachments to be uploaded according to multiple target file names displayed on the user interface, the attachment name of each attachment to be uploaded is obtained in response to the user operation.
[0086] In actual application, the multiple attachments to be uploaded that the user drags to the attachment area may be in one or more folders. In addition, the number of attachments to be uploaded obtained may be greater than, less than, or equal to the number of target file names, which is not specifically limited here.
[0087] 103. Calculate text similarity between each attachment name and each target file name to obtain multiple first text similarities.
[0088] Text similarity is calculated based on the multiple target file names obtained in step 101 and the multiple attachment names obtained in step 102. Specifically, the text similarity between each attachment name and each target file name is calculated to obtain a first text similarity between each attachment name and each target file name. In practical applications, the text similarity calculated can be Jaccard similarity, cosine similarity, or Levenshtein distance, etc., which is not limited here.
[0089] 104. Determine a one-to-one correspondence between the multiple target file names and the multiple attachment names based on the multiple first text similarities.
[0090] The higher the first similarity, the higher the similarity between the target file name and the attachment name corresponding to the first similarity, and the higher the matching degree is considered. Therefore, the one-to-one correspondence between each target file name and the corresponding attachment name can be determined based on the size of the first text similarity.
[0091] 105. Upload multiple attachments to be uploaded to the upload area corresponding to the target file name according to multiple one-to-one correspondences.
[0092] After determining multiple one-to-one correspondences, the attachments to be uploaded can be uploaded to the upload area corresponding to the target file name according to the correspondences and stored in the server.
[0093] In actual application, the attachments to be uploaded can be sent to the server before the corresponding relationship is determined, and then the attachments to be uploaded can be stored in the upload area of the corresponding target file name after all the corresponding relationships are determined; or the attachments to be uploaded can be sent to the server after the corresponding relationship is determined and stored in the upload area of the corresponding target file name.
[0094] In an embodiment of the present application, the one-to-one correspondence between the target file name and the attachment name can be determined based on the first text similarity, and the attachment to be uploaded can be uploaded to the upload area of the corresponding target file name based on the correspondence. There is no need for manual matching and uploading one by one, which greatly improves the efficiency of uploading multiple files.
[0095] In a specific embodiment, the aforementioned step 104 is specifically implemented as follows:
[0096] Determine a maximum first text similarity from multiple first text similarities; if there is one maximum first text similarity, determine a one-to-one correspondence between the attachment name corresponding to the maximum first text similarity and the target file name; if there are multiple maximum first text similarity values and the correspondences between each maximum first text similarity value do not overlap, determine a one-to-one correspondence between the attachment name corresponding to each maximum first text similarity value and the target file name; delete the target first text similarity associated with the maximum first text similarity from the multiple first text similarities to obtain remaining first text similarities; wherein the association between the maximum first text similarity and the target first text similarity indicates that the attachment name corresponding to the target first text similarity is the same as the attachment name included in the maximum first text similarity value, or the target file name corresponding to the target first text similarity is the same as the target file name included in the maximum first text similarity value; return to the step of determining the maximum first text similarity from the remaining first text similarities until no remaining first text similarities exist.
[0097] Alternatively, a maximum first text similarity is determined from multiple first text similarities; if there are multiple maximum first text similarity values and the corresponding relationships of the maximum first text similarity values overlap, a second text similarity is calculated between each attachment name and each target file name corresponding to the multiple maximum first text similarity values with overlapping corresponding relationships, where the first text similarity and the second text similarity are different types of text similarities; if there is one maximum second text similarity value, a one-to-one correspondence is determined between the attachment name corresponding to the maximum second text similarity value and the target file name; the target first text similarity associated with the maximum second text similarity value is deleted from the multiple first text similarities to obtain remaining first text similarities; wherein the association relationship between the maximum second text similarity value and the target first text similarity indicates that the attachment name corresponding to the target first text similarity value is the same as the attachment name included in the maximum second text similarity value, or the target file name corresponding to the target first text similarity value is the same as the target file name included in the maximum second text similarity value; and the step of determining the maximum first text similarity value from the remaining first text similarities is returned to and executed until no remaining first text similarities exist.
[0098] Alternatively, a maximum first text similarity is determined from multiple first text similarities; if there are multiple first text similarity maximum values, and the corresponding relationships of the first text similarity maximum values overlap, then the second text similarity between each attachment name and each target file name corresponding to the multiple first text similarity maximum values with overlapping corresponding relationships is calculated, and the first text similarity and the second text similarity are different types of text similarities; if there are multiple second text similarity maximum values, then for each second text similarity maximum value, other attachment names other than the attachment name corresponding to the second text similarity maximum value are determined, other file names other than the target file name corresponding to the second text similarity maximum value are determined, and the sum of the text similarities between the other attachment names and the other file names is calculated to obtain the text similarity sum value corresponding to each second text similarity; the maximum sum value among the multiple text similarity sum values is determined, and the attachment name and file name contained in the second text similarity corresponding to the maximum sum value are determined to be in a one-to-one correspondence.
[0099] Specifically, after calculating multiple first text similarities, all first text similarities are traversed to obtain the current maximum first text similarity value. The following situations may occur when determining the current maximum first text similarity value:
[0100] 1) There is only one first text similarity equal to the maximum value, that is, a one-to-one correspondence between the target file name and the attachment name indicated by the first text similarity is determined;
[0101] 2) There are multiple first text similarities equal to the maximum value, and the one-to-one correspondences between the target file name and the attachment name of each first text similarity indication equal to the maximum value do not overlap, that is, a one-to-one correspondence between the target file name and the attachment name of each first text similarity indication equal to the maximum value is determined;
[0102] 3) There are multiple first text similarities equal to the maximum value, and the one-to-one correspondence between the target file name and the attachment name indicated by each first text similarity equal to the maximum value overlaps.
[0103] For example, if the first text similarities between a target file name and two different attachment names are both equal to the maximum value, the second text similarities between the target file name and the two different attachment names are calculated respectively.
[0104] If the two second text similarities are different, the one-to-one correspondence between the target file name and the attachment name indicated by the larger second text similarity is determined, which is the correspondence of the aforementioned target file name; if the two second text similarities are the same, the maximum value of the sum of the text similarities obtained by respectively calculating the subsequent correspondences between the target file name and the two attachment names to determine the one-to-one correspondence according to cases 1) to 3, and the one-to-one correspondence indicated by the maximum value of the sum of the text similarities is determined.
[0105] After completing the verification of the current maximum text similarity value, the target first text similarity associated with the first maximum text similarity value is removed, and the next maximum first text similarity value is verified. This loop ends when no target file names and attachment names with unconfirmed corresponding relationships exist. The target first text similarity value refers to the first text similarity value associated with the first maximum text similarity value or the second maximum text similarity value.
[0106] In actual situations, if the user is not satisfied with the determined correspondence, the user can also drag the attachment to adjust the correspondence.
[0107] In the embodiments of the present application, various situations and specific implementation methods that may occur when determining the corresponding relationship are provided, thereby improving the feasibility of the solution.
[0108] In a specific embodiment, step 102 is also implemented as follows: if multiple attachments to be uploaded include compressed attachments, the compressed attachments are sent to the server so that the server decompresses the compressed attachments and obtains the names of the compressed attachments; the names of the compressed attachments sent by the server are received; and the attachment names of each attachment to be uploaded are obtained.
[0109] Specifically, if the multiple attachments to be uploaded that the user drags to the attachment area in step 102 include compressed attachments, the compressed attachments can be sent to the server so that the server can decompress the compressed attachments. Then, the attachment name of the compressed attachment sent by the server is received, and the attachment name of each attachment to be uploaded can be obtained and used for subsequent text similarity calculation.
[0110] In a specific embodiment, step 102 is also implemented in the following manner: in response to the user dragging multiple attachments to be uploaded to the attachment area, the attachment name of each attachment to be uploaded is obtained.
[0111] Specifically, when a user drags multiple attachments to be uploaded to the attachment area, the attachment names of the multiple attachments to be uploaded are obtained in response to the user's operation. The attachment area can be unique. In actual applications, when a user selects multiple attachments to be uploaded, they can directly select multiple attachments to be uploaded from multiple files displayed in a pop-up window by clicking to select or dragging them to the attachment area. The method for the user to select multiple attachments to be uploaded in step 102 is not specifically limited herein.
[0112] The following is a specific embodiment, combined with the actual business process, to describe the method for uploading multiple files in this application:
[0113] First, the user drags the attachment to be uploaded into the attachment area. If it's a compressed file, it's sent to the server, which returns a list of decompressed attachment names. If it's not a compressed file, the name of the dragged attachment is displayed directly. Next, the target file name is obtained and assigned to array A[M], and the attachment names of the attachments to be uploaded are assigned to array B[N]. If the attachment names already exist, the user is prompted to modify them.
[0114] Next, the Jaccard similarity is calculated for each item in the array A[M] and the array B[N] to obtain a two-dimensional array J[M][N] that stores the Jaccard similarity. The two-dimensional array J[M][N] contains the Jaccard similarity between each item in the array A[M] and each item in the array B[N].
[0115] Traverse J[M][N] and get the maximum value of the current Jaccard similarity. There are several specific cases:
[0116] 1) There is only one J[M][N] that is equal to the maximum value, which is J[i][j], so the one-to-one correspondence between A[i] and B[j] is determined;
[0117] 2) There are multiple J[M][N] equal to the maximum value, and there is no intersection between multiple J[M][N], for example, J[i][j] and J[l][m], then determine the one-to-one correspondence between A[i] and B[j] and between A[l] and B[m].
[0118] 3) There are multiple J[M][N] that are equal to the maximum value, and there are intersections between the multiple J[M][N], such as J[i][j] and J[i][m]. The Levenshtein distance of the two is calculated to determine whether A[i] corresponds to B[j] or B[m]. If the two Levenshtein distances are also the same, then the subsequent correspondences after the correspondence between A[i] and B[j] and the correspondence between A[i] and B[m] are calculated according to the above rules. The maximum value of the sum of the obtained text similarities is determined. If the maximum value of the sum of the text similarities indicates that A[i] corresponds to B[j], then a one-to-one correspondence between A[i] and B[j] is determined.
[0119] After completing the determination of the maximum value of a text similarity and the confirmation of the subsequent correspondence, skip the text similarities that indicate all A[M] and all B[N] for which the correspondence has been confirmed, determine the maximum value of the remaining text similarities except the skipped text similarities, and confirm the correspondence according to the aforementioned rules until there are no A[M] and B[N] without a correspondence at the same time.
[0120] Then, according to the corresponding relationship, the attachment is stored in the upload area of the corresponding target file name to complete the upload.
[0121] In actual applications, after completing the aforementioned correspondence confirmation process, users can also drag and adjust the position of the attachment according to the actual matching situation to modify the one-to-one correspondence between the target file name and the attachment name. For example, in response to the user's modification of the one-to-one correspondence, a target one-to-one correspondence between multiple target file names and multiple attachment names is determined; and multiple attachments to be uploaded are uploaded to the upload area corresponding to the target file name according to the multiple target one-to-one correspondences. Please refer to Figure 4 Specifically, after completing the above-mentioned corresponding relationship confirmation process, the user can observe the following Figure 4 In the interface shown, the user can drag the attachments to be uploaded in the middle column to modify the one-to-one correspondence.
[0122] If the user modifies the one-to-one correspondence, the target one-to-one correspondence modified by the user will be used as the final basis, and the attachment will be stored in the upload area of the corresponding target file name according to the correspondence to complete the upload.
[0123] The above description is about the actual process of the method for uploading multiple files in a specific embodiment. Figure 2 、 Figure 3 and Figure 4 , the following describes the service uploading method of the embodiment of the present application in combination with the actual interface scenario:
[0124] When multiple files need to be uploaded, users can observe the following Figure 2The leftmost column of the interface shows the target file name obtained from the server, which is used to instruct the user to select the attachment to be uploaded. The user drags the attachment to be uploaded to the attachment area according to the target file name displayed on the interface. Figure 2 The part shown in the dotted box.
[0125] When the attachment to be uploaded is dragged to the attachment area, the user can see the following Figure 3 In the interface shown, the upload area displays the name and size of the attachment to be uploaded, and informs the user that the corresponding relationship is being determined.
[0126] After the matching is completed, the following Figure 4 In the interface shown, the second column from the left shows the attachment name and size of each attachment to be uploaded. The attachment name is in the same row as the target file name in the first column from the left. This completes the matching process, and the attachment has been uploaded to the upload area for the target file name.
[0127] See also Figure 5 , the embodiment of the present application provides a multi-file uploading device, comprising
[0128] The display unit 501 is used to display multiple target file names, where the target file names are used to indicate the files that the user needs to upload;
[0129] The acquisition unit 502 is configured to acquire the attachment name of each attachment to be uploaded in response to the user selecting multiple attachments to be uploaded;
[0130] A calculation unit 503 is configured to calculate text similarity between each attachment name and each target file name to obtain a plurality of first text similarities;
[0131] A determining unit 504 is configured to determine a one-to-one correspondence between a plurality of target file names and a plurality of attachment names based on the plurality of first text similarities;
[0132] The uploading unit 505 is configured to upload multiple attachments to be uploaded to the upload area corresponding to the target file name according to multiple one-to-one correspondences.
[0133] Optionally, the acquiring unit 502 is specifically configured to, if the attachment to be uploaded is compressed, send the compressed attachment to the server so that the server decompresses the compressed attachment and obtains the name of the compressed attachment;
[0134] Receiving the name of the compressed attachment sent by the server;
[0135] Get the attachment name of each attachment to be uploaded.
[0136] Optionally, the acquiring unit 502 is specifically configured to acquire the attachment name of each attachment to be uploaded in response to the user dragging the multiple attachments to be uploaded to the attachment area.
[0137] Optionally, after determining the one-to-one correspondences between the multiple target file names and the multiple attachment names based on the multiple first text similarities, and before uploading the multiple attachments to be uploaded to the upload area corresponding to the target file names based on the multiple one-to-one correspondences, the determining unit 504 is further configured to, in response to the user modifying the one-to-one correspondences, determine the target one-to-one correspondences between the multiple target file names and the multiple attachment names;
[0138] The uploading unit 505 is specifically configured to upload the plurality of attachments to be uploaded to the upload area corresponding to the target file name according to a one-to-one correspondence between the plurality of targets.
[0139] Optionally, the determining unit 504 is specifically configured to determine a maximum first text similarity from the multiple first text similarities;
[0140] If the maximum value of the first text similarity is one, determining a one-to-one correspondence between the attachment name corresponding to the maximum value of the first text similarity and the target file name;
[0141] deleting a target first text similarity associated with the first text similarity maximum value from the multiple first text similarities to obtain remaining first text similarities; wherein the association relationship between the first text similarity maximum value and the target first text similarity indicates that the attachment name corresponding to the target first text similarity is the same as the attachment name included in the first text similarity maximum value, or the target file name corresponding to the target first text similarity is the same as the target file name included in the first text similarity maximum value;
[0142] The step of determining the maximum first text similarity from the remaining first text similarities is returned to execution until no remaining first text similarities exist.
[0143] Optionally, after determining the maximum first text similarity value from the multiple first text similarities, the determination unit 504 is specifically used to, if there are multiple first text similarity maximum values and there is no overlap between the corresponding relationships of each first text similarity maximum value, determine the one-to-one correspondence between the attachment name and the target file name corresponding to each first text similarity maximum value.
[0144] Optionally, the determining unit 504 is further configured to determine a maximum first text similarity from the multiple first text similarities;
[0145] If there are multiple first text similarity maximum values, and the corresponding relationships of the first text similarity maximum values overlap, then calculating the second text similarity between each attachment name and each target file name corresponding to the multiple first text similarity maximum values with overlapping corresponding relationships, the first text similarity and the second text similarity being different types of text similarities;
[0146] If the second maximum text similarity value is one, determining a one-to-one correspondence between the attachment name corresponding to the second maximum text similarity value and the target file name;
[0147] The target first text similarity associated with the second text similarity maximum value is deleted from the multiple first text similarities to obtain remaining first text similarities; wherein the association relationship between the second text similarity maximum value and the target first text similarity indicates that the attachment name corresponding to the target first text similarity is the same as the attachment name included in the second text similarity maximum value, or the target file name corresponding to the target first text similarity is the same as the target file name included in the second text similarity maximum value;
[0148] The step of determining the maximum first text similarity from the remaining first text similarities is returned to execution until no remaining first text similarities exist.
[0149] Optionally, the determining unit 504 is further configured to determine a maximum first text similarity from the multiple first text similarities;
[0150] If there are multiple first text similarity maximum values, and the corresponding relationships of the first text similarity maximum values overlap, then calculating the second text similarity between each attachment name and each target file name corresponding to the multiple first text similarity maximum values with overlapping corresponding relationships, the first text similarity and the second text similarity being different types of text similarities;
[0151] If there are multiple second text similarity maximum values, then for each second text similarity maximum value, determining other attachment names other than the attachment name corresponding to the second text similarity maximum value, determining other file names other than the target file name corresponding to the second text similarity maximum value, and calculating the sum of text similarities between the other attachment names and the other file names, to obtain a text similarity sum corresponding to each second text similarity value;
[0152] A maximum sum value among the plurality of text similarity sum values is determined, and the attachment name and the file name included in the second text similarity corresponding to the maximum sum value are determined to be in a one-to-one correspondence.
[0153] In an embodiment of the present application, the determination unit 504 can determine the one-to-one correspondence between the target file name and the attachment name based on the first text similarity, and then the uploading unit 505 uploads the attachment to be uploaded to the upload area of the corresponding target file name according to the correspondence, without the need for manual matching and uploading one by one, which greatly improves the efficiency of uploading multiple files.
[0154] Figure 6 6 is a schematic diagram of a computer device structure provided in an embodiment of the present application. The computer device 600 may include one or more central processing units (CPU) 601 and a memory 605. The memory 605 stores one or more application programs or data.
[0155] Memory 605 may be volatile or persistent storage. The program stored in memory 605 may include one or more modules, each of which may include a series of instruction operations on the computer device. Furthermore, CPU 601 may be configured to communicate with memory 605 and execute the series of instruction operations in memory 605 on computer device 600.
[0156] The computer device 600 may also include one or more power supplies 602, one or more wired or wireless network interfaces 603, one or more input and output interfaces 604, and / or one or more operating systems, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0157] The CPU 601 can execute the aforementioned Figures 1 to 5 The operations performed by the computer device in the illustrated embodiment will not be described in detail here.
[0158] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0159] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0160] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0161] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0162] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk, and other media that can store program code.
Claims
1. A method for uploading multiple files, characterized in that: include: Display multiple target file names, where the target file names are used to indicate the files that the user needs to upload; In response to a user selecting a plurality of attachments to be uploaded, obtaining the attachment name of each attachment to be uploaded; Calculating text similarity between each attachment name and each target file name to obtain a plurality of first text similarities; Determining a one-to-one correspondence between the plurality of target file names and the plurality of attachment names based on the plurality of first text similarities; Uploading the plurality of attachments to be uploaded to the upload area corresponding to the target file name according to the plurality of one-to-one correspondences; The determining, based on the plurality of first text similarities, a one-to-one correspondence between the plurality of target file names and the plurality of attachment names further comprises: Determining a maximum first text similarity from the plurality of first text similarities; If there are multiple first text similarity maximum values, and the corresponding relationships of the first text similarity maximum values overlap, then calculating the second text similarity between each attachment name and each target file name corresponding to the multiple first text similarity maximum values with overlapping corresponding relationships, the first text similarity and the second text similarity being different types of text similarities; If the second maximum text similarity value is one, determining a one-to-one correspondence between the attachment name corresponding to the second maximum text similarity value and the target file name; Deleting the target first text similarity associated with the second text similarity maximum value from the multiple first text similarities to obtain remaining first text similarities; The step of determining the maximum first text similarity from the remaining first text similarities is returned to execution until no remaining first text similarities exist.
2. The method for uploading multiple files according to claim 1, wherein: In response to the user selecting multiple attachments to be uploaded, obtaining the attachment name of each attachment to be uploaded includes: If the attachment to be uploaded is compressed, sending the compressed attachment to the server so that the server decompresses the compressed attachment and obtains the name of the compressed attachment; Receiving the name of the compressed attachment sent by the server; Get the attachment name of each attachment to be uploaded.
3. The method for uploading multiple files according to claim 1, wherein: In response to the user selecting multiple attachments to be uploaded, obtaining the attachment name of each attachment to be uploaded includes: In response to the user uploading the multiple attachments to be uploaded to the attachment area, the attachment name of each attachment to be uploaded is obtained.
4. The method for uploading multiple files according to claim 1, wherein: After determining a one-to-one correspondence between the plurality of target file names and the plurality of attachment names based on the plurality of first text similarities, and before uploading the plurality of attachments to be uploaded to the upload area corresponding to the target file name based on the plurality of the one-to-one correspondences, the method further includes: In response to the user modifying the one-to-one correspondence, determining a target one-to-one correspondence between the plurality of target file names and the plurality of attachment names; Uploading the plurality of attachments to be uploaded to the upload area corresponding to the target file name according to the plurality of one-to-one correspondences includes: Upload the plurality of attachments to be uploaded to the upload area corresponding to the target file name according to a one-to-one correspondence between the plurality of targets.
5. The method for uploading multiple files according to claim 1, wherein: Determining a one-to-one correspondence between the plurality of target file names and the plurality of attachment names according to the plurality of first text similarities includes: Determining a maximum first text similarity from the plurality of first text similarities; If the maximum value of the first text similarity is one, determining a one-to-one correspondence between the attachment name corresponding to the maximum value of the first text similarity and the target file name; deleting a target first text similarity associated with the first text similarity maximum value from the multiple first text similarities to obtain remaining first text similarities; wherein the association relationship between the first text similarity maximum value and the target first text similarity indicates that the attachment name corresponding to the target first text similarity is the same as the attachment name included in the first text similarity maximum value, or the target file name corresponding to the target first text similarity is the same as the target file name included in the first text similarity maximum value; The step of determining the maximum first text similarity from the remaining first text similarities is returned to execution until no remaining first text similarities exist.
6. The method for uploading multiple files according to claim 5, wherein: After determining the maximum first text similarity from the plurality of first text similarities, the method further includes: If there are multiple first text similarity maximum values, and the corresponding relationships between each first text similarity maximum value do not overlap, then a one-to-one corresponding relationship between the attachment name and the target file name corresponding to each first text similarity maximum value is determined respectively.
7. The method for uploading multiple files according to claim 1, wherein: The association relationship between the second text similarity maximum value and the target first text similarity indicates that the attachment name corresponding to the target first text similarity is the same as the attachment name included in the second text similarity maximum value, or the target file name corresponding to the target first text similarity is the same as the target file name included in the second text similarity maximum value.
8. The method for uploading multiple files according to claim 1, wherein: The method further comprises: If there are multiple second text similarity maximum values, then for each second text similarity maximum value, determining other attachment names other than the attachment name corresponding to the second text similarity maximum value, determining other file names other than the target file name corresponding to the second text similarity maximum value, and calculating the sum of text similarities between the other attachment names and the other file names, to obtain a text similarity sum corresponding to each second text similarity value; A maximum sum value among the plurality of text similarity sum values is determined, and the attachment name and the file name included in the second text similarity corresponding to the maximum sum value are determined to be in a one-to-one correspondence.
9. A multi-file uploading device, characterized in that: include: A display unit, used to display multiple target file names, where the target file names are used to indicate files that the user needs to upload; An acquiring unit, configured to respond to a user selecting a plurality of attachments to be uploaded and acquire the attachment name of each of the attachments to be uploaded; a calculation unit, configured to calculate text similarity between each attachment name and each target file name to obtain a plurality of first text similarities; a determining unit, configured to determine a one-to-one correspondence between the plurality of target file names and the plurality of attachment names based on the plurality of first text similarities; An uploading unit, configured to upload a plurality of attachments to be uploaded to an upload area corresponding to a target file name according to a plurality of one-to-one correspondences; The determining unit is specifically configured to: determine a maximum first text similarity from the multiple first text similarities; if there are multiple first text similarity maximum values and the correspondences of the first text similarity maximum values overlap, calculate a second text similarity between each attachment name and each target file name corresponding to the multiple first text similarity maximum values whose correspondences overlap, where the first text similarities and the second text similarities are different types of text similarities; if there is one second text similarity maximum value, determine a one-to-one correspondence between the attachment name and the target file name corresponding to the second text similarity maximum value; delete the target first text similarity associated with the second text similarity maximum value from the multiple first text similarities to obtain remaining first text similarities; and return to the step of determining the maximum first text similarity from the remaining first text similarities until no remaining first text similarities exist.
10. A computer device, characterized in that: include: CPU, memory and input / output interfaces; The memory is a transient storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method according to any one of claims 1 to 8.
11. A computer storage medium, characterized in that The computer storage medium stores instructions, which, when executed on a computer, enable the computer to perform the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Bilingual alignment method, device and system
CN109710950A
File processing method and system, computer equipment and storage medium
CN110209633A
File importing and filing method, electronic equipment and storage medium
CN111611211A