File sorting method, file sorting device, electronic device and storage medium

Based on the type and content of the receiving files, the problem of uncertain sequence of the reception of multiple files was solved, the user experience was improved, and the file sequence was achieved reasonably.

CN113641635BActive Publication Date: 2025-01-28VIVO MOBILE COMM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110898274.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-05
Publication Date
2025-01-28
Estimated Expiration
2041-08-05

AI Technical Summary

Technical Problem

In the real-time communication program, the order of reception of multiple files is uncertain, resulting in the files sent by users in a fixed order being received out of order during reception, which makes the user experience poor.

Method used

By determining the type of file received, and sorting according to the start content and end content of each file, the file is automatically sorted according to the adjacent nature to ensure that the file sequence is consistent with the order of the user read the file.

Benefits of technology

The automatic sorting of multiple files received by the receipts has improved, and the user experience is improved, so that the file sequence is in line with the user's reading order.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113641635B_ABST
    Figure CN113641635B_ABST
Patent Text Reader

Abstract

The present application discloses a file sorting method, a file sorting device, an electronic device and a storage medium, which belongs to the technical field of electronic devices. The file sorting method comprises: when N files are received, determining the file types of the N files; when M files among the N files have the same file type, determining the starting content and ending content of each file in the M files according to the file type of the M files; and sorting the M files according to the starting content and the ending content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of electronic equipment, and specifically relates to a file sorting method, a file sorting device, an electronic device and a storage medium. Background Art

[0002] In the related art, for real-time communication programs, users can send or receive multiple files at one time. However, due to different actual conditions such as network environment and file size, the order in which multiple files are received is uncertain, resulting in files sent by users in a fixed order being received out of order, resulting in a poor user experience. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a file sorting method, a file sorting device, an electronic device and a storage medium, which can automatically sort multiple received files and optimize the user experience.

[0004] In a first aspect, an embodiment of the present application provides a file sorting method, comprising:

[0005] When N files are received, determining the file types of the N files;

[0006] When M of the N files have the same file type, the start content and the end content of each of the M files are determined according to the file type of the M files;

[0007] Sort the M files according to their starting and ending contents.

[0008] In a second aspect, a file sorting device according to an embodiment of the present application includes:

[0009] An acquisition module, used for determining the file types of the N files when N files are received;

[0010] A determination module, used for determining the start content and the end content of each file in the M files according to the file types of the M files when M files in the N files have the same file types;

[0011] The sorting module is used to sort the M files according to the starting content and the ending content.

[0012] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method of the first aspect.

[0013] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.

[0014] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the steps of the method of the first aspect.

[0015] In the embodiment of the present application, the files of the same type are classified according to the types of the received multiple files, and based on the specific contents of the received files, specifically, based on the starting content and ending content of each file, it is determined whether two files are "adjacent" files. Among them, if the starting content of a file is similar or continuous to the ending content of another file of the same type, it can be determined that the two files are adjacent files. Therefore, according to the starting content and the ending content, the received multiple files are automatically sorted, and the obtained file sequence is consistent with the order in which the user reads the files, which effectively improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flowchart of a file sorting method according to an embodiment of the present application is shown;

[0017] Figure 2 One of the interface schematic diagrams of the file sorting method according to an embodiment of the present application is shown;

[0018] Figure 3 A second interface schematic diagram of the file sorting method according to an embodiment of the present application is shown;

[0019] Figure 4 A structural block diagram of a file sorting device according to an embodiment of the present application is shown;

[0020] Figure 5 A structural block diagram of an electronic device according to an embodiment of the present application is shown;

[0021] Figure 6 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0023] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0024] The following, in conjunction with the accompanying drawings, describes in detail the file sorting method, file sorting device, electronic device and storage medium provided in the embodiments of the present application through specific embodiments and their application scenarios.

[0025] In some embodiments of the present application, a file sorting method is provided. Figure 1 A flowchart of a file sorting method according to an embodiment of the present application is shown. Figure 1 As shown, the method includes:

[0026] Step 102, when N files are received, determine the file types of the N files;

[0027] Step 104, when M files among the N files have the same file type, determine the start content and end content of each file among the M files according to the file type of the M files;

[0028] Step 106, sorting the M files according to the start content and the end content.

[0029] In an embodiment of the present application, one or more files may be received through social software, file transfer software, download software, or sharing software. If N files are received at one time, the file types of the N files are further determined. Among them, if the receiving interval between any two consecutively received files among the N files is less than a preset interval threshold, then the N files are considered to be received "at one time".

