Multimedia file playing method and device for rotating device

By grouping files in the multimedia file library step by step and generating a length-to-width ratio type subfile sequence, the problem of frequent screen rotation and delay of the rotatable screen device when browsing photos or videos is solved, and efficient file playback and browsing in chronological order is achieved.

CN113901242BActive Publication Date: 2025-06-24SAMSUNG ELECTRONICS CHINA R&D CENT +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111204453.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-15
Publication Date
2025-06-24
Estimated Expiration
2041-10-15

AI Technical Summary

Technical Problem

The existing rotatable screen devices have problems of frequent screen rotation and long browsing processing delays when browsing photos or videos, and cannot meet the user's need to browse multimedia files according to the file generation time.

Method used

By pre-grouping the files in the multimedia file library based on the specified grouping parameter sequence, the files in the multimedia file library are grouped step by step, and the aspect ratio type subfile sequence of each group of files is generated, and the file playback sequence with the least number of device rotations is generated according to the file playback instructions.

Benefits of technology

It effectively avoids frequent screen rotation, improves playback efficiency, and meets users' browsing needs according to the file generation time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113901242B_ABST
    Figure CN113901242B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for playing multimedia files of a rotating device. The method includes: pre-grouping files in a multimedia file library in a hierarchical grouping manner based on a specified grouping parameter sequence, and generating a sub-file sequence of each aspect ratio type in each group based on the files in each group; wherein, the aspect ratio types include landscape, portrait, and square; different parameters in the grouping parameter sequence correspond to different grouping granularities; when a file playing instruction is received, according to the file playing instruction, based on the sub-file sequence of the corresponding group in the multimedia file library, a file playing sequence is generated and played according to the principle of the least number of device rotations. By adopting the present application, frequent screen rotation can be avoided and the playing efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to multimedia playback technology, and in particular, to a method and apparatus for playing multimedia files on a rotating device. Background Art

[0002] With the popularization of smart phones and the development of mobile Internet, people use mobile terminals to take more and more photos and videos, which are stored locally, in network disks or uploaded to network platforms for sharing. When browsing these photos and videos, in order to obtain a better visual effect, screen mirroring technology is often used to project the content onto a large-screen device for browsing, or directly store and play on the large-screen device, or use a network disk client to browse and watch on the large-screen device. Among these photos and videos, the proportion of horizontal and vertical files is very high. Especially after the popularity of short-video platforms represented by Douyin, people are used to shooting more vertical videos or photos. This poses more requirements on traditional display devices. The emergence of rotatable screen devices, such as Samsung Sero TV, further highlights this trend.

[0003] Currently, in the implementation solutions of rotatable screen devices, when browsing photos or videos, the horizontal and vertical screen states of the screen are usually determined according to the resolution of the image frame.

[0004] In the process of implementing the present invention, the inventor found that there are problems such as frequent screen rotation and long browsing processing time when using existing rotatable screen devices to browse photos or videos. The specific reasons are as follows:

[0005] For existing rotatable screen devices, when browsing photos or videos, the device is rotated according to the currently browsed content. In this way, when the user browses a large number of photos or videos, there will be a problem of frequent screen rotation. To avoid frequent screen rotation, there is currently a solution: when browsing, perform a simple sorting on the selected pictures according to the aspect ratio, and play according to the sorting result. In this way, by uniformly playing files with the same aspect ratio, the number of screen rotations can be reduced. However, when this simple sorting is applied to the browsing scenario of a large number of files, there will be a problem of relatively large sorting processing overhead, resulting in a long browsing processing time. Moreover, since this browsing method will break the generation time order of the files, it cannot meet the user's requirement to browse multimedia files according to the file generation time. Summary of the Invention

[0006] In view of this, the main object of the present invention is to provide a method and apparatus for playing multimedia files, which can avoid frequent screen rotation and improve the playback efficiency.

[0007] To achieve the above object, the technical solutions proposed by the embodiments of the present invention are as follows:

[0008] A method for playing multimedia files of a rotating device, comprising:

[0009] Pre-grouping the files in the multimedia file library in a step-by-step grouping manner based on a specified grouping parameter sequence, and generating a sub-file sequence of each aspect ratio type in the corresponding group based on each group of files; wherein, the aspect ratio types include landscape, portrait, and square screen; different parameters in the grouping parameter sequence correspond to different grouping granularities;

[0010] When a file playing instruction is received, according to the file playing instruction, based on the sub-file sequence of the corresponding group in the multimedia file library, generate a file playing sequence and play it according to the principle of the least number of device rotations.

[0011] Preferably, the grouping parameter sequence is generated in ascending order of grouping granularity;

[0012] The generating a sub-file sequence of each aspect ratio type in the corresponding group based on each group of files includes:

[0013] Traverse each grouping parameter S in the grouping parameter sequence in turn n , based on the grouping parameter S n , perform grouping processing on the files in the multimedia file library, including:

[0014] If the grouping parameter S n is the first grouping parameter S1, then group the files in the multimedia file library according to the grouping parameter S1 to obtain the first-level grouping; for each of the first-level groupings, classify the files in the grouping according to the aspect ratio type of the files, and sort the same-type files, and obtain a sub-file sequence of each aspect ratio type based on the sorting;

[0015] If the grouping parameter S n is the second or more grouping parameter, then based on the grouping parameter S n , group all the (n - 1)-level groupings to obtain the n-level grouping; for each of the n-level groupings, based on the sub-file sequences of all the (n - 1)-level groupings in the n-level grouping, obtain the sub-file sequence of the corresponding aspect ratio type in the n-level grouping in the way of concatenating the same-type sub-file sequences.

[0016] Preferably, the method further includes:

[0017] When pre-grouping the files in the multimedia file library in a step-by-step grouping manner, arrange the sub-file sequences of each group of files according to a preset sub-sequence sorting method to obtain a primary candidate sequence set of the corresponding group;

[0018] For each n-level grouping Gn,i Based on the grouping G, according to the principle of minimizing the number of device rotations n,i generate the first-level candidate sequence set of all the (n - 1)-level groupings in the grouping G n,i the first high-level candidate sequence in each screen state, where n > 1;

[0019] For each second-level grouping G 2,i take all the first-level groupings in this grouping G 2,i as the target sorting groupings for multi-group sorting, and according to the preset multi-group sorting method, based on the sub-file sequences of the target sorting groupings, obtain 2,i the preferred playback sequence in each screen state for this grouping G, and use it as 2,i the second high-level candidate sequence of this grouping G in the corresponding screen state;

[0020] For each k-level grouping G k,i based on the second high-level candidate sequences of all the (k - 1)-level groupings in the grouping G, according to the principle of minimizing the number of device rotations k,i generate the second high-level candidate sequence of the grouping G k,i in each screen state; where k > 2.

[0021] Preferably, the subsequence sorting method includes:

[0022] When the grouping contains three sub-file sequences, after performing a full permutation of the square-screen sub-file sequence and the landscape-screen sub-file sequence in the grouping, concatenate each full permutation result with the portrait-screen state sequence in the grouping to obtain the landscape-screen state sequences in the primary candidate sequence set of the grouping; after performing a full permutation of the portrait-screen sub-file sequence and the square-screen sub-file sequence in the grouping, concatenate each full permutation result with the landscape-screen state sequence in the grouping to obtain the portrait-screen state sequences in the primary candidate sequence set of the grouping;

[0023] When the grouping contains only two sub-file sequences, perform a full permutation of the two sub-file sequences to obtain the landscape-screen state sequence or the portrait-screen state sequence in the primary candidate sequence set of the grouping; where, if the grouping contains a square-screen sub-file sequence, the screen state corresponding to each full permutation result is the aspect ratio type of the non-square-screen sub-file sequence among them, otherwise, the screen state corresponding to each full permutation result is the aspect ratio type of the first sub-file sequence among them;

[0024] When a group contains only one sub - file sequence, use this sub - file sequence as the only sequence member in the set of primary candidate sequences of the group; among them, if the sequence in the set of primary candidate sequences is a square - screen sub - file sequence, this sequence belongs to both the landscape - screen state sequence and the portrait - screen state sequence at the same time; otherwise, the screen state corresponding to this sequence is the aspect - ratio type of the sub - file sequence.

[0025] Preferably, for each n - th level group G n,i , according to the principle of the least number of device rotations, based on the sets of primary candidate sequences of all (n - 1) - th level groups in the group G n,i , generate the first set of advanced candidate sequences of the group G n,i in each screen state, including:

[0026] For each screen state T i , use this screen state T i as the current screen state, traverse the (n - 1) - th level groups in the group G n,i . For each traversed (n - 1) - th level group, select a sequence that matches the current screen state from the set of primary candidate sequences of this (n - 1) - th level group, and determine the screen state after playing the selected sequence in the current screen state. Update the current screen state to the currently determined screen state; concatenate all the selected sequences in sequence to obtain the first set of advanced candidate sequences of the group G n,i in the screen state T i .

[0027] Preferably, according to the principle of the least number of device rotations, based on the sets of second - level advanced candidate sequences of all (k - 1) - th level groups in the group G k,i , generate the second set of advanced candidate sequences of the group G k,i in each screen state, including:

[0028] For each screen state T i , use this screen state T i as the current screen state, traverse the (k - 1) - th level groups in the group G k,i . For each traversed (k - 1) - th level group, select a sequence that matches the current screen state from the set of second - level advanced candidate sequences of this (k - 1) - th level group, and determine the screen state after playing the selected sequence in the current screen state. Update the current screen state to the currently determined screen state; concatenate all the selected sequences in sequence to obtain the second set of advanced candidate sequences of the group G k,i in the screen state T i .

[0029] Preferably, the generation of the file playback sequence includes:

[0030] When the file playing instruction does not include a playing order condition related to the grouping parameter, based on the sub-file sequence of the groups below the nth level within the file playing range indicated by the file playing instruction, in the manner of concatenating the sub-file sequences of the same type, generate the sub-file sequence corresponding to the file playing range; in the manner of preferentially placing the sub-file sequence whose aspect ratio type matches the current screen state at the head of the sequence, arrange the generated sub-file sequence to obtain the file playing sequence; the n max is the highest grouping level corresponding to the complete group included in the file playing range; max

[0031] When the file playing instruction includes a playing order condition related to the grouping parameter, based on the sub-file sequence of the groups below the nth level within the file playing range, in a preset multi-group sorting manner, generate the file playing sequence with the least number of device rotations in the current screen state; wherein, the n min is the lowest grouping level corresponding to the grouping parameter indicated by the playing order condition. min

[0032] Preferably, the generating of the file playing sequence includes:

[0033] When the file playing instruction does not include a playing order condition related to the grouping parameter, based on the sub-file sequence of the groups below the nth level within the file playing range indicated by the file playing instruction, in the manner of concatenating the sub-file sequences of the same type, generate the sub-file sequence corresponding to the file playing range; in the manner of preferentially placing the sub-file sequence whose aspect ratio type matches the current screen state at the head of the sequence, arrange the generated sub-file sequence to obtain the file playing sequence; the n max is the highest grouping level corresponding to the complete group included in the file playing range; max

[0034] When the file playing instruction includes a playing order condition related to the grouping parameter, determine the lowest grouping level n corresponding to the grouping parameter indicated by the playing order condition min ;

[0035] When n min = 1, find the highest grouping level n corresponding to the case where the file playing range consists of complete groups of the same level z,max , if the search is successful and n z,max > 1, then based on all the nth-level z,max ​​​For the second-highest candidate sequence of the hierarchical grouping, generate a file playback sequence in the current screen state according to the principle of the least number of device rotations. Otherwise, use the first-level grouping within the file playback range as the target sorting grouping for multi-group sorting. According to the multi-group sorting method, based on the sub-file sequences of the target sorting grouping, obtain the preferred playback sequences for each screen state, and use the preferred playback sequence that matches the current screen state as the file playback sequence;

[0036] When n min > 1, determine whether the file playback range consists of complete (n min + 1)-level groupings. If so, based on the first-highest candidate sequences of all (n min + 1)-level groupings within the file playback range, generate a file playback sequence in the current screen state according to the principle of the least number of device rotations. Otherwise, based on the sub-file sequences of the groupings below the n min -th level within the file playback range, generate a file playback sequence with the least number of device rotations in the current screen state according to the multi-group sorting method.

[0037] Preferably, the multi-group sorting method includes:

[0038] For each target sorting grouping of the multi-group sorting, arrange all the sub-file sequences of the target sorting grouping according to a preset sub-sequence sorting method to obtain a set of primary candidate sequences for the target sorting grouping;

[0039] Based on the sets of primary candidate sequences of all the target sorting groupings, construct a sequence relationship network; where the nodes in the sequence relationship network represent a sequence in the set of primary candidate sequences, the weight of a node is the number of device rotations required when playing the sequence to which the node belongs, each node is connected to all the nodes corresponding to the adjacent target sorting groupings of its own target sorting grouping, and the path weight between adjacent nodes represents the number of device rotations required for the playback switch between the corresponding sequences;

[0040] Traverse each sequence in the set of primary candidate sequences of the target sorting grouping with the smallest serial number. Among all the paths from the sequence as the starting node to the node of the target sorting grouping with the largest serial number in the sequence relationship network, select the path with the smallest total path weight as the excellent path corresponding to the sequence; the total path weight is the sum of the weights of all the nodes and all the node paths in the path;

[0041] Based on the excellent path, determine the path with the least number of device rotations in each screen state to obtain the preferred playback sequence for the corresponding screen state.

[0042] Preferably, for the sub - file sequence of groups below the n - th level within the file playing range indicated by the file playing instruction, in the manner of concatenating the same - type sub - file sequences, generating the sub - file sequence corresponding to the file playing range includes: max If there are incomplete n - th level groups in the file playing range, then for each of the incomplete n - th level groups, based on the sub - file sequence of the n - th level groups included in the file playing range of this n - th level group, in the manner of concatenating the same - type sub - file sequences, generating the sub - file sequence corresponding to this n - th level group in the file playing range; the n is the highest group level corresponding to when the incomplete n - th level group is composed of complete groups of the same level;

[0043] If there are incomplete n - th level groups in the file playing range max then for each of the incomplete n - th level groups max based on the sub - file sequence of the n - th level groups included in the file playing range of this n - th level group max in the manner of concatenating the same - type sub - file sequences, generating the sub - file sequence corresponding to this n - th level group in the file playing range; the n max-i is the highest group level corresponding to when the incomplete n - th level group is composed of complete groups of the same level; max For all n - th level group sub - file sequences in the file playing range max-i in the manner of concatenating the same - type sub - file sequences, generating the sub - file sequence of each aspect ratio type in the file playing range. max For all n - th level group sub - file sequences in the file playing range

[0044] in the manner of concatenating the same - type sub - file sequences, generating the sub - file sequence of each aspect ratio type in the file playing range. max in the manner of concatenating the same - type sub - file sequences, generating the sub - file sequence of each aspect ratio type in the file playing range.

[0045] Preferably, for the sub - file sequence of groups below the n - th level within the file playing range indicated by the file playing instruction, in accordance with the multi - group sorting method, generating the file playing sequence with the least number of device rotations in the current screen state includes: min If there are incomplete n - th level groups in the file playing range

[0046] If there are incomplete n - th level groups in the file playing range min then for each of the incomplete n - th level groups min based on the sub - file sequence of the n - th level groups included in the file playing range of this n - th level group min in the manner of concatenating the same - type sub - file sequences, generating the sub - file sequence corresponding to this n - th level group in the file playing range, the n min-i is the highest group level corresponding to when the incomplete n - th level group is composed of complete groups of the same level; min For all n - th level group sub - file sequences in the file playing range min-i If there are incomplete n - th level groups in the file playing range min then for each of the incomplete n - th level groups

[0047] For all n - th level group sub - file sequences in the file playing range minThe level grouping, as the target sorting grouping for multi-group sorting, according to the multi-group sorting method, based on the sub-file sequences of the target sorting grouping, obtains a preferred playback sequence for each screen state, and uses the preferred playback sequence that matches the current screen state as the file playback sequence.

[0048] Preferably, based on the second-highest candidate sequence of the n z,max th level grouping in the file playback range, generating a file playback sequence in the current screen state according to the principle of the least number of device rotations includes:

[0049] Traverse all the n z,max th level groupings in the file playback range. For each traversed n z,max th level grouping, select a sequence that matches the current screen state from the second-highest candidate sequence of this n z,max th level grouping, determine the screen state after playing the selected sequence in the current screen state, and update the current screen state to the currently determined screen state;

[0050] Connect all the selected sequences in sequence to obtain the file playback sequence.

[0051] Preferably, based on the first-highest candidate sequences of all the (n + 1) min th level groupings in the file playback range, generating a file playback sequence in the current screen state according to the principle of the least number of device rotations includes:

[0052] Traverse all the (n + 1) min th level groupings in the file playback range. For each traversed (n + 1) min th level grouping, select a sequence that matches the current screen state from the first-highest candidate sequence of this (n + 1) min th level grouping, determine the screen state after playing the selected sequence in the current screen state, and update the current screen state to the currently determined screen state;

[0053] Connect all the selected sequences in sequence to obtain the file playback sequence.

[0054] An embodiment of the present invention also discloses a multimedia file playback device for a rotating device, including:

[0055] A preprocessing unit, configured to pre-group the files in the multimedia file library in a hierarchical grouping manner based on a specified grouping parameter sequence, and generate sub-file sequences of each aspect ratio type in each group; wherein, the aspect ratio types include landscape, portrait, and square; different parameters in the grouping parameter sequence correspond to different grouping granularities;

[0056] A playback unit, configured to, when receiving a file playback instruction, generate a file playback sequence and play it according to the file playback instruction, based on the sub-file sequence of the corresponding group in the multimedia file library, in accordance with the principle of minimizing the number of device rotations.

[0057] An embodiment of the present invention also discloses a non-volatile computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the steps of the multimedia file playback method for a rotating device as described above.

[0058] An embodiment of the present invention also discloses an electronic device including the non-volatile computer-readable storage medium as described above and a processor accessible to the non-volatile computer-readable storage medium.

[0059] In summary, the multimedia file playback solution for a rotating device proposed in the embodiments of the present invention pre-uses a hierarchical grouping method to group files in the multimedia file library with different granularities, and generates a sub-file sequence for each aspect ratio type (including landscape, portrait, and square screen) in the corresponding group for each group of files. In this way, when receiving a file playback instruction, the sub-file sequence of the corresponding group in the multimedia file library can be used to generate a file playback sequence and play it according to the principle of minimizing the number of device rotations. On the one hand, the problem of frequent screen rotation during playback can be avoided by using the file playback sequence with the least number of device rotations. On the other hand, by using the pre-generated sub-file sequences of each group hierarchically, the efficiency of generating a file playback sequence based on a file playback instruction can be improved, and thus the file playback efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 It is a schematic flowchart of the method according to an embodiment of the present invention;

[0061] Figure 2 It is a schematic diagram showing the effect of the subsequence sorting method according to an embodiment of the present invention;

[0062] Figure 3 It is a schematic diagram of file grouping for Example 1 according to an embodiment of the present invention;

[0063] Figure 4 It is a schematic diagram of browsing sequence generation for Example 1 according to an embodiment of the present invention;