[0030] If among the N received files, M files have the same file type, such as the file types of the M files are all documents, or the file types of the M files are all audios, or the file types of the M files are all videos, etc., then the M files are sorted according to the starting content and the ending content of the M files.

[0031] Specifically, Figure 2 One of the interface schematic diagrams of the file sorting method according to an embodiment of the present application is shown, Figure 3The second interface diagram of the file sorting method according to the embodiment of the present application is shown as follows: Figure 2 As shown, the user receives three text documents, and names the three documents as file 1, file 2, and file 3 according to the order in which they are received. After receiving these documents, the three documents can be sorted automatically according to the user's settings, or they can be sorted by specific user input, such as clicking a "sort" button, or "shaking", such as shaking the phone. After sorting, Figure 3 As shown, the three documents will form a new file sequence according to their respective starting content and ending content. For example, the order of the three files after sorting is file 3, file 1, and file 2.

[0032] Among them, when sorting, the starting content of file A and the ending content of file B can be used to determine whether they are continuous content based on the similarity, correlation and other information between the starting content of file A and the ending content of file B. If the judgment result is yes, that is, the starting content of file A and the ending content of file B are continuous content, it means that the beginning of file A should be adjacent to the end of the file, and file A is sorted sequentially after file B. If the judgment result is no, that is, the starting content of file A and the ending content of file B are not continuous, then continue to obtain file C, file D, etc. until the sorting is completed.

[0033] Through the file sorting method of the embodiment of the present application, the obtained file sequence conforms to the user's reading sequence, that is, the user can continuously obtain the specific content in the file without manual sorting.

[0034] The embodiment of the present application classifies the files of the same type according to the types of the received multiple files, and judges whether two files are "adjacent" files based on the specific contents of the received files, specifically the starting content and the ending content of each file. If the starting content of a file is similar or continuous to the ending content of another file of the same type, it can be judged that the two files are adjacent files. Therefore, according to the starting content and the ending content, the received multiple files are automatically sorted, and the obtained file sequence is consistent with the order in which the user reads the files, which effectively improves the user experience.

[0035] In some embodiments of the present application, the file type is a document;

[0036] According to the file types of the M files, the start content and the end content of each of the M files are determined respectively, including:

[0037] Determine the start statement and the end statement in each of the M files;

[0038] Sort M files according to the starting content and ending content, including:

[0039] Perform semantic recognition on the starting sentence and the ending sentence to obtain the semantic correlation between each starting sentence and each ending sentence;

[0040] M files are sorted so that the first document and the second document in the M files are arranged in order, wherein the correlation between the target ending sentence corresponding to the first document and the target starting sentence corresponding to the second document is higher than the correlation between the target ending sentence and the starting sentences of all the third documents in the M files.

[0041] Optionally, the third document is a document in the M files other than the first document and the second document, and is different from the first document and the second document, and the first document and the second document are different.

[0042] In the embodiment of the present application, when the file type is a document, that is, in the received file, its main content is text content. For this case, the starting content of a document file is specifically a starting sentence, and the ending content is specifically a ending sentence.

[0043] The starting sentence can be, for example, the title of an article, the first body paragraph, the first sentence, etc., and the ending sentence can be the last paragraph of text, the last sentence, or the last title, etc. Semantic recognition is performed on the starting sentence and the ending sentence of each document file, and based on speech recognition, the correlation between each starting sentence and each ending sentence is determined, and based on the correlation, it is determined whether two document files are connected end to end.

[0044] For example, document file A, document file B, and document file C are now identified. The starting sentence of document file A is "is 100 centimeters", the ending sentence of document file B is "the story ends here", and the ending sentence of document file C is "Xiao Ming's height".

[0045] Through the preset semantic recognition model, these sentences are semantically recognized and analyzed, and the correlation between two sentences is determined by judging whether these sentences can form a smooth and coherent sentence. Taking the above document files A, B and C as an example, the ending sentence of document B is "The story ends here", and the starting sentence of document file A is "It is 100 centimeters". If the starting sentence of document file A is connected to the ending sentence of document file B, the sentence "The story ends here It is 100 centimeters" is not smooth and cannot clearly express the meaning, then it is judged that the ending sentence of document B and the starting sentence of document file A have a low correlation.

[0046] If the starting sentence of document file A is connected to the ending sentence of document file C, we can get the sentence "Xiao Ming's height is 100 cm". This sentence is relatively smooth and can clearly express its meaning. Therefore, it is judged that the management degree of the starting sentence of document file A and the ending sentence of document file C is high. At this time, it is judged that document A should be sorted after document C.