[0064] Figure 5 It is a schematic diagram of file grouping for Example 2 according to an embodiment of the present invention;

[0065] Figure 6 It is a schematic diagram of recommended sequence generation for Example 2 according to an embodiment of the present invention;

[0066] Figure 7 Schematic diagram of the device structure according to an embodiment of the present invention. Detailed implementation manners

[0067] To make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0068] Figure 1 Schematic flowchart of an embodiment of the present invention. As Figure 1 shown, the method for playing multimedia files of a rotating device implemented in this embodiment mainly includes the following steps:

[0069] Step 101: Pre-group the files in the multimedia file library in a hierarchical grouping manner based on a specified grouping parameter sequence, and generate a sub-file sequence of each aspect ratio type in each group based on the files in each group.

[0070] Among them, the aspect ratio types include landscape screen, portrait screen, and square screen; different parameters in the grouping parameter sequence correspond to different grouping granularities.

[0071] This step is used to pre-group the files in the multimedia file library step by step according to the specified grouping parameters, and classify the files in each group according to the aspect ratio type of the files, that is, landscape screen, portrait screen, and square screen, to obtain a sub-file sequence of each aspect ratio type in each group, so that when a file playback instruction is received, the sub-file sequence generated in advance for the grouping of the corresponding playback file range can be used to quickly generate the corresponding playback sequence, thereby improving the playback efficiency.

[0072] The grouping parameter sequence is used to define a specific set of grouping parameters and the order of hierarchical grouping, which can be specifically set according to actual needs. For example, it can be set as a sequence composed of days, weeks, months, and years, or a sequence composed of "user preference" and "day", but is not limited to the above. In practical applications, multiple groups of grouping parameter sequences can be set according to different needs, and for each group of grouping parameter sequences, the corresponding grouping data is generated using step 101.

[0073] In one implementation manner, in order to quickly implement hierarchical grouping, the grouping parameter sequence is generated based on the ascending order of the grouping granularity, that is, the grouping parameter sequence is generated in the order of increasing grouping granularity. In this way, when performing grouping above the second level, the grouping results of the adjacent first level can be used, thereby improving the hierarchical grouping efficiency.

[0074] In this application, the definition of the aspect ratio type of a file is specifically as follows: when the aspect ratio of the file is greater than 1, it is a landscape screen; when the aspect ratio of the file is less than 1, it is a portrait screen; when the aspect ratio of the file is equal to 1, it is a square screen. It should be noted that considering that the square screen is applicable to both landscape and portrait screens, in order to facilitate generating a sequence with fewer rotation times, it is necessary to separately screen out the square screen files so as to combine the playback sequences based on different types of sub-file sequences later.

[0075] In practical applications, in order to ensure the accuracy of the grouped data in the multimedia file library, the grouped data of the multimedia file library can be updated accordingly based on step 101 regularly or when the multimedia file library changes (including adding, deleting, and modifying files).

[0076] The multimedia file library can specifically be the photo album in the user device or the multimedia file library in the server, but it is not limited to the above in practical applications.

[0077] In one implementation manner, in step 101, the following method can be used to generate sub-file sequences of each aspect ratio type in the corresponding group based on each group of files:

[0078] Traverse each grouping parameter S in the grouping parameter sequence in turn n , and based on the grouping parameter S n , perform grouping processing on the files in the multimedia file library. The specific grouping processing includes:

[0079] If the grouping parameter S n is the first grouping parameter S1, then group the files in the multimedia file library according to the grouping parameter S1 to obtain the first-level grouping; for each of the first-level groupings, classify the files within the grouping according to the aspect ratio type of the files, and sort the files of the same type, and obtain sub-file sequences of each aspect ratio type based on the sorting.

[0080] If the grouping parameter S n is the second or more grouping parameter, then based on the grouping parameter S n , group all the (n - 1)-level groupings to obtain the n-level grouping; for each of the n-level groupings, based on the sub-file sequences of all the (n - 1)-level groupings in the n-level grouping, obtain the sub-file sequences of the corresponding aspect ratio type in the n-level grouping in the way of concatenating the sub-file sequences of the same type.

[0081] By using the above method, different granularity groupings can be generated step by step starting from the first grouping parameter in the grouping parameter sequence, and the corresponding sub-file sequences can be generated.

[0082] Taking the grouping parameter sequence of "day, week, month" as an example, using the above-mentioned step-by-step grouping method, first group the files in the multimedia file library by day, and classify and sort the files of each day according to the aspect ratio type to obtain the horizontal screen sub-file sequence, vertical screen sub-file sequence and / or square screen sub-file sequence of each day; then, based on the results of grouping by day, group the files in the multimedia file library by week, and based on the sub-file sequences of all days included in each week, obtain the sub-file sequence of each week; finally, based on the results of grouping by week, group the files in the multimedia file library by month, and based on the sub-file sequences of all weeks included in each month, the sub-file sequence of each month can be obtained.

[0083] In one implementation, in order to further improve the efficiency of generating the playback sequence, when pre-grouping the files in the multimedia file library in a step-by-step manner, a first high-level candidate sequence and a second high-level candidate sequence can be further generated for each group, and the following steps can be specifically used to implement it:

[0084] Step x1, when pre-grouping the files in the multimedia file library in a step-by-step manner, arrange the sub-file sequences of each group of files according to a preset sub-sequence sorting method to obtain a set of primary candidate sequences for the corresponding group.

[0085] In one implementation, the sub-sequence sorting method can be specifically implemented by the following method:

[0086] When the group contains three sub-file sequences, after fully arranging the square screen sub-file sequence and the horizontal screen sub-file sequence in the group, concatenate each full arrangement result with the vertical screen state sequence in the group to obtain the horizontal screen state sequence in the set of primary candidate sequences of the group; after fully arranging the vertical screen sub-file sequence and the square screen sub-file sequence in the group, concatenate each full arrangement result with the horizontal screen state sequence in the group to obtain the vertical screen state sequence in the set of primary candidate sequences of the group.

[0087] When the group contains only two sub-file sequences, fully arrange the two sub-file sequences to obtain the horizontal screen state sequence or the vertical screen state sequence in the set of primary candidate sequences of the group; among them, if the group contains a square screen sub-file sequence, the screen state corresponding to each full arrangement result is the aspect ratio type of the non-square screen sub-file sequence, otherwise, the screen state corresponding to each full arrangement result is the aspect ratio type of the first sub-file sequence.

[0088] When a group contains only one sub - file sequence, the sub - file sequence is used as the only sequence member in the set of primary candidate sequences of the group; among them, if the sequence in the set of primary candidate sequences is a square - screen sub - file sequence, the sequence belongs to both the landscape - screen state sequence and the portrait - screen state sequence at the same time, otherwise, the screen state corresponding to the sequence is the aspect - ratio type of the sub - file sequence.

[0089] Based on the above sub - sequence sorting method, a set of primary candidate sequences for each group can be obtained, and this set will contain landscape - screen state sequences and / or portrait - screen state sequences. The specific possible landscape - screen state sequences, portrait - screen state sequences and the corresponding device rotation times in the set of primary candidate sequences are shown in Table 1 below:

[0090]

[0091] Table 1

[0092] In Table 1 above, Sub1 represents a landscape - screen sub - file sequence, Sub2 is a square - screen sub - file sequence, and Sub3 is a portrait - screen sub - file sequence. It can be seen from Table 1 above that the maximum rotation times of each sequence in the set of primary candidate sequences is 1.

[0093] The following uses Figure 2 the process shown to give an exemplary illustration of the specific implementation of the above sub - sequence sorting method. As Figure 2 shown, for a group Group1, this group contains files with three aspect ratios. According to the above sub - sequence sorting method, 4 sequences can be obtained, that is, Figure 2 the two portrait - screen state sequences shown in the upper row on the right in Figure 2 and the two landscape - screen state sequences shown in the lower row on the right in

[0094] Landscape sequence Portrait sequence Sub1->Sub2->Sub3 Sub3->Sub2->Sub1 Sub2->Sub1->Sub3 Sub2->Sub3->Sub1

[0095] Table 2

[0096] Step x2: For each n - th level group G n,i , based on the principle of the least device rotation times, generate the first - level high - candidate sequences of the group G n,i in each screen state, based on the set of primary candidate sequences of all (n - 1) - th level groups in the group G n,i , where n>1.

[0097] In this step, for groups G n,i above the second level, based on the set of primary candidate sequences of the corresponding lower - level groups, generate the first - level high - candidate sequences of the group G n,i according to the principle of the least device rotation times. In this way, the n - th level group G n,iThe first high-level candidate sequence will satisfy the sequentiality of the (n-1)-th level grouping within the group.

[0098] In one implementation, this step can adopt the following method to generate the grouping G according to the principle of the least number of device rotations. n,i The first high-level candidate sequence in each screen state:

[0099] For each screen state T i , take this screen state T i as the current screen state, traverse the (n-1)-th level grouping in the grouping G n,i . For each traversed (n-1)-th level grouping, select a sequence that matches the current screen state from the set of primary candidate sequences of this (n-1)-th level grouping, and determine the screen state after playing the selected sequence in the current screen state. Update the current screen state to the currently determined screen state; concatenate all the selected sequences in sequence to obtain the grouping G n,i The first high-level candidate sequence in the screen state T i .

[0100] Step x3. For each second-level grouping G 2,i , take all the first-level groupings in this grouping G 2,i as the target sorting groupings for multi-group sorting. According to the preset multi-group sorting method, based on the sub-file sequences of the target sorting groupings, obtain the preferred playback sequence of this grouping G 2,i in each screen state, and use it as the second high-level candidate sequence of the grouping G 2,i in the corresponding screen state.