[0047] The embodiment of the present application performs semantic recognition on the starting sentence and the ending sentence of the received document file to obtain the correlation between each starting sentence and each ending sentence, and sorts the document files based on the correlation, so that the sorted documents are semantically coherent and meet the user's reading needs.

[0048] In some embodiments of the present application, the file type is audio;

[0049] According to the file types of the M files, the start content and the end content of each of the M files are determined respectively, including:

[0050] Determine the first starting syllable and the first ending syllable in each of the M files;

[0051] Sort M files according to the starting content and ending content, including:

[0052] Determining syllable information of each first starting syllable and first ending syllable, wherein the syllable information includes one or more of volume, timbre and pitch;

[0053] Determining a first similarity between each first starting syllable and each first ending syllable according to the syllable information;

[0054] M files are sorted so that the first audio and the second audio in the M files are arranged in sequence, wherein the first similarity between the first ending syllable corresponding to the first audio and the first starting syllable corresponding to the second audio is higher than the similarity between the first ending syllable and the starting syllable of all the third audios in the M files.

[0055] Optionally, the third audio is an audio in the M files other than the first audio and the second audio, is different from the first audio and the second audio, and the first audio and the second audio are different.

[0056] In the embodiment of the present application, when the file type is audio, that is, in the received audio file, its main content is audio content. For this case, the initial content of an audio file is specifically the initial syllable information, and the ending content is specifically the ending syllable information.

[0057] Specifically, when it is determined that among the received files, there are M files that are audio files, the syllable information of the first starting syllable and the first ending syllable of each audio file is identified through audio recognition software to obtain corresponding volume information, timbre information or pitch information.

[0058] Further, the similarity between each first starting syllable information and each first ending syllable information is determined. For audio information, no matter whether the content is language or music, the audio information in a continuous and complete syllable should be similar. For example, a voice at one end is divided into multiple audio files due to file size limitations, and the reader of the same sentence or the same paragraph is the same person, so the volume, timbre and tone are similar.

[0059] Similarly, for music, even if the same song or the same tune is cut in the middle, the volume, timbre and pitch of the two parts after the cut are similar. Therefore, based on the similarity between the first starting syllable and the first ending syllable in the two audio files, it can be determined whether the two audio files are continuous audio files.

[0060] For example, audio file A, audio file B, and audio file C are now identified. Among them, the similarity between the first starting syllable information of audio file A and the first ending syllable information of audio file B is 0.1, and the similarity between the first starting syllable information of audio file A and the first ending syllable information of audio file C is 0.9. The similarity between the first starting syllable information of audio file A and the first ending syllable information of audio file C is the highest, so audio file C and audio file A are sorted in order.

[0061] The embodiment of the present application determines the similarity between the initial syllable information and the ending syllable information of the received audio file, and sorts the ending syllable information with the highest similarity adjacent to the initial syllable information, so that the audio between the sorted audio files is coherent, meeting the user's listening needs.

[0062] In some embodiments of the present application, the file type is video;

[0063] According to the file types of the M files, the start content and the end content of each of the M files are determined respectively, including:

[0064] Separate the M files to obtain M audio files and corresponding M image files;

[0065] Determine the second starting syllable and the second ending syllable in each of the M audio files;

[0066] Determine the start frame and the end frame in each of the M image files;

[0067] Sort M files according to the starting content and ending content, including:

[0068] Determining a second similarity between each second starting syllable and each second ending syllable according to the syllable information of the second starting syllable and the syllable information of the second ending syllable;

[0069] Determine a third similarity between each starting frame and each ending frame according to the image information of the starting frame and the image information of the ending frame;

[0070] Sort the M files so that the first video and the second video in the M files are arranged in order;

[0071] The second similarity between the second ending syllable and the second starting syllable is higher than the similarity between the second ending syllable and the starting syllable of all the third videos in the M files, or the third similarity between the ending frame and the starting frame is higher than the similarity between the ending frame and the starting frames of all the third videos in the M files.

[0072] In the embodiment of the present application, the file type is video, wherein the video file is generally in an encapsulated format, including an image file and an audio file. Therefore, when it is determined that there are M video files among the received N files, the M video files are first decapsulated and separated to obtain M image files and M audio files corresponding to the M image files.

[0073] For the audio files therein, similar to the sorting method when the file type is audio, by comparing the audio information of the starting syllable of the audio file and the audio information of the ending syllable, the second similarity between the second starting syllable information of each audio file and the second ending syllable information of each file is identified.

[0074] Furthermore, for the image files, the similarity between the start frame and the end frame of each image file can be further determined, wherein the "start frame" can be the first frame of an image file, or the first X frames, and similarly, the "end frame" can be the last frame of an image file, or the last X frames.