[0101] In one implementation, the multi-group sorting method can be implemented by the following method:

[0102] Step r1. For each target sorting grouping for multi-group sorting, arrange all the sub-file sequences of this target sorting grouping according to the preset sub-sequence sorting method to obtain the set of primary candidate sequences of this target sorting grouping.

[0103] The specific implementation method of this step is the same as that described in step x1 above and will not be elaborated here.

[0104] In addition, if the set of primary candidate sequences of the target sorting grouping has been pre-generated, this step does not need to generate the set of primary candidate sequences for this target sorting grouping again.

[0105] Step r2. Based on the sets of primary candidate sequences of all the target sorting groupings, construct a sequence relationship network.

[0106] Among them, a node in the sequence relationship network represents a sequence in the primary candidate sequence set, and the weight value of the node is the number of device rotations required when playing the sequence to which the node belongs. Each node is connected to all nodes corresponding to the adjacent target sorting groups of the target sorting group to which it belongs. The path weight value between adjacent nodes represents the number of device rotations required for playing and switching between the corresponding sequences.

[0107] Step r3: Traverse each sequence in the primary candidate sequence set of the target sorting group with the smallest serial number. Among all paths from this sequence as the starting node to the node of the target sorting group with the largest serial number in the sequence relationship network, select the path with the smallest total path weight as the excellent path corresponding to this sequence; the total path weight is the sum of the weights of all nodes and all node paths in the path.

[0108] Step r4: Based on the excellent path, determine the path with the least number of device rotations in each screen state to obtain the preferred playback sequence in the corresponding screen state.

[0109] In the above multi-group sorting method, by means of the shortest path, the preferred playback sequence in each screen state is obtained, and the size of the path is determined by the number of device rotations, so that the number of device rotations corresponding to the preferred playback sequence in each screen state is the least.

[0110] Step x4: For each k-level group G k,i , based on the principle of the least number of device rotations, generate the second-level candidate sequences of the group G k,i in each screen state from all the second-level candidate sequences of the k-1-level groups in the group G k,i ; k is greater than 2.

[0111] This step is used to generate the second-level candidate sequences of groups above the third level in each screen state (including landscape and portrait).

[0112] In one implementation, this step can adopt the following method to generate the second-level candidate sequences of the group G k,i in each screen state based on the principle of the least number of device rotations:

[0113] For each screen state T i , take this screen state T i as the current screen state, and traverse the group G k,iFor the (k - 1)-th level grouping, for each (k - 1)-th level grouping traversed, select a sequence that matches the current screen state from the second-highest candidate sequence of the (k - 1)-th level grouping, and determine the screen state after playing the selected sequence in the current screen state. Update the current screen state to the currently determined screen state; concatenate all the selected sequences in sequence to obtain the grouping G k,i In the screen state T i The second-highest candidate sequence.

[0114] In the above method, considering that the screen state may change after playing the sequences of each grouping, therefore, after selecting a sequence, it is necessary to determine the screen state after playing the selected sequence in the current screen state, so as to select the sequences of the next grouping based on this screen state, so that it can be ensured that the number of device rotations of the second-highest candidate sequence obtained by concatenating all the selected sequences finally is the least.

[0115] It should be noted that since the second-highest candidate sequence of each level grouping is generated based on the second-highest candidate sequence of the next level grouping it contains, and the second-highest candidate sequence of the second-level grouping is generated based on the sub-file sequences of the first-level groupings it contains, in this way, the second-highest candidate sequence of the second-level grouping can ensure the order of the first-level groupings within the group. Therefore, the second-highest candidate sequence of each level grouping can ensure the order of the first-level groupings within the group. Thus, when playing the file later, if it is necessary to ensure the order of the first-level groupings, the second-level highest candidate sequence can be considered to generate the file playback sequence.

[0116] In practical applications, there is no requirement for the execution order of step x2 for generating the first-highest candidate sequence and steps x3 and x4 for generating the second-highest candidate sequence, that is, steps x3 and x4 can be executed before step x2 or can be executed synchronously.

[0117] Step 102: When receiving a file playback instruction, according to the file playback instruction, based on the sub-file sequences of the corresponding group in the multimedia file library, generate a file playback sequence and play it according to the principle of the least number of device rotations.

[0118] This step is used to generate a file playback sequence according to the principle of the least number of device rotations based on the pre-generated sub-file sequences. In this way, it can not only avoid the display of the number of device rotations during playback, but also improve the generation efficiency of the file playback sequence and reduce the playback overhead.

[0119] In one embodiment, when only generating corresponding sub-file sequences for each group in step 101, in step 102, according to different situations of whether there is a specified sorting requirement in the play instruction, the following method can be used to generate the file play sequence:

[0120] Case 1: When the file play instruction does not contain a play order condition related to the group parameter, based on the sub-file sequences of the groups below the nth level within the file play range indicated by the file play instruction, in the way of concatenating the same type of sub-file sequences, generate the sub-file sequence corresponding to the file play range; in the way that the sub-file sequence with the aspect ratio type matching the current screen state is preferentially placed at the head of the sequence, arrange the generated sub-file sequences to obtain the file play sequence; the n max is the highest group level corresponding to the complete group included in the file play range. max

[0121] Here, when the file play instruction does not contain a play order condition related to the group parameter, the sub-file sequences of the groups below the nth level within the file play range indicated by the instruction will be used to generate the sub-file sequence corresponding to this file play range in the way of concatenating the same type of sub-file sequences. Then, in the way that the sub-file sequence with the aspect ratio type matching the current screen state is preferentially placed at the head of the sequence, arrange the generated sub-file sequences to obtain the file play sequence. In this way, the maximum number of device rotations corresponding to the finally obtained file play sequence is 1 time, thus avoiding the problem of frequent device rotation during playback. max

[0122] In one embodiment, specifically, the following method can be used to generate the sub-file sequence corresponding to the file play range based on the sub-file sequences of the groups below the nth level within the file play range indicated by the file play instruction in the way of concatenating the same type of sub-file sequences: max

[0123] If there is an incomplete nth-level group in the file play range, then for each incomplete nth-level group, based on the sub-file sequences of the nth-level group included in this nth-level group within the file play range, generate the sub-file sequence corresponding to this nth-level group within the file play range in the way of concatenating the same type of sub-file sequences; the n max is the highest group level corresponding to when the incomplete nth-level group is composed of complete groups of the same level; max max max-i max max-i max ​​​​​​​​​

[0124] Based on all the sub - file sequences of the n - th level grouping within the file playback range, in the manner of concatenating the same - type sub - file sequences, generate the sub - file sequences of each aspect - ratio type within the file playback range. max In the above method, considering that there is no corresponding sub - file sequence pre - generated for the incomplete n - th level grouping, therefore, it is necessary to first generate the corresponding sub - file sequences of each aspect - ratio type for each incomplete n - th level grouping, so that they can be integrated with the sub - file sequences of other complete n - th level groupings within the file playback range to obtain the sub - file sequences of each aspect - ratio type within the file playback range.

[0125] In the above method, considering that for the incomplete n - th level grouping, there is no corresponding sub - file sequence pre - generated. max Therefore, it is necessary to first generate the corresponding sub - file sequences of each aspect - ratio type for each incomplete n - th level grouping max so that they can be integrated with the sub - file sequences of other complete n - th level groupings within the file playback range max to obtain the sub - file sequences of each aspect - ratio type within the file playback range.

[0126] Case 2: When the file playback instruction contains a playback order condition related to the grouping parameter, based on the sub - file sequences of the groupings below the n - th level within the file playback range, generate a file playback sequence with the least number of device rotations in the current screen state according to the multi - grouping sorting method; where the n min is the lowest grouping level corresponding to the grouping parameter indicated by the playback order condition. min Here, when the file playback instruction contains a playback order condition related to the grouping parameter, the sub - file sequences of the groupings below the n - th level within the file playback range indicated by the instruction will be used to generate a file playback sequence with the least number of device rotations in the current screen state according to the above - mentioned multi - grouping sorting method. In this way, it can meet the playback order requirements of the instruction and reduce the number of device rotations, avoiding the problem of frequent rotation of the display device during playback.

[0127] In an embodiment, the following method can be specifically used to generate a file playback sequence with the least number of device rotations in the current screen state based on the sub - file sequences of the groupings below the n - th level within the file playback range according to the multi - grouping sorting method: min If there is an incomplete n - th level grouping within the file playback range, then for each such incomplete n - th level grouping, based on the sub - file sequences of the n - th level grouping included in this n - th level grouping within the file playback range, generate the corresponding sub - file sequence of this n - th level grouping within the file playback range in the manner of concatenating the same - type sub - file sequences. The n

[0128] In an embodiment, specifically, the following method can be used to generate a file playback sequence with the least number of device rotations in the current screen state based on the sub - file sequences of the groupings below the n - th level within the file playback range according to the multi - grouping sorting method: min If there is an incomplete n - th level grouping within the file playback range, then for each such incomplete n - th level grouping, based on the sub - file sequences of the n - th level grouping included in this n - th level grouping within the file playback range, generate the corresponding sub - file sequence of this n - th level grouping within the file playback range in the manner of concatenating the same - type sub - file sequences.

[0129] If there is an incomplete n - th level grouping within the file playback range, min then for each such incomplete n - th level grouping, min based on the sub - file sequences of the n - th level grouping included in this n - th level grouping within the file playback range, min generate the corresponding sub - file sequence of this n - th level grouping within the file playback range in the manner of concatenating the same - type sub - file sequences. min-i The n min is the lowest grouping level corresponding to the grouping parameter indicated by the playback order condition. min-iFor the incomplete nth min The highest grouping level corresponding to when the grouping at the same level is composed of complete groupings at the same level;

[0130] All nth min level groupings within the file playback range are used as the target sorted groupings for multi-group sorting. According to the multi-group sorting method, based on the sub-file sequence of the target sorted groupings, a preferred playback sequence for each screen state is obtained, and the preferred playback sequence that matches the current screen state is used as the file playback sequence.

[0131] The specific implementation of the multi-group sorting method in the above method is the same as that described above and will not be elaborated here.

[0132] In one embodiment, when the first high-level candidate sequence and the second high-level candidate sequence are generated for groupings above the second level in step 101, in step 102, the following method can be used to generate the file playback sequence according to different situations of whether there is a specified sorting requirement in the playback instruction:

[0133] Situation 1: When the file playback instruction does not contain a playback order condition related to the grouping parameter.

[0134] Based on the sub-file sequence of groupings below the nth max level within the file playback range indicated by the file playback instruction, the sub-file sequence corresponding to the file playback range is generated in the way of concatenating similar sub-file sequences; the generated sub-file sequence is arranged in the way that the sub-file sequence with an aspect ratio type matching the current screen state is preferentially placed at the head of the sequence to obtain the file playback sequence; the n max is the highest grouping level corresponding to the complete groupings included in the file playback range.

[0135] The specific implementation method of this step is the same as that described in the first method for generating the file playback sequence proposed above and will not be elaborated here.

[0136] Situation 2: When the file playback instruction contains a playback order condition related to the grouping parameter.

[0137] Step y1: Determine the lowest grouping level n min .

[0138] This step is used to determine the lowest level of sorting requirement indicated by the file playback instruction, so as to select a suitable method for generating the playback sequence accordingly in subsequent steps. For example, if the playback instruction requires sorting by day and "day" is a first-level grouping parameter, then n min= 1. For another example, if the play instruction requires sorting by month and "month" is the third-level grouping parameter, then n min = 3.

[0139] Step y2. When n min = 1, search for the highest grouping level n corresponding to the case where the file play range consists of complete groupings at the same level. z,max , if the search is successful and n z,max > 1, then based on the second-highest candidate sequences of all the n z,max -level groupings in the file play range, generate a file play sequence in the current screen state according to the principle of the least number of device rotations. Otherwise, use the first-level grouping in the file play range as the target sorting grouping for multi-group sorting, and according to the multi-group sorting method, based on the sub-file sequences of the target sorting grouping, obtain a preferred play sequence for each screen state, and use the preferred play sequence that matches the current screen state as the file play sequence.

[0140] Here, when n min = 1, it means that according to the indication of the file play instruction, the generated file play sequence needs to ensure the first-level grouping order. For example, if the play instruction requires sorting by day and "day" is the first-level grouping parameter, then the generated file play sequence needs to satisfy the order of "days". At this time, considering that the second-highest candidate sequence can satisfy the order of the first-level grouping, therefore, the second-highest candidate sequences of each grouping within the query range can be used to generate the file play sequence. In this way, not only can the file play sequence satisfy the order of the first-level grouping and the number of device rotations is small, but also the pre-generated second-highest candidate sequence can be used to improve the generation order of the file play sequence.

[0141] In one implementation, the following method can be specifically used to generate a file play sequence in the current screen state based on the second-highest candidate sequences of the n z,max -level groupings in the file play range according to the principle of the least number of device rotations:

[0142] Traverse all the n z,max -level groupings in the file play range. For each n z,max -level grouping traversed, select a sequence that matches the current screen state from the second-highest candidate sequences of this n z,max -level grouping, determine the screen state after playing the selected sequence in the current screen state, and update the current screen state to the currently determined screen state; sequentially concatenate all the selected sequences to obtain the file play sequence.

[0143] When n minWhen it is > 1, determine whether the file playing range consists of complete (n + 1)-level groupings. If so, generate a file playing sequence in the current screen state based on the first high-level candidate sequences of all (n + 1)-level groupings within the file playing range according to the principle of the least number of device rotations. Otherwise, generate a file playing sequence in the current screen state with the least number of device rotations based on the sub-file sequences of groupings below the nth level within the file playing range according to the multi-group sorting method. min When it is > 1, it indicates that according to the indication of the file playing instruction, the generated file playing sequence needs to ensure the order of groupings above the second level. For example, if the playing instruction requires sorting by month and "month" is a third-level grouping parameter, then the generated file playing sequence needs to satisfy the order of "month". min In the above method, considering that the first high-level candidate sequence can satisfy the order of the corresponding next-level grouping, when it is > 1, if it is determined that the file playing range consists of complete (n + 1)-level groupings, then the first high-level candidate sequences of (n + 1)-level groupings within the playing range can be directly used to generate the file playing sequence. In one implementation, the following method can be specifically adopted to generate a file playing sequence in the current screen state based on the first high-level candidate sequences of all (n + 1)-level groupings within the file playing range according to the principle of the least number of device rotations: min Traverse all (n + 1)-level groupings within the file playing range. For each (n + 1)-level grouping traversed, select a sequence that matches the current screen state from the first high-level candidate sequences of this (n + 1)-level grouping, determine the screen state after playing the selected sequence in the current screen state, and update the current screen state to the currently determined screen state; concatenate all the selected sequences in sequence to obtain the file playing sequence.

[0144] Here, when n min > 1, it indicates that according to the indication of the file playing instruction, the generated file playing sequence needs to ensure the order of groupings above the second level. For example, if the playing instruction requires sorting by month and "month" is a third-level grouping parameter, then the generated file playing sequence needs to satisfy the order of "month".

[0145] In the above method, considering that the first high-level candidate sequence can satisfy the order of the corresponding next-level grouping, when n min > 1, if it is determined that the file playing range consists of complete (n + 1)-level groupings, then the first high-level candidate sequences of (n + 1)-level groupings within the playing range can be directly used to generate the file playing sequence. In one implementation, the following method can be specifically adopted to generate a file playing sequence in the current screen state based on the first high-level candidate sequences of all (n + 1)-level groupings within the file playing range according to the principle of the least number of device rotations: min + 1-level grouping, then the first high-level candidate sequences of (n + 1)-level groupings within the playing range can be directly used to generate the file playing sequence. In one implementation, the following method can be specifically adopted to generate a file playing sequence in the current screen state based on the first high-level candidate sequences of all (n + 1)-level groupings within the file playing range according to the principle of the least number of device rotations: min + 1-level grouping, then the first high-level candidate sequences of (n + 1)-level groupings within the playing range can be directly used to generate the file playing sequence. In one implementation, the following method can be specifically adopted to generate a file playing sequence in the current screen state based on the first high-level candidate sequences of all (n + 1)-level groupings within the file playing range according to the principle of the least number of device rotations: min + 1-level grouping, then the first high-level candidate sequences of (n + 1)-level groupings within the playing range can be directly used to generate the file playing sequence. In one implementation, the following method can be specifically adopted to generate a file playing sequence in the current screen state based on the first high-level candidate sequences of all (n + 1)-level groupings within the file playing range according to the principle of the least number of device rotations:

[0146] Traverse all (n + 1)-level groupings within the file playing range. For each (n + 1)-level grouping traversed, select a sequence that matches the current screen state from the first high-level candidate sequences of this (n + 1)-level grouping, determine the screen state after playing the selected sequence in the current screen state, and update the current screen state to the currently determined screen state; concatenate all the selected sequences in sequence to obtain the file playing sequence. min + 1-level grouping, for each (n + 1)-level grouping traversed, select a sequence that matches the current screen state from the first high-level candidate sequences of this (n + 1)-level grouping, determine the screen state after playing the selected sequence in the current screen state, and update the current screen state to the currently determined screen state; concatenate all the selected sequences in sequence to obtain the file playing sequence. min + 1-level grouping, from the first high-level candidate sequences of this (n + 1)-level grouping, select a sequence that matches the current screen state, determine the screen state after playing the selected sequence in the current screen state, and update the current screen state to the currently determined screen state; concatenate all the selected sequences in sequence to obtain the file playing sequence. min + 1-level grouping, select a sequence that matches the current screen state from the first high-level candidate sequences of this (n + 1)-level grouping, determine the screen state after playing the selected sequence in the current screen state, and update the current screen state to the currently determined screen state; concatenate all the selected sequences in sequence to obtain the file playing sequence.

[0147] In the above method, when n min > 1, if it is determined that the file playing range does not consist of complete (n + 1)-level groupings, then it is necessary to use the sub-file sequences of groupings below the nth level within the file playing range min + 1-level grouping, then the first high-level candidate sequences of (n + 1)-level groupings within the playing range can be directly used to generate the file playing sequence. In one implementation, the following method can be specifically adopted to generate a file playing sequence in the current screen state based on the first high-level candidate sequences of all (n + 1)-level groupings within the file playing range according to the principle of the least number of device rotations: minFor the sub-file sequences in the group below a certain level, according to the multi-group sorting method, a file playback sequence with the least number of device rotations in the current screen state is generated. The specific method is the same as above.

[0148] The following combines several application examples to schematically illustrate the specific implementation of the above method embodiments:

[0149] Example 1: Organize and play files according to the aspect ratio and time.

[0150] 1) Pre-group files:

[0151] According to the grouping parameter sequence: a sequence composed of day, week, month, and year in turn, group the files in the multimedia file library level by level to obtain 4-level grouped files. Figure 3 This is the grouping schematic diagram for this example. Figure 3 Schematically shows the file organizational structure of one group in each level of grouping. Among them, Seq1 represents the primary candidate sequence set, and Seq2 represents the first high-level candidate sequence set. As Figure 3 shown, first perform the first-level grouping process on the files in the multimedia file library: After grouping the files by day, record the "day" where the file is located. Then, for each group corresponding to each day, classify the files within the group according to the aspect ratio type to obtain the sub-file sequences of the group, such as: Sub1, Sub2, Sub3. Then, based on these sub-file sequences, perform sorting to obtain the primary candidate sequence set (Seq1) of the group, that is, four sequences: Sub1->Sub2->Sub3, Sub2->Sub1->Sub3, Sub3->Sub2->Sub1Sub2->Sub3->Sub1.