[0075] Determine the third similarity between the start frame of each image file and the end frame of each image file. Specifically, identify the image information of each start frame and the image information of each end frame, wherein the image information may include brightness information, contrast information, image main content information, etc. Among them, the image main content can be identified by an image recognition model based on a convolutional neural network to identify the main content of the image frame, such as "blue sky", "portrait" or "animal", etc.

[0076] Among them, since the frame rate of the video is generally greater than or equal to 24FPS, that is, there are 24 frame images in one second, the brightness, contrast and main image content of two adjacent frame images are generally similar. Between two frame images, if the main content of the image is the same, and the closer the brightness and the closer the contrast, the higher the third similarity between the two frame images.

[0077] After determining the second similarity between the second starting syllable and the second ending syllable of the audio file and the third similarity between the starting frame and the ending frame of the image file in each video file, the video files are sorted according to the second similarity and the third similarity. After the sorting, between two adjacent video files, the second similarity between the second ending syllable information of the audio file corresponding to the corresponding audio file and the second starting syllable information of the audio file corresponding to the subsequent video file is the highest. At the same time, the third similarity between the ending frame of the image file corresponding to the previous video file and the starting frame corresponding to the subsequent image file is the highest.

[0078] In an embodiment of the present application, when sorting video files, the video files can be separated into independent image files and audio files, and sorted based on the similarity between the starting frame and the ending frame of the image file, or sorted based on the similarity between the starting syllable and the ending syllable of the audio file, so that the sorted video files are continuous and meet the user's viewing needs.

[0079] In some embodiments of the present application, after sorting the M files, the file sorting method further includes:

[0080] Determine the target file format;

[0081] The M files are integrated to obtain an integrated target file, wherein the format of the target file is the target file format.

[0082] In the embodiment of the present application, after sorting the M files, the M files can be integrated according to the sorted order. Specifically, the user can manually specify or preset a file format. For example, for document files, the file format after integration can be a text document (such as .txt or .doc, etc.) or an encrypted format (such as .pdf, etc.), and for audio files, the file format after integration can be a common format (such as .WAV, etc.) or a compressed format (such as .MP3, etc.), and for video files, they can be encapsulated into different formats (such as .MP4 or .avi, etc.).

[0083] After determining the target file format, M files are integrated according to the target file format, such as integrating M document files into one PDF file, or integrating M audio files into one MP3 file, or integrating M video files into one MP4 file, and the integrated files can be saved or output, so as to facilitate users to read, listen or watch, thereby improving user experience.

[0084] In some embodiments of the present application, a file sorting device is provided. Figure 4 A structural block diagram of a file sorting device according to an embodiment of the present application is shown. Figure 4 As shown, the file sorting device 400 includes:

[0085] The acquisition module 402 is used to determine the file types of the N files when N files are received;

[0086] The determination module 404 is used to determine the start content and the end content of each file in the M files according to the file type of the M files when M files in the N files have the same file type;

[0087] A sorting module 406, used to sort the M files according to the start content and the end content;

[0088] Wherein, N is an integer greater than 1, and M is less than or equal to N.

[0089] In an embodiment of the present application, one or more files may be received through social software, file transfer software, download software, or sharing software. If N files are received at one time, the file types of the N files are further determined. Among them, if the receiving interval between any two consecutively received files among the N files is less than a preset interval threshold, then the N files are considered to be received "at one time".

[0090] If among the N received files, M files have the same file type, such as the file types of the M files are all documents, or the file types of the M files are all audios, or the file types of the M files are all videos, etc., then the M files are sorted according to the starting content and the ending content of the M files.

[0091] Specifically, Figure 2 One of the interface schematic diagrams of the file sorting method according to an embodiment of the present application is shown, Figure 3 The second interface diagram of the file sorting method according to the embodiment of the present application is shown as follows: Figure 2 As shown in FIG. 1 , the user receives three text documents and names them file 1, file 2, and file 3 according to the order in which they are received. After receiving these documents, Figure 3As shown, according to the user's settings, the three documents can be sorted automatically, or through specific user input, such as clicking the "Sort" button, or "Shake", such as shaking the phone to sort. After sorting, the three documents will form a new document sequence according to their respective starting content and ending content. For example, the order of the three documents after sorting is file 3, file 1, and file 2.

[0092] Among them, when sorting, the starting content of file A and the ending content of file B can be used to determine whether they are continuous content based on the similarity, correlation and other information between the starting content of file A and the ending content of file B. If the judgment result is yes, that is, the starting content of file A and the ending content of file B are continuous content, it means that the beginning of file A should be adjacent to the end of the file, and file A is sorted sequentially after file B. If the judgment result is no, that is, the starting content of file A and the ending content of file B are not continuous, then continue to obtain file C, file D, etc. until the sorting is completed.

[0093] Through the file sorting method of the embodiment of the present application, the obtained file sequence conforms to the user's reading sequence, that is, the user can continuously obtain the specific content in the file without manual sorting.

[0094] The embodiment of the present application classifies the files of the same type according to the types of the received multiple files, and judges whether two files are "adjacent" files based on the specific contents of the received files, specifically the starting content and the ending content of each file. If the starting content of a file is similar or continuous to the ending content of another file of the same type, it can be judged that the two files are adjacent files. Therefore, according to the starting content and the ending content, the received multiple files are automatically sorted, and the obtained file sequence is consistent with the order in which the user reads the files, which effectively improves the user experience.

[0095] In some embodiments of the present application, the file type is a document;

[0096] The determination module 404 is further used to determine the start sentence and the end sentence in each of the M files; perform semantic recognition on the start sentence and the end sentence to obtain the semantic association between each start sentence and each end sentence;

[0097] The sorting module 406 is also used to sort the M files so that the first document and the second document in the M files are sorted in sequence, wherein the correlation between the target ending sentence corresponding to the first document and the target starting sentence corresponding to the second document is higher than the correlation between the target ending sentence and the starting sentences of all the third documents in the M files.

[0098] In the embodiment of the present application, when the file type is a document, that is, in the received file, its main content is text content. For this case, the starting content of a document file is specifically a starting sentence, and the ending content is specifically a ending sentence.

[0099] The starting sentence can be, for example, the title of an article, the first body paragraph, the first sentence, etc., and the ending sentence can be the last paragraph of text, the last sentence, or the last title, etc. Semantic recognition is performed on the starting sentence and the ending sentence of each document file, and based on speech recognition, the correlation between each starting sentence and each ending sentence is determined, and based on the correlation, it is determined whether two document files are connected end to end.

[0100] For example, document file A, document file B, and document file C are now identified. The starting sentence of document file A is "is 100 centimeters", the ending sentence of document file B is "the story ends here", and the ending sentence of document file C is "Xiao Ming's height".

[0101] Through the preset semantic recognition model, these sentences are semantically recognized and analyzed, and the correlation between two sentences is determined by judging whether these sentences can form a smooth and coherent sentence. Taking the above document files A, B and C as an example, the ending sentence of document B is "The story ends here", and the starting sentence of document file A is "It is 100 centimeters". If the starting sentence of document file A is connected to the ending sentence of document file B, the sentence "The story ends here It is 100 centimeters" is not smooth and cannot clearly express the meaning, then it is judged that the ending sentence of document B and the starting sentence of document file A have a low correlation.

[0102] If the starting sentence of document file A is connected to the ending sentence of document file C, we can get the sentence "Xiao Ming's height is 100 cm". This sentence is relatively smooth and can clearly express its meaning. Therefore, it is judged that the management degree of the starting sentence of document file A and the ending sentence of document file C is high. At this time, it is judged that document A should be sorted after document C.

[0103] The embodiment of the present application performs semantic recognition on the starting sentence and the ending sentence of the received document file to obtain the correlation between each starting sentence and each ending sentence, and sorts the document files based on the correlation, so that the sorted documents are semantically coherent and meet the user's reading needs.

[0104] In some embodiments of the present application, the file type is audio;

[0105] The determination module 404 is further configured to determine the first starting syllable and the first ending syllable in each of the M files; determine syllable information of each of the first starting syllable and the first ending syllable, wherein the syllable information includes one or more of volume, timbre and pitch; and determine a first similarity between each of the first starting syllable and each of the first ending syllable according to the syllable information;

[0106] The sorting module 406 is also used to sort the M files so that the first audio and the second audio in the M files are arranged in sequence, wherein the first similarity between the first ending syllable corresponding to the first audio and the first starting syllable corresponding to the second audio is higher than the similarity between the first ending syllable and the starting syllable corresponding to all the third audios in the M files.

[0107] In the embodiment of the present application, when the file type is audio, that is, in the received audio file, its main content is audio content. For this case, the initial content of an audio file is specifically the initial syllable information, and the ending content is specifically the ending syllable information.

[0108] Specifically, when it is determined that among the received files, there are M files that are audio files, the syllable information of the first starting syllable and the first ending syllable of each audio file is identified through audio recognition software to obtain corresponding volume information, timbre information or pitch information.