[0152] After the first-level grouping process is completed, then perform the second-level grouping process on the files by "week": Group the files in the multimedia file library by "week", record the "week" where the file is located. Then, based on the sub-file sequences and the primary candidate sequence set of each day obtained from the first-level grouping, perform file sorting on each group corresponding to each week to obtain the primary candidate sequence set (Seq1) and the first high-level candidate sequence set (Seq2) of each group corresponding to each week.

[0153] After the second-level grouping process is completed, then perform the third-level grouping process on the files by "month": Group the files in the multimedia file library by "month", record the "month" where the file is located. Then, based on the sub-file sequences and the primary candidate sequence set of each week obtained from the second-level grouping, perform file sorting on each group corresponding to each month to obtain the primary candidate sequence set (Seq1) and the first high-level candidate sequence set (Seq2) of each group corresponding to each month.

[0154] After the third-level grouping process is completed, the files are further grouped at the fourth level by "year": the files in the multimedia file library are grouped by "year", and the "year" in which the files are located is recorded. Then, based on the monthly sub-file sequences and the set of primary candidate sequences obtained from the third-level grouping, the files in each corresponding year are sorted to obtain the set of primary candidate sequences (Seq1) and the set of first-level advanced candidate sequences (Seq2) for each corresponding year's grouping.

[0155] 2) When the user selects the automatic playback of videos and photos within a time period, the pre-established file sequences of each level of grouping can be used for browsing:

[0156] When the user does not care about the shooting time, the sequences in the set of primary candidate sequences can be used for browsing, which only requires one rotation;

[0157] When the user cares about the shooting time and needs to sort and browse the videos and photos within a specified time period according to time parameters such as week, month, and day, the above-mentioned sub-file sequences and / or the sequences in the set of first-level advanced candidate sequences can be used to achieve the purpose of minimizing the number of rotations.

[0158] For example, when the user needs to browse the files in the time range from April 15, 2021 to May 31, 2021 in the order of weeks, the browsing sequence can be generated according to Figure 4 the shown process. As Figure 4 shown, the time range from April 15, 2021 to May 31, 2021 includes the files in weeks 15 to 23 (i.e., Figure 4 week15~week23 in it), where weeks 15 and 23 are incomplete weeks. Week 15 only includes Thursday to Sunday, and week 23 only includes Monday.

[0159] When generating the browsing sequence, the corresponding sub-file sequences need to be generated for the incomplete weeks 15 and 23 respectively. Specifically: using the daily sub-file sequences in the range from April 15, 2021 to April 18, 2021, the sub-file sequence corresponding to week 15 in the time range from April 15, 2021 to May 31, 2021 is generated in the way of concatenating the same type of sub-file sequences; and week 23 only corresponds to one day, i.e., May 31, 2021 in the time range from April 15, 2021 to May 31, 2021. Therefore, the sub-file sequence corresponding to May 31, 2021 is the sub-file sequence corresponding to week 23 in the time range from April 15, 2021 to May 31, 2021.

[0160] Then, generate a set of primary candidate sequences for the incomplete 15th week and 23rd week respectively. Finally, based on the respective sets of primary candidate sequences for the 15th week to the 23rd week, according to the multi-group sorting method, a file playback sequence matching the current screen state can be obtained.

[0161] For another example, when the user does not care about the shooting time and browses the files in the time range from April 15, 2021 to May 31, 2021, the process of generating the corresponding browsing sequence is as follows:

[0162] Since the time range from April 15, 2021 to May 31, 2021 includes the complete May, the sub-file sequence of May can be directly obtained.

[0163] For the incomplete April, the sub-file sequences of each day it contains can be used to generate the corresponding sub-file sequence of April in the time range from April 15, 2021 to May 31, 2021 in the way of concatenating the same type of sub-file sequences. Or, the sub-file sequences of the complete weeks in April (i.e., Figure 4 the 17th week and 18th week) and the sub-file sequences of each day in the incomplete week ( Figure 4 the 16th week) can be used to generate the corresponding sub-file sequence of April in the time range from April 15, 2021 to May 31, 2021 in the way of concatenating the same type of sub-file sequences.

[0164] Example 2: Organize and play files according to aspect ratio, time, and popularity.

[0165] For a short video service platform that can recommend content to users according to user characteristics, it can recommend horizontal and vertical screen videos to users according to the device screen state of the user. When the user uses a device with a rotatable screen, using the method of the embodiment of the present invention can achieve the purpose of reducing the number of rotations and maximizing the use of the screen.

[0166] 1) As Figure 2 shown, the following method can be used to preprocess file grouping:

[0167] S1. Determine the range of videos recommended to the user according to user characteristic data;

[0168] S2. Establish a correspondence between the number of views and popularity. For example, when the number of views is in the range of [0, 10], the corresponding popularity is 1;

[0169] S3. In the range of the videos, sort the files included in the same popularity according to the aspect ratio type to obtain a set of primary candidate sequences corresponding to each popularity;

[0170] S4. If there are embedded classifications (such as time) in the same preference file, then for the files included in the same preference, group them again according to time, for example, divide them by "day", and obtain the set of primary candidate sequences corresponding to each day in the same preference;

[0171] S5. For each preference, based on the set of primary candidate sequences for each day in this preference, obtain the first set of high-level candidate sequences (Seq2) of this preference in the order from the most recent to the oldest time;

[0172] 2) As Figure 5 shown, based on the above file grouping processing results, the following method can be used to recommend videos to users:

[0173] d1. Construct a recommendation sequence in the order from the most recent to the oldest time. Specifically: for each day within the specified time range, obtain all the groups of preferences on that day, and based on the sets of primary candidate sequences corresponding to these groups respectively, in the order from the highest to the lowest preference, use the multi-group sorting method to generate the first set of high-level candidate sequences corresponding to that day.

[0174] d2. Based on the first set of high-level candidate sequences for each day obtained in step d1 and the current screen state of the user device, determine the recommendation sequence corresponding to the corresponding day, and based on the recommendation sequence, perform video recommendation in the order from the most recent to the oldest time.

[0175] Based on the above method embodiments, the embodiments of the present invention also disclose a multimedia file playing device for a rotating device, as Figure 7 shown, the device includes:

[0176] A preprocessing unit, configured to pre-group the files in the multimedia file library in a hierarchical grouping manner based on a specified grouping parameter sequence, and generate a sub-file sequence of each aspect ratio type in the corresponding group based on each group of files; wherein, the aspect ratio types include landscape, portrait, and square screen; different parameters in the grouping parameter sequence correspond to different grouping granularities.

[0177] A playing unit, configured to, when receiving a file playing instruction, based on the sub-file sequence of the corresponding group in the multimedia file library according to the file playing instruction, generate a file playing sequence and play it according to the principle of the least number of device rotations.

[0178] Since the device embodiments of the present invention and the method embodiments of the present invention are implemented based on the same inventive concept, and the principles of solving problems are similar, the specific implementation of the technical features in the above units is the same as that in the above method embodiments, and will not be elaborated here.

[0179] Based on the embodiments of the multimedia file playing method for the above-mentioned rotating device, the embodiments of the present application also implement a multimedia file playing electronic device for a rotating device, including a processor and a memory; an application program executable by the processor is stored in the memory, and is used to enable the processor to execute the multimedia file playing method for the rotating device as described above. Specifically, a system or device equipped with a storage medium can be provided, and software program codes for implementing the functions of any one of the above embodiments are stored on the storage medium, and the computer (or CPU or MPU) of the system or device is made to read and execute the program codes stored in the storage medium. In addition, some or all of the actual operations can also be completed by an operating system operating on a computer based on instructions of the program codes. The program codes read from the storage medium can also be written into the memory provided in the expansion board inserted into the computer or the memory provided in the expansion unit connected to the computer, and then, based on the instructions of the program codes, the CPU etc. installed on the expansion board or the expansion unit are made to execute some and all of the actual operations, so as to implement the functions of any one of the embodiments of the multimedia file playing method for the rotating device as described above.

[0180] Among them, the memory can be specifically implemented as various storage media such as electrically erasable programmable read-only memory (EEPROM), flash memory, programmable read-only memory (PROM), etc. The processor can be implemented as including one or more central processing units or one or more field programmable gate arrays, and one or more central processing unit cores are integrated in the field programmable gate array. Specifically, the central processing unit or the central processing unit core can be implemented as a CPU or an MCU.

[0181] The embodiments of the present application implement a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by the processor, the steps of the multimedia file playing method for the rotating device as described above are implemented.

[0182] It should be noted that not all steps and modules in the above-mentioned processes and structure diagrams are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted according to needs. The division of each module is only for the convenience of description and is a functional division. In actual implementation, one module can be implemented by multiple modules, and the functions of multiple modules can also be implemented by the same module. These modules can be located in the same device or in different devices.

[0183] The hardware modules in each embodiment can be implemented mechanically or electronically. For example, a hardware module can include specially designed permanent circuits or logic devices (such as dedicated processors, such as FPGAs or ASICs) for performing specific operations. A hardware module can also include programmable logic devices or circuits (such as including general-purpose processors or other programmable processors) temporarily configured by software for performing specific operations. As for whether to specifically adopt a mechanical approach, or dedicated permanent circuits, or temporarily configured circuits (such as configured by software) to implement the hardware module, it can be determined based on cost and time considerations.