[0109] Further, the similarity between each first starting syllable information and each first ending syllable information is determined. For audio information, no matter whether the content is language or music, the audio information in a continuous and complete syllable should be similar. For example, a voice at one end is divided into multiple audio files due to file size limitations, and the reader of the same sentence or the same paragraph is the same person, so the volume, timbre and tone are similar.

[0110] Similarly, for music, even if the same song or the same tune is cut in the middle, the volume, timbre and pitch of the two parts after the cut are similar. Therefore, based on the similarity between the first starting syllable and the first ending syllable in the two audio files, it can be determined whether the two audio files are continuous audio files.

[0111] For example, audio file A, audio file B, and audio file C are now identified. Among them, the similarity between the first starting syllable information of audio file A and the first ending syllable information of audio file B is 0.1, and the similarity between the first starting syllable information of audio file A and the first ending syllable information of audio file C is 0.9. The similarity between the first starting syllable information of audio file A and the first ending syllable information of audio file C is the highest, so audio file C and audio file A are sorted in order.

[0112] The embodiment of the present application determines the similarity between the initial syllable information and the ending syllable information of the received audio file, and sorts the ending syllable information with the highest similarity adjacent to the initial syllable information, so that the audio between the sorted audio files is coherent, meeting the user's listening needs.

[0113] In some embodiments of the present application, the file type is video, and the file sorting device 400 further includes:

[0114] A separation module 408 is used to separate the M files to obtain M audio files and corresponding M image files;

[0115] The determination module 404 is further used to determine the second starting syllable and the second ending syllable in the M audio files respectively; determine the starting frame and the ending frame in the M image files respectively; determine the second similarity between each second starting syllable and each second ending syllable according to the syllable information of the second starting syllable and the syllable information of the second ending syllable; determine the third similarity between each starting frame and each ending frame according to the image information of the starting frame and the image information of the ending frame;

[0116] The sorting module 406 is further used to sort the M files so that the first video and the second video in the M files are arranged in sequence;

[0117] The second similarity between the second ending syllable and the second starting syllable is higher than the similarity between the second ending syllable and the starting syllable of all the third videos in the M files, or the third similarity between the ending frame and the starting frame is higher than the similarity between the ending frame and the starting frames of all the third videos in the M files.

[0118] In the embodiment of the present application, the file type is video, wherein the video file is generally in an encapsulated format, including an image file and an audio file. Therefore, when it is determined that there are M video files among the received N files, the M video files are first decapsulated and separated to obtain M image files and M audio files corresponding to the M image files.

[0119] For the audio files therein, similar to the sorting method when the file type is audio, by comparing the audio information of the starting syllable of the audio file and the audio information of the ending syllable, the second similarity between the second starting syllable information of each audio file and the second ending syllable information of each file is identified.

[0120] Furthermore, for the image files, the similarity between the start frame and the end frame of each image file can be further determined, wherein the "start frame" can be the first frame of an image file, or the first X frames, and similarly, the "end frame" can be the last frame of an image file, or the last X frames.

[0121] Determine the third similarity between the start frame of each image file and the end frame of each image file. Specifically, identify the image information of each start frame and the image information of each end frame, wherein the image information may include brightness information, contrast information, image main content information, etc. Among them, the image main content can be identified by an image recognition model based on a convolutional neural network to identify the main content of the image frame, such as "blue sky", "portrait" or "animal", etc.

[0122] Among them, since the frame rate of the video is generally greater than or equal to 24FPS, that is, there are 24 frame images in one second, the brightness, contrast and main image content of two adjacent frame images are generally similar. Between two frame images, if the main content of the image is the same, and the closer the brightness and the closer the contrast, the higher the third similarity between the two frame images.

[0123] After determining the second similarity between the second starting syllable and the second ending syllable of the audio file and the third similarity between the starting frame and the ending frame of the image file in each video file, the video files are sorted according to the second similarity and the third similarity. After the sorting, between two adjacent video files, the second similarity between the second ending syllable information of the audio file corresponding to the corresponding audio file and the second starting syllable information of the audio file corresponding to the subsequent video file is the highest. At the same time, the third similarity between the ending frame of the image file corresponding to the previous video file and the starting frame corresponding to the subsequent image file is the highest.

[0124] In an embodiment of the present application, when sorting video files, the video files can be separated into independent image files and audio files, and sorted based on the similarity between the starting frame and the ending frame of the image file, or sorted based on the similarity between the starting syllable and the ending syllable of the audio file, so that the sorted video files are continuous and meet the user's viewing needs.

[0125] In some embodiments of the present application, the determination module 404 is further used to determine the target file format;

[0126] The file sorting device 400 further includes: an integration module 410, which is used to integrate M files to obtain an integrated target file, wherein the format of the target file is a target file format.

[0127] In the embodiment of the present application, after sorting the M files, the M files can be integrated according to the sorted order. Specifically, the user can manually specify or preset a file format. For example, for document files, the file format after integration can be a text document (such as .txt or .doc, etc.) or an encrypted format (such as .pdf, etc.), and for audio files, the file format after integration can be a common format (such as .WAV, etc.) or a compressed format (such as .MP3, etc.), and for video files, they can be encapsulated into different formats (such as .MP4 or .avi, etc.).

[0128] After determining the target file format, M files are integrated according to the target file format, such as integrating M document files into one PDF file, or integrating M audio files into one MP3 file, or integrating M video files into one MP4 file, and the integrated files can be saved or output, so as to facilitate users to read, listen or watch, thereby improving user experience.

[0129] The file sorting device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0130] The file sorting device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0131] The file sorting device provided in the embodiment of the present application can implement each process implemented in the above method embodiment, and will not be described again here to avoid repetition.

[0132] Optionally, the embodiment of the present application further provides an electronic device 500, Figure 5 A structural block diagram of an electronic device according to an embodiment of the present application is shown. Figure 5As shown, it includes a processor 502, a memory 504, and a program or instruction stored in the memory 504 and executable on the processor 502. When the program or instruction is executed by the processor 502, each process of the above-mentioned method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0133] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

[0134] Figure 6 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0135] The electronic device 2000 includes but is not limited to: a radio frequency unit 2001, a network module 2002, an audio output unit 2003, an input unit 2004, a sensor 2005, a display unit 2006, a user input unit 2007, an interface unit 2008, a memory 2009, and a processor 2010 and other components.

[0136] Those skilled in the art will appreciate that the electronic device 2000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 2010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 6 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0137] The processor 210 is used to determine the file types of the N files when N files are received; if M files among the N files have the same file type, determine the start content and the end content of each file in the M files according to the file type of the M files; and sort the M files according to the start content and the end content;

[0138] Wherein, N is an integer greater than 1, and M is less than or equal to N.

[0139] Optionally, the file type is a document; the processor 2010 is also used to determine the starting statement and the ending statement in the M files respectively; perform semantic recognition on the starting statement and the ending statement to obtain the semantic association between each starting statement and each ending statement; sort the first document and the second document in the M files adjacent to each other so that the target ending statement corresponding to the first document and the target starting statement corresponding to the second document are adjacent, wherein the target ending statement and the target starting sentence have the highest association.

[0140] Optionally, the file type is audio; the processor 2010 is further used to determine the syllable information of each first starting syllable and the first ending syllable, wherein the syllable information includes one or more of volume, timbre and pitch; determine the first similarity between each first starting syllable and each first ending syllable based on the syllable information; sort the first audio and the second audio in the M files adjacent to each other so that the first ending syllable corresponding to the first audio and the first starting syllable corresponding to the second audio are adjacent to each other, wherein the first similarity between the first ending syllable and the first starting syllable is the highest.

[0141] Optionally, the file type is video; the processor 2010 is also used to separate M files to obtain M audio files and corresponding M image files; determine the second starting syllable and the second ending syllable in the M audio files respectively; determine the starting frame and the ending frame in the M image files respectively; determine the second similarity between each second starting syllable and each second ending syllable based on the syllable information of the second starting syllable and the syllable information of the second ending syllable; determine the third similarity between each starting frame and each ending frame based on the image information of the starting frame and the image information of the ending frame; sort the first video and the second video in the M files adjacent to each other, so that the second ending syllable corresponding to the first video is adjacent to the second starting syllable corresponding to the second video, and the ending frame corresponding to the first video is adjacent to the starting frame corresponding to the second video; wherein the second similarity between the second ending syllable and the second starting syllable is the highest, or the third similarity between the ending frame and the starting frame is the highest.

[0142] Optionally, the processor 2010 is further configured to determine a target file format; integrate the M files to obtain an integrated target file, wherein the format of the target file is the target file format.

[0143] It should be understood that in an embodiment of the present application, the input unit 2004 may include a graphics processor (GPU) 20041 and a microphone 20042, and the graphics processor 20041 processes image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode.

[0144] The display unit 2006 may include a display panel 20061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 2007 includes a touch panel 20071 and other input devices 20072. The touch panel 20071 is also called a touch screen. The touch panel 20071 may include two parts: a touch detection device and a touch controller. Other input devices 20072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not repeated here. The memory 2009 may be used to store software programs and various data, including but not limited to applications and operating systems. The processor 2010 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 2010.