[0184] In this document, "schematic" means "serving as an instance, example, or illustration", and any illustration or embodiment described as "schematic" in this document should not be construed as a more preferred or more advantageous technical solution. To make the drawings concise, only the parts related to the present invention are schematically shown in each figure, and do not represent their actual structure as a product. Additionally, to make the drawings concise and easy to understand, in some figures, for components with the same structure or function, only one of them is schematically shown, or only one of them is labeled. In this document, "a" does not mean that the quantity of the parts related to the present invention is limited to "only one", and "a" does not exclude the case where the quantity of the parts related to the present invention is "more than one". In this document, "up", "down", "front", "back", "left", "right", "inside", "outside", etc. are only used to represent the relative positional relationship between relevant parts, rather than limiting the absolute positions of these relevant parts.

[0185] The above are only the preferred embodiments of the present invention, and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for playing multimedia files of a rotating device, characterized in that, Including: Pre - group files in a multimedia file library based on a specified sequence of grouping parameters in a step - by - step grouping manner, and generate sub - file sequences of each aspect ratio type in each group based on the files in each group; wherein, the aspect ratio types include landscape, portrait, and square; different parameters in the grouping parameter sequence correspond to different grouping granularities; When a file playback instruction is received, based on the file playback instruction, generate a file playback sequence and play it according to the principle of the least number of device rotations based on the sub - file sequences of the corresponding group in the multimedia file library; Wherein, the method further includes: When pre - grouping the files in the multimedia file library in a step - by - step grouping manner, arrange the sub - file sequences of each group according to a preset sub - sequence sorting method to obtain a primary candidate sequence set of the corresponding group; For each nth-level group G n,i , based on the principle of minimizing the number of device rotations, generate, from the set of primary candidate sequences of all (n - 1)th-level groups in the group G n,i , a first high-level candidate sequence for the group G n,i in each screen state, where n > 1; For each second-level grouping G 2,i , all the first-level groupings in this grouping G 2,i are used as the target sorted groupings for multi-group sorting. According to the preset multi-group sorting method, based on the sub-file sequences of the target sorted groupings, the priority playback sequence of this grouping G 2,i in each screen state is obtained and used as the second-highest candidate sequence of the grouping G 2,i in the corresponding screen state; For each k-th level grouping G k,i , according to the principle of the least number of device rotations, based on all the second-highest candidate sequences of the (k - 1)-th level groupings in the grouping G k,i , generate the second-highest candidate sequence of the grouping G k,i in each screen state; where k > 2.

2. The multimedia file playback method according to claim 1, wherein: The grouping parameter sequence is generated based on the ascending order of the grouping granularity; The generating sub - file sequences of each aspect ratio type in each group based on the files in each group includes: Traverse each grouping parameter S in the grouping parameter sequence in turn n , based on the grouping parameter S n , perform grouping processing on the files in the multimedia file library, including: If the grouping parameter S n is the first grouping parameter S1, group the files in the multimedia file library according to the grouping parameter S1 to obtain the first-level grouping; for each of the first-level groupings, classify the files within the grouping according to the aspect ratio type of the files, sort the files of the same type, and obtain a sub-file sequence of each aspect ratio type based on the sorting. If the grouping parameter S n is a grouping parameter greater than or equal to the second, then based on the grouping parameter S n , all the (n - 1)-level groupings are grouped to obtain the n-level groupings; for each of the n-level groupings, based on the sub-file sequences of all the (n - 1)-level groupings in this n-level grouping, in the way of concatenating the sub-file sequences of the same type, the sub-file sequences of the corresponding aspect ratio type in this n-level grouping are obtained.

3. The multimedia file playing method according to claim 1, characterized in that The sub - sequence sorting method includes: When a group contains three sub - file sequences, after fully arranging the square - screen sub - file sequence and the landscape - screen sub - file sequence in the group, concatenate each full - arrangement result with the portrait - screen state sequence in the group to obtain the landscape - screen state sequence in the primary candidate sequence set of the group; after fully arranging the portrait - screen sub - file sequence and the square - screen sub - file sequence in the group, concatenate each full - arrangement result with the landscape - screen state sequence in the group to obtain the portrait - screen state sequence in the primary candidate sequence set of the group; When a group contains only two sub - file sequences, fully arrange the two sub - file sequences to obtain the landscape - screen state sequence or the portrait - screen state sequence in the primary candidate sequence set of the group; wherein, if the group contains a square - screen sub - file sequence, the screen state corresponding to each full - arrangement result is the aspect ratio type of the non - square - screen sub - file sequence, otherwise, the screen state corresponding to each full - arrangement result is the aspect ratio type of the first sub - file sequence; When a group contains only one sub - file sequence, use the sub - file sequence as the only sequence member in the primary candidate sequence set of the group; wherein, if the sequence in the primary candidate sequence set is a square - screen sub - file sequence, the sequence belongs to both the landscape - screen state sequence and the portrait - screen state sequence, otherwise, the screen state corresponding to the sequence is the aspect ratio type of the sub - file sequence.

4. The multimedia file playing method according to claim 1, wherein For each n-th level grouping G n,i , according to the principle of minimizing the number of device rotations, based on the set of primary candidate sequences of all (n - 1)-th level groupings in the grouping G n,i , generate the first high-level candidate sequence of the grouping G n,i The first high-level candidate sequence in each screen state includes: For each screen state T i , use this screen state T i as the current screen state, and traverse the (n - 1)-th level groups in the group G n,i . For each (n - 1)-th level group traversed, select a sequence that matches the current screen state from the set of primary candidate sequences of this (n - 1)-th level group, and determine the screen state after playing the selected sequence in the current screen state. Update the current screen state to the currently determined screen state; concatenate all the selected sequences in sequence to obtain the first high-level candidate sequence of the group G n,i in the screen state T i .

5. The multimedia file playing method according to claim 1, wherein Based on the principle of minimizing the number of device rotations, generate the grouping G based on the second-highest candidate sequences of all the (k-1)-level groupings in the grouping G k,i The second-highest candidate sequences in each screen state include: k,i The second-highest candidate sequences in each screen state include: For each screen state T i , use this screen state T i as the current screen state, and traverse the group G k,i at the (k - 1)-th level. For each traversed group at the (k - 1)-th level, select a sequence that matches the current screen state from the second-highest candidate sequence of this group at the (k - 1)-th level, and determine the screen state after playing the selected sequence in the current screen state. Update the current screen state to the currently determined screen state; concatenate all the selected sequences in sequence to obtain the second-highest candidate sequence k,i of the group G i under the screen state T 6. The multimedia file playing method according to claim 1, wherein The generating the file playback sequence includes: When the file playing instruction does not include a playing order condition related to the grouping parameter, based on the sub-file sequence of the grouping below the nth level within the file playing range indicated by the file playing instruction, in the way of concatenating the same type of sub-file sequences, generate the sub-file sequence corresponding to the file playing range; arrange the generated sub-file sequence in the way that the sub-file sequence with an aspect ratio type matching the current screen state is preferentially placed at the head of the sequence to obtain the file playing sequence; the n max is the highest grouping level corresponding to the complete grouping included in the file playing range; max ​ When the file playback instruction includes a playback order condition related to the grouping parameter, based on the sub-file sequence of the grouping below the n min th level within the file playback range, a file playback sequence with the least number of device rotations in the current screen state is generated according to a preset multi-group sorting method; where the n min is the lowest grouping level corresponding to the grouping parameter indicated by the playback order condition.

7. The multimedia file playing method according to claim 1, wherein The generating the file playback sequence includes: When the file playing instruction does not include a playing order condition related to the grouping parameter, based on the sub-file sequence of the grouping below the nth level within the file playing range indicated by the file playing instruction, in the way of concatenating the sub-file sequences of the same type, generate the sub-file sequence corresponding to the file playing range; arrange the generated sub-file sequence in the way that the sub-file sequence with an aspect ratio type matching the current screen state is preferentially placed at the head of the sequence to obtain the file playing sequence; the n max is the highest grouping level corresponding to the complete grouping included in the file playing range; max ​ When the file playing instruction includes a playing order condition related to the grouping parameter, determine the lowest grouping level n corresponding to the grouping parameter indicated by the playing order condition min ; When n min = 1, find the highest grouping level n corresponding to the case where the file playback range consists of complete same-level groupings z,max . If the search is successful and n z,max > 1, then based on the second-highest candidate sequences of all the n z,max -level groupings in the file playback range, generate a file playback sequence in the current screen state according to the principle of the least number of device rotations. Otherwise, use the first-level grouping in the file playback range as the target sorting grouping for multi-group sorting. According to the multi-group sorting method, based on the sub-file sequences of the target sorting grouping, obtain the preferred playback sequences for each screen state, and use the preferred playback sequence that matches the current screen state as the file playback sequence; When n min > 1, it is determined whether the file playing range consists of complete (n min + 1)-level groups. If so, based on the first high-level candidate sequences of all (n min + 1)-level groups in the file playing range, a file playing sequence in the current screen state is generated according to the principle of the least number of device rotations. Otherwise, based on the sub-file sequences of the groups below the n min -th level in the file playing range, a file playing sequence with the least number of device rotations in the current screen state is generated according to the multi-group sorting method.