[0145] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0146] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0147] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0148] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0149] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0150] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.

[0151] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Ordinary technicians in this field can make many forms at the beginning of this application without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.

Claims

1. A file sorting method, characterized in that: include: When N files are received, determining the file types of the N files; When M files among the N files have the same file type, determining the start content and the end content of each file among the M files according to the file type of the M files; Sorting the M files according to the starting content and the ending content; Wherein, N is an integer greater than 1, and M is less than or equal to N; The file type is audio; The step of determining the start content and the end content of each file in the M files according to the file types of the M files comprises: Determine the first starting syllable and the first ending syllable in each of the M files; The sorting of the M files according to the starting content and the ending content includes: Determining syllable information of each of the first starting syllable and the first ending syllable, wherein the syllable information includes one or more of volume, timbre and pitch; Determining, according to the syllable information, a first similarity between each of the first starting syllables and each of the first ending syllables; The M files are sorted so that the first audio and the second audio in the M files are arranged in sequence, wherein the first similarity between the first ending syllable corresponding to the first audio and the first starting syllable corresponding to the second audio is higher than the similarity between the first ending syllable and the starting syllable of all the third audios in the M files.

2. The file sorting method according to claim 1, characterized in that: The file type is document; The step of determining the start content and the end content of each file in the M files according to the file types of the M files comprises: Determine the start statement and the end statement in each of the M files; The sorting of the M files according to the starting content and the ending content includes: Performing semantic recognition on the starting sentence and the ending sentence to obtain a semantic association between each starting sentence and each ending sentence; The M files are sorted so that the first document and the second document in the M files are arranged in sequence, wherein the correlation between the target ending sentence corresponding to the first document and the target starting sentence corresponding to the second document is higher than the correlation between the target ending sentence and the starting sentences of all the third documents in the M files.

3. The file sorting method according to claim 1, characterized in that: The file type is video; The step of determining the start content and the end content of each file in the M files according to the file types of the M files comprises: Separating the M files to obtain M audio files and corresponding M image files; Determine a second starting syllable and a second ending syllable in each of the M audio files; Determine a start frame and an end frame in each of the M image files; The sorting of the M files according to the starting content and the ending content includes: Determining a second similarity between each of the second starting syllables and each of the second ending syllables according to the syllable information of the second starting syllable and the syllable information of the second ending syllable; Determine a third similarity between each of the starting frames and each of the ending frames according to the image information of the starting frame and the image information of the ending frame; Sort the M files so that the first video and the second video in the M files are arranged in sequence; The second similarity between the second ending syllable and the second starting syllable is higher than the similarity between the second ending syllable and the starting syllable of all the third videos in the M files, or the third similarity between the ending frame and the starting frame is higher than the similarity between the ending frame and the starting frames of all the third videos in the M files.

4. The file sorting method according to claim 1, characterized in that: After sorting the M files, the method further includes: Determine the target file format; The M files are integrated to obtain an integrated target file, wherein the format of the target file is the target file format.

5. A file sorting device, characterized in that: include: An acquisition module, configured to determine the file types of the N files when N files are received; A determination module, configured to determine, when M files among the N files have the same file type, the start content and the end content of each file among the M files according to the file type of the M files; A sorting module, used for sorting the M files according to the starting content and the ending content; Wherein, N is an integer greater than 1, and M is less than or equal to N; The file type is audio; The determination module is further used to determine a first starting syllable and a first ending syllable in each of the M files; determine syllable information of each of the first starting syllable and the first ending syllable, wherein the syllable information includes one or more of volume, timbre and pitch; and determine a first similarity between each of the first starting syllable and each of the first ending syllable based on the syllable information; The sorting module is further used to sort the M files so that the first audio and the second audio in the M files are arranged in sequence, wherein the first similarity between the first ending syllable corresponding to the first audio and the first starting syllable corresponding to the second audio is higher than the similarity between the first ending syllable and the starting syllables corresponding to all the third audios in the M files.

6. The file sorting device according to claim 5, characterized in that: The file type is document; The determination module is further used to determine the starting sentence and the ending sentence in the M files respectively; perform semantic recognition on the starting sentence and the ending sentence to obtain the semantic association between each starting sentence and each ending sentence; The sorting module is also used to sort the M files so that the first document and the second document in the M files are sorted in sequence, wherein the correlation between the target ending sentence corresponding to the first document and the target starting sentence corresponding to the second document is higher than the correlation between the target ending sentence and the starting sentences of all third documents in the M files.

7. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction implements the steps of the method according to any one of claims 1 to 4 when executed by the processor.

8. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Document splicing method and equipment and storage medium

    CN112001312A