8. The multimedia file playing method according to claim 1, 6 or 7, characterized in that, The multi - group sorting method includes: For each target sorting group in the multi - group sorting, arrange all the sub - file sequences of the target sorting group according to a preset sub - sequence sorting method to obtain a primary candidate sequence set of the target sorting group; Construct a sequence relationship network based on the set of primary candidate sequences grouped according to all the target sorting groups; wherein, a node in the sequence relationship network represents a sequence in the set of primary candidate sequences, and the weight of the node is the number of device rotations required when playing the sequence to which the node belongs. Each node is connected to all the nodes corresponding to the adjacent target sorting groups of the target sorting group to which it belongs, and the path weight between adjacent nodes represents the number of device rotations required for playing switching between the corresponding sequences. Traverse each sequence in the set of primary candidate sequences of the target sorting group with the smallest serial number. Among all the paths from this sequence as the starting node to the nodes of the target sorting group with the largest serial number in the sequence relationship network, select the path with the smallest total path weight as the excellent path corresponding to this sequence; the total path weight is the sum of the weights of all the nodes and all the node paths in the path. Based on the excellent path, determine the path with the fewest device rotations in each screen state to obtain the preferred playback sequence in the corresponding screen state.

9. The multimedia file playing method according to claim 6 or 7, characterized in that, The sub-file sequence of the grouping below the nth level within the file playing range indicated by the file playing instruction generates the sub-file sequence corresponding to the file playing range in the manner of concatenating the sub-file sequences of the same type, including: max ​ If there is an incomplete n-th max level grouping in the file playback range, then for each of the max incomplete n-th max level groupings, based on the sequence of sub-files of the n-th max - i level groupings contained in the file playback range, in the manner of concatenating similar sub-file sequences, generate the corresponding sub-file sequence of the n-th max level grouping in the file playback range; the n max - i is the highest grouping level corresponding when the incomplete n-th max level grouping consists of complete groupings of the same level; Based on all the sub-file sequences of the nth level grouping within the file playback range, in the manner of concatenating the sub-file sequences of the same type, generate the sub-file sequences of each aspect ratio type within the file playback range. max ​ 10. The multimedia file playing method according to claim 6 or 7, characterized in that, Based on the sub-file sequence of groups below the nth level within the file playing range indicated by the file playing instruction, generating a file playing sequence with the least number of device rotations in the current screen state according to the multi-group sorting method includes: min ​ If there is an incomplete n-th level grouping within the file playback range, then for each of the incomplete n-th level groupings, based on the sub-file sequence of the n-th level grouping included in the file playback range, in the manner of concatenating homogeneous sub-file sequences, generate the sub-file sequence corresponding to the n-th level grouping within the file playback range, where n is the highest grouping level corresponding to when the incomplete n-th level grouping is composed of complete groupings of the same level; min If there is an incomplete n-th level grouping within the file playback range, then for each of the incomplete n-th level groupings, based on the sub-file sequence of the n-th level grouping included in the file playback range, in the manner of concatenating homogeneous sub-file sequences, generate the sub-file sequence corresponding to the n-th level grouping within the file playback range, where n is the highest grouping level corresponding to when the incomplete n-th level grouping is composed of complete groupings of the same level; min If there is an incomplete n-th level grouping within the file playback range, then for each of the incomplete n-th level groupings, based on the sub-file sequence of the n-th level grouping included in the file playback range, in the manner of concatenating homogeneous sub-file sequences, generate the sub-file sequence corresponding to the n-th level grouping within the file playback range, where n is the highest grouping level corresponding to when the incomplete n-th level grouping is composed of complete groupings of the same level; min If there is an incomplete n-th level grouping within the file playback range, then for each of the incomplete n-th level groupings, based on the sub-file sequence of the n-th level grouping included in the file playback range, in the manner of concatenating homogeneous sub-file sequences, generate the sub-file sequence corresponding to the n-th level grouping within the file playback range, where n is the highest grouping level corresponding to when the incomplete n-th level grouping is composed of complete groupings of the same level; min - i If there is an incomplete n-th level grouping within the file playback range, then for each of the incomplete n-th level groupings, based on the sub-file sequence of the n-th level grouping included in the file playback range, in the manner of concatenating homogeneous sub-file sequences, generate the sub-file sequence corresponding to the n-th level grouping within the file playback range, where n is the highest grouping level corresponding to when the incomplete n-th level grouping is composed of complete groupings of the same level; min If there is an incomplete n-th level grouping within the file playback range, then for each of the incomplete n-th level groupings, based on the sub-file sequence of the n-th level grouping included in the file playback range, in the manner of concatenating homogeneous sub-file sequences, generate the sub-file sequence corresponding to the n-th level grouping within the file playback range, where n is the highest grouping level corresponding to when the incomplete n-th level grouping is composed of complete groupings of the same level; min - i If there is an incomplete n-th level grouping within the file playback range, then for each of the incomplete n-th level groupings, based on the sub-file sequence of the n-th level grouping included in the file playback range, in the manner of concatenating homogeneous sub-file sequences, generate the sub-file sequence corresponding to the n-th level grouping within the file playback range, where n is the highest grouping level corresponding to when the incomplete n-th level grouping is composed of complete groupings of the same level; min If there is an incomplete n-th level grouping within the file playback range, then for each of the incomplete n-th level groupings, based on the sub-file sequence of the n-th level grouping included in the file playback range, in the manner of concatenating homogeneous sub-file sequences, generate the sub-file sequence corresponding to the n-th level grouping within the file playback range, where n is the highest grouping level corresponding to when the incomplete n-th level grouping is composed of complete groupings of the same level; All the nth-level groupings within the file playing range are used as the target sorting groupings for multi-group sorting. According to the multi-group sorting method, based on the sub-file sequence of the target sorting groupings, a preferred playing sequence for each screen state is obtained, and the preferred playing sequence that matches the current screen state is used as the file playing sequence. min ​ 11. The multimedia file playing method according to claim 7, wherein The second highest candidate sequence of the nth z,max level grouping in the file playback range generates a file playback sequence in the current screen state according to the principle of the least number of device rotations, including: Traverse all the nth-level groupings within the file playback range. For each nth-level grouping traversed, select a sequence that matches the current screen state from the second-highest candidate sequence of this nth-level grouping, determine the screen state after playing the selected sequence in the current screen state, and update the current screen state to the currently determined screen state; z,max Traverse all the nth-level groupings within the file playback range. For each nth-level grouping traversed, select a sequence that matches the current screen state from the second-highest candidate sequence of this nth-level grouping, determine the screen state after playing the selected sequence in the current screen state, and update the current screen state to the currently determined screen state; z,max Traverse all the nth-level groupings within the file playback range. For each nth-level grouping traversed, select a sequence that matches the current screen state from the second-highest candidate sequence of this nth-level grouping, determine the screen state after playing the selected sequence in the current screen state, and update the current screen state to the currently determined screen state; z,max Traverse all the nth-level groupings within the file playback range. For each nth-level grouping traversed, select a sequence that matches the current screen state from the second-highest candidate sequence of this nth-level grouping, determine the screen state after playing the selected sequence in the current screen state, and update the current screen state to the currently determined screen state; Connect all the selected sequences in sequence to obtain the file playback sequence.

12. The multimedia file playing method according to claim 7, wherein The first high-level candidate sequence of all (n + 1)-th level groups in the file playback range generates a file playback sequence in the current screen state according to the principle of the least number of device rotations, including: min ​ Traverse all the (n + 1)-th level groups within the file playback range. For each (n + 1)-th level group traversed, min select a sequence that matches the current screen state from the first high-level candidate sequences of the (n + 1)-th level group, determine the screen state after playing the selected sequence in the current screen state, and update the current screen state to the currently determined screen state; min For each (n + 1)-th level group traversed, from the (n + 1)-th level group min select a sequence that matches the current screen state from the first high-level candidate sequences of the (n + 1)-th level group, determine the screen state after playing the selected sequence in the current screen state, and update the current screen state to the currently determined screen state; Connect all the selected sequences in sequence to obtain the file playback sequence.

13. A multimedia file playing device for a rotating device, characterized in that, Comprising: A preprocessing unit for pre-grouping the files in the multimedia file library in a hierarchical grouping manner based on a specified grouping parameter sequence, and generating a sub-file sequence of each aspect ratio type in the corresponding group based on each group of files; wherein, the aspect ratio types include landscape, portrait, and square screen; different parameters in the grouping parameter sequence correspond to different grouping granularities. A playback unit for, when receiving a file playback instruction, generating and playing a file playback sequence based on the sub-file sequence of the corresponding group in the multimedia file library according to the principle of the fewest device rotations according to the file playback instruction. Among them, the preprocessing unit is further configured to, when grouping the files in the multimedia file library in a step-by-step grouping manner in advance, arrange the sub-file sequences of each group of files according to a preset subsequence sorting method to obtain a primary candidate sequence set for the corresponding group; for each nth-level grouping G n,i , based on the principle of the least number of device rotations, generate the first high-level candidate sequence of the grouping G n,i in each screen state from the primary candidate sequence sets of all (n - 1)th-level groupings in the grouping G n,i , where n > 1; for each second-level grouping G 2,i , take all the first-level groupings in the grouping G 2,i as the target sorting groupings for multi-group sorting, and obtain the preferred playback sequence of the grouping G 2,i in each screen state according to a preset multi-group sorting method based on the sub-file sequences of the target sorting groupings, and use it as the second high-level candidate sequence of the grouping G 2,i in the corresponding screen state; for each kth-level grouping G k,i , based on the principle of the least number of device rotations, generate the second high-level candidate sequence of the grouping G k,i in each screen state from the second high-level candidate sequences of all (k - 1)th-level groupings in the grouping G k,i , where k > 2.

14. A non-volatile computer-readable storage medium storing instructions, wherein, When executed by a processor, the instruction causes the processor to execute the steps of the multimedia file playback method of rotating a device as described in any one of claims 1 to 12.

15. An electronic device, characterized in that, Comprising the non-volatile computer-readable storage medium as described in claim 14, and the processor accessible to the non-volatile computer-readable storage medium.

Citation Information

Patent Citations

  • Display apparatus

    CN101996040A

  • System of looking at batches of pictures quickly on handheld electronic equipment and method

    CN103116631A