A method, apparatus and device for identifying sequence tag order anomalies

CN117130989BActive Publication Date: 2026-10-30ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311051202.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-18
Publication Date
2026-10-30
Estimated Expiration
2043-08-18

AI Technical Summary

Technical Problem

[0005]本说明书实施例提供一种序列标记顺序异常的识别方法、装置和设备,以解决现有的无法及时发现文件序列中标记顺序异常的问题

Benefits of technology

[0029]本说明书一个实施例至少能够达到以下有益效果:通过从文件序列对应的文件名序列中提取数字序列,进而从数字序列中识别出有序子序列,并对有序子序列的类型进行判断,当各有序子序列均为升序序列时确定文件序列的文件标记顺序正常,否则确定文件序列的文件标记顺序异常,由此,能够快速、准确地发现文件序列的序列标记顺序异常的情况。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117130989B_ABST
    Figure CN117130989B_ABST
Patent Text Reader

Abstract

The embodiment of the specification discloses a sequence label order abnormality identification method, device and equipment. The scheme can include: acquiring a file name sequence corresponding to a file sequence, the arrangement order of each file name in the file name sequence being consistent with the label order of each file in the file sequence; then, extracting a digital sequence from each file name of the file name sequence, each number in the digital sequence corresponding to a file name in the file name sequence, and the arrangement order of each number in the digital sequence being consistent with the arrangement order of each corresponding file name in the file name sequence; again, identifying at least one ordered subsequence from the digital sequence, the ordered subsequence being composed of two or more adjacent numbers in the digital sequence; then, judging whether the at least one ordered subsequence is an ascending sequence, and if not, determining that the label order of each file in the file sequence is abnormal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus and device for identifying abnormal sequence marker order. Background Technology

[0002] Currently, smart devices such as smartphones, tablets, VR / AR devices, smartwatches, smart home devices, and drones can be equipped with applications that perform various functions, including social networking, lifestyle, utility, entertainment, news, and educational applications. Many of these applications present content to users in the form of file sequences. For example, educational applications may offer courses, novels, or other content in a file sequence. News applications may provide news content from different times in a file sequence.

[0003] In practice, when an application presents content to a user as a sequence of files, it can arrange the files according to a pre-set file tag order. Typically, the file tag order reflects the logical order of the file content, allowing end users to easily retrieve logically correct file content from the sequence based on the file tag order.

[0004] However, in practical applications, the file tagging order may be incorrect and inconsistent with the logical order of the file content. In such cases, when end users access a file sequence presented according to the file tagging order, the logic for retrieving the content of each file is confusing, resulting in a poor user experience. Therefore, it is necessary to promptly detect abnormalities in the tagging order within the file sequence. Summary of the Invention

[0005] This specification provides a method, apparatus, and device for identifying abnormal sequence marker order, in order to solve the problem of existing methods that cannot detect abnormal marker order in file sequences in a timely manner.

[0006] To solve the above-mentioned technical problems, the embodiments in this specification are implemented as follows:

[0007] This specification provides an embodiment of a method for identifying sequence marker order anomalies, comprising:

[0008] Obtain the filename sequence corresponding to the file sequence; the order of the filenames in the filename sequence is consistent with the marking order of the files in the file sequence;

[0009] Extract a number sequence from each filename in the filename sequence; each number in the number sequence corresponds to a filename in the filename sequence; the order of the numbers in the number sequence is consistent with the order of the corresponding filenames in the filename sequence.

[0010] Identify at least one ordered subsequence from the number sequence; the ordered subsequence consists of two or more adjacent numbers in the number sequence;

[0011] Determine whether all at least one ordered subsequence is an ascending sequence to obtain a first determination result;

[0012] If the first judgment result is negative, then it is determined that the marking order of each file in the file sequence is abnormal.

[0013] This specification provides an embodiment of a device for identifying sequence marker order anomalies, comprising:

[0014] The filename sequence acquisition module is used to acquire the filename sequence corresponding to the file sequence; the order of the filenames in the filename sequence is consistent with the marking order of the files in the file sequence.

[0015] A number sequence extraction module is used to extract a number sequence from each filename in the filename sequence; each number in the number sequence corresponds to a filename in the filename sequence; the order of the numbers in the number sequence is consistent with the order of the corresponding filenames in the filename sequence.

[0016] An ordered subsequence identification module is used to identify at least one ordered subsequence from the number sequence; the ordered subsequence consists of two or more adjacent numbers in the number sequence;

[0017] The judgment module is used to determine whether the at least one ordered subsequence is an ascending sequence, and to obtain a first judgment result;

[0018] The identification result determination module is used to determine that the marking order of each file in the file sequence is abnormal if the first judgment result is negative.

[0019] This specification provides an embodiment of a device for identifying sequence marker order anomalies, comprising:

[0020] At least one processor; and,

[0021] A memory communicatively connected to the at least one processor; wherein,

[0022] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:

[0023] Obtain the filename sequence corresponding to the file sequence; the order of the filenames in the filename sequence is consistent with the marking order of the files in the file sequence;

[0024] Extract a number sequence from each filename in the filename sequence; each number in the number sequence corresponds to a filename in the filename sequence; the order of the numbers in the number sequence is consistent with the order of the corresponding filenames in the filename sequence.

[0025] Identify at least one ordered subsequence from the number sequence; the ordered subsequence consists of two or more adjacent numbers in the number sequence;

[0026] Determine whether all at least one ordered subsequence is an ascending sequence to obtain a first determination result;

[0027] If the first judgment result is negative, then it is determined that the marking order of each file in the file sequence is abnormal.

[0028] This specification provides an embodiment of a computer-readable medium storing computer-readable instructions that can be executed by a processor to implement a method for identifying sequence marker order anomalies.

[0029] One embodiment of this specification can achieve at least the following beneficial effects: by extracting a number sequence from the file name sequence corresponding to the file sequence, and then identifying an ordered subsequence from the number sequence, and judging the type of the ordered subsequence, when each ordered subsequence is an ascending sequence, it is determined that the file tag order of the file sequence is normal; otherwise, it is determined that the file tag order of the file sequence is abnormal. Thus, it is possible to quickly and accurately discover the situation where the sequence tag order of the file sequence is abnormal. Attached Figure Description

[0030] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0031] Figure 1 A flowchart illustrating a method for identifying sequence marker order anomalies provided in an embodiment of this specification;

[0032] Figure 2 This is a flowchart illustrating a method for identifying abnormal sequence marker order in a practical application scenario provided by an embodiment of this specification.

[0033] Figure 3 The embodiments provided in this specification correspond to Figure 1 A schematic diagram of the structure of a device for identifying sequence marker order anomalies;

[0034] Figure 4 The embodiments provided in this specification correspond to Figure 1 A schematic diagram of the structure of a device for identifying abnormal sequence marker order. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of one or more embodiments of this specification clearer, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of one or more embodiments of this specification.

[0036] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another.

[0037] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0038] Currently, in some applications that provide content information as a file sequence, end users may encounter a problem where the existing tag order of the files in the file sequence is inconsistent with the logical order of the file content. For example, content that is actually the first, second, and third chapters of a novel might be incorrectly encoded as 1, 3, and 2. On a user's terminal, if they retrieve the file sequence according to the tag order 1, 2, 3, the content obtained is not continuous, affecting the user's understanding of the content. If they want to retrieve the content according to the actual logical order, the user needs to manually identify the logical order of the content (which is usually difficult, especially for audio files), and the user cannot use convenient functions provided by the application, such as autoplay, which depend on the file tag order. This causes significant inconvenience to the user and seriously affects the user experience.

[0039] In practical applications, the tagging order of files in a file sequence can be determined by the file uploader or automatically generated by the file management system based on the upload time of each file. Regardless of the method, incorrect editing order is often unavoidable, and these errors are frequently difficult to identify. Currently, due to the sheer volume of file sequences in applications, it is impossible to manually determine whether the tagging order of a file sequence is abnormal. Therefore, there is an urgent need for a method that can quickly and accurately identify abnormal sequence tagging order.

[0040] To address the shortcomings of the existing technology, the following embodiments are provided in this solution.

[0041] Figure 1 This is a flowchart illustrating a method for identifying abnormal sequence marker order provided in an embodiment of this specification.

[0042] From a programming perspective, the entity executing the process can be a program hosted on an application server. It can be understood that this method can be executed by any device, equipment, platform, or cluster of devices with computing and processing capabilities.

[0043] like Figure 1 As shown, the process may include the following steps:

[0044] Step 102: Obtain the file name sequence corresponding to the file sequence; the order of the file names in the file name sequence is consistent with the marking order of the files in the file sequence.

[0045] The file sequence can represent a collection of sequentially arranged files edited around a specific topic. In practical applications, the file sequence can be represented as an album, list, unit, or other similar format.

[0046] Optionally, a file sequence may contain one type of file. For example, the file sequence may specifically include an audio file sequence, a video file sequence, a text file sequence, etc. The audio file sequence may consist of several audio files, the video file sequence may consist of several video files, and the text file sequence may consist of several text files. Alternatively, a file sequence may contain two or more types of files. For example, the file sequence may simultaneously contain two or more types of files, including audio files, video files, and text files.

[0047] The filename sequence can be a sequence composed of the names of the files in the file sequence. There can be a one-to-one correspondence between the filenames in the filename sequence and the files in the file sequence. Furthermore, when the files in the file sequence have a preset tagging order, the order of the filenames in the filename sequence is consistent with the tagging order of the corresponding files in the file sequence.

[0048] The tagging order can be the order in which tags are added to the files in the file sequence by the user who created the file sequence or the administrator of the file sequence. In practical applications, the added tags can be added manually or automatically by a preset program. The solution of the embodiments in this specification can be used to identify whether the tagging order is abnormal.

[0049] In the embodiments of this specification, the method for identifying whether the tag order of a file sequence is abnormal is based on the filenames of each file in the file sequence. This is because filenames can usually summarize the content of the file, and therefore it is assumed that the logic between filenames can reflect the logic between file contents. Thus, in the embodiments of this specification, whether the sequence tag order is abnormal is identified by determining whether the sequence tag order is consistent with the logical order obtained based on the filenames.

[0050] Step 104: Extract a number sequence from each filename in the filename sequence; each number in the number sequence corresponds to a filename in the filename sequence; the order of the numbers in the number sequence is consistent with the order of the corresponding filenames in the filename sequence.

[0051] In practical applications, considering that filenames may contain descriptions that reflect logical order, such as "Episode N" or "Issue XX", a specific method for determining the logical order based on filenames can be to determine the logical order of filenames by using the numbers in the filenames.

[0052] In the embodiments of this specification, a preset number extraction method can be applied to each filename in the filename sequence to extract the corresponding number, thereby forming a number sequence. In practical applications, the number of numbers in the number sequence can be equal to or less than the number of filenames in the filename sequence. That is, each number in the number sequence can correspond to a filename in the filename sequence; however, not every filename in the filename sequence will have a corresponding number in the number sequence. One reason for this is that not all filenames can conform to the preset number extraction method.

[0053] In the embodiments of this specification, since the order of each number in the number sequence is consistent with the order of each corresponding file name in the file name sequence, the order of each number in the number sequence is consistent with the marking order of each file in the file sequence.

[0054] As an example, suppose the file sequence contains 9 files, and according to the preset number extraction method, a number is extracted from the file names of each of the 9 files, forming a number sequence of [7,6,9,10,1,2,3,4,5].

[0055] Step 106: Identify at least one ordered subsequence from the number sequence; the ordered subsequence consists of two or more adjacent numbers in the number sequence.

[0056] The ordered subsequence may include an ascending sequence or a descending sequence. The numbers in the ascending sequence are arranged in ascending order, for example, [1,2,3,4,5]. The numbers in the descending sequence are arranged in descending order, for example, [7,6].

[0057] Using the example above, from the number sequence [7,6,9,10,1,2,3,4,5], we can identify three ordered subsequences: [7,6], [9,10], and [1,2,3,4,5].

[0058] Step 108: Determine whether the at least one ordered subsequence is an ascending sequence to obtain the first determination result.

[0059] Specifically, the process of identifying ordered subsequences in step 106 can actually distinguish whether each subsequence is an ascending or descending sequence. For example, during the execution of step 106, ascending and descending sequences can be distinguished and marked.

[0060] Therefore, in step 108, the number of ascending and / or descending sequences in the current number sequence can be counted based on the previously determined markers, and then it can be determined whether the at least one ordered subsequence is an ascending sequence based on at least two of the data of the ascending sequence, the number of the descending sequence, and the total number of ordered subsequences.

[0061] In practical applications, optionally, in step 108, a judgment result can also be obtained as to whether the at least one ordered subsequence is a descending sequence; and optionally, in step 108, a judgment result can also be obtained as to whether the at least one ordered subsequence contains both ascending and descending sequences.

[0062] Using the example above, we can determine whether the three ordered subsequences [7,6], [9,10], and [1,2,3,4,5] are all ascending sequences.

[0063] Step 110: If the first judgment result is negative, then it is determined that the marking order of each file in the file sequence is abnormal.

[0064] In the embodiments of this specification, it is considered normal for the files in the file sequence to be ordered in logical order, and all other cases are considered abnormal.

[0065] In practical applications, if the first judgment result is yes, that is, if the at least one ordered subsequence is not all in ascending order, it indicates that the files in the file sequence are not sorted in logical order, and it is determined that the labeling order of the files in the file sequence is abnormal.

[0066] Using the example above, the three ordered subsequences [7,6], [9,10], and [1,2,3,4,5] are descending, ascending, and ascending sequences, respectively, and are not all ascending sequences, indicating that the labeling order of the files in the file sequence is abnormal.

[0067] It should be understood that in the methods described in one or more embodiments of this specification, the order of some steps may be adjusted according to actual needs, or some steps may be omitted.

[0068] Figure 1 The method described above extracts a number sequence from the filename sequence corresponding to the file sequence, then identifies ordered subsequences from the number sequence, and judges the type of the ordered subsequences. When all ordered subsequences are in ascending order, it is determined that the file labeling order of the file sequence is normal; otherwise, it is determined that the file labeling order of the file sequence is abnormal. Thus, it is possible to quickly and accurately detect abnormalities in the sequence labeling order of a file sequence.

[0069] based on Figure 1 In addition to the method described herein, this specification also provides some specific implementation methods of the method, which will be described below.

[0070] In one or more embodiments of this specification, specific schemes are provided for extracting the numeric sequence from each filename of the filename sequence in step 104.

[0071] In practical applications, to ensure the accuracy of the logical order determined based on filenames, not all numerical information from the filenames is extracted. Instead, numerical information conforming to certain preset rules is extracted to avoid the influence of potentially corrupted data in the filenames. These preset rules are used to identify numerical information that appears regularly in each filename. Optionally, these preset rules can be implemented using regular expressions. The corrupted data can be numerical information that appears irregularly in each filename.

[0072] Specifically, the step of extracting the numeric sequence from each filename in the filename sequence (step 104) may include: extracting numbers corresponding to at least a portion of the filenames in the filename sequence based on the filename sequence; and obtaining the numeric sequence corresponding to the filename sequence based on the numbers corresponding to the at least a portion of the filenames. The reason for extracting only the numbers corresponding to at least a portion of the filenames is that, in practical applications, only a portion (not all) of the filenames in the file sequence may contain content matching the preset rules.

[0073] More specifically, the step of extracting numbers corresponding to at least a portion of the filenames in the filename sequence based on the filename sequence may include: determining a number extraction rule that matches the filename sequence (i.e., the preset rule mentioned above); and using the number extraction rule to extract numbers corresponding to each filename that matches the number extraction rule from each filename in the filename sequence that matches the number extraction rule.

[0074] In practical applications, multiple number extraction rules can be pre-created and maintained. As an optional embodiment, different number extraction rules can be represented by different regular expressions, which can be used to extract sequences containing numbers in different formats / forms. For a filename sequence to be identified, rules suitable for the filename sequence to be identified can be selected from the multiple preset number extraction rules.

[0075] In the initial application of the method in this embodiment, the multiple number extraction rules can be derived by exhaustively enumerating text similarity using big data and word segmentation algorithms, and then extracting rules based on the degree of similarity. The rule coverage can be determined by the ratio of the number of rules satisfied to the overall sample size. In subsequent applications of the method in this embodiment, the number extraction results can be fed back into the maintenance process of the number extraction rules to update the rules or obtain new rules.

[0076] Optionally, the process of selecting rules applicable to the filename sequence to be identified from a plurality of preset number extraction rules, i.e., determining the number extraction rule matching the filename sequence, may specifically include: obtaining a first matching rule from at least one preset matching rule; applying the first matching rule to all filenames in the filename sequence to obtain a first matching result corresponding to each filename in the filename sequence; determining whether the first matching rule meets a first preset condition based on the first matching result corresponding to each filename in the filename sequence to obtain a second judgment result; if the second judgment result indicates that the first matching rule meets the first preset condition, then the first matching rule is determined as the number extraction rule matching the filename sequence. In this case, the step of using the number extraction rule to extract the numbers corresponding to each filename matching the number extraction rule from each filename in the filename sequence that matches the number extraction rule may specifically include: extracting the numbers corresponding to each filename in the filename sequence that matches the first matching rule from the first matching result.

[0077] Further, after determining whether the first matching rule meets the first preset condition based on the first matching result corresponding to each filename in the filename sequence, and obtaining the second judgment result, the method may further include: if the second judgment result indicates that the first matching rule does not meet the first preset condition, then obtaining a second matching rule from at least one preset matching rule, wherein the priority of the second matching rule may not be higher than that of the first matching rule; applying the second matching rule to all filenames in the filename sequence to obtain the second matching result corresponding to each filename in the filename sequence; determining whether the second matching rule meets the second preset condition based on the second matching result corresponding to each filename in the filename sequence, and obtaining the fourth judgment result; if the fourth judgment result indicates that the second matching rule meets the second preset condition, then determining the second matching rule as the number extraction rule matching the filename sequence.

[0078] When using the first matching rule, each filename in the filename sequence corresponds to a first matching result. For a target filename, the first matching result may include first result information and second result information. The first result information indicates whether the target filename matches the first matching rule; for example, it may indicate that the target filename matches the first matching rule, or it may indicate that the target filename does not match the first matching rule. The second result information may be a sequence of numbers obtained after matching, assuming the first result information indicates that the target filename matches the first matching rule.

[0079] In practical applications, if the first matching rule meets the first preset condition, then the step of using the number extraction rule to extract the numbers corresponding to each filename that matches the number extraction rule from the filename sequence can specifically include: extracting the numbers corresponding to each filename that matches the first matching rule from the sequence containing numbers obtained from the first matching result.

[0080] Specifically, the step of using the number extraction rule to extract the numbers corresponding to each filename in the filename sequence that matches the number extraction rule may include: obtaining the rule matching result of the number extraction rule for each filename in the filename sequence that matches the number extraction rule (i.e., a sequence containing numbers); and extracting the numbers corresponding to each filename in the filename sequence that matches the number extraction rule from the rule matching result (i.e., a sequence containing numbers).

[0081] Similarly, when using the second matching rule, each filename in the filename sequence corresponds to a second matching result. The second matching result is similar to the first matching result in terms of its composition, acquisition method, and application method, and will not be described again here.

[0082] Specifically, determining whether the first matching rule meets a first preset condition based on the first matching result corresponding to each filename in the filename sequence to obtain a second judgment result may include: determining a first number of filenames in the filename sequence that match the first matching rule; calculating the first number and the total number of filenames in the filename sequence; determining whether the ratio of the first number to the total number is greater than or equal to a preset first ratio threshold to obtain a third judgment result; correspondingly, if the second judgment result indicates that the first matching rule meets the first preset condition, then determining the first matching rule as a number extraction rule matching the filename sequence may include: if the third judgment result indicates that the ratio of the first number to the total number is greater than or equal to a preset first ratio threshold, then determining the first matching rule as a number extraction rule matching the filename sequence.

[0083] Similarly, the process of determining whether the second matching rule meets the second preset condition based on the second matching result corresponding to each filename in the filename sequence, and obtaining the second judgment result, can be similar to the aforementioned process, and will not be repeated here.

[0084] To make it easier to understand, the process of extracting a sequence of numbers from each filename in a filename sequence is explained below with examples.

[0085] By way of example, assume that a plurality of number extraction rules are preset as follows:

[0086] Rule 1: Nth [episode / section / chapter / part / episode / volume / part];

[0087] Rule 2: N [episode / section / chapter / part / episode / volume / part];

[0088] Rule 3: Nth;

[0089] Rule 4: N at the beginning, or N in the middle, or N at the end;

[0090] Rule ...

[0091] Herein, the priority of each rule satisfies: Rule 1 > Rule 2 > Rule 3 > Rule 4.

[0092] Optionally, in the number extraction rules implemented in the embodiments of this specification, the extracted numbers may include various types of numbers. For example, Arabic numerals (1, 2, 3, etc.), Chinese numerals (for example, one, two, three, etc.; for another example,壹, 貳, 叁, etc.), English numerals (one, two, etc.), which are not limited thereto.

[0093] Assume that the to-be-identified file name sequence is:

[0094] {Issue 07 Classic Children's Song Recommendation!

[0095] Issue 06 Classic Children's Song 1!

[0096] Issue 09 Classic Children's Song 3!

[0097] Issue 10 Classic Children's Song 2!

[0098] Issue 01 Plant Encyclopedia!

[0099] Issue 02 Magic Zoo!

[0100] Issue 03 Stories About Cars!

[0101] Issue 04 Unsolved Mysteries of the World!

[0102] Issue 05 100,000 Whys!}.

[0103] In this case, when extracting the number sequence from each file name in the to-be-identified file name sequence, Rule 1, Rule 2, Rule 3, Rule 4 and the like may be sequentially used to match each file name in the to-be-identified file name sequence in the order of priority from high to low, and the number sequence may be determined according to the matching result.

[0104] Specifically, first, rule 1 can be used to match the filename sequence, and it is found that none of the filenames match rule 1 (or in other words, the proportion of filenames matching rule 1 does not reach the preset proportion threshold), thus failing to meet the preset matching condition. Then, rule 2 can be used to match the filename sequence, and it is found that none of the filenames match rule 2 (or in other words, the proportion of filenames matching rule 2 does not reach the preset proportion threshold), thus failing to meet the preset matching condition. Then, rule 3 can be used to match the filename sequence, and it is found that all the filenames match rule 3 (or in other words, the proportion of filenames matching rule 3 reaches the preset proportion threshold), thus meeting the preset matching condition. Therefore, the matching result of each filename with rule 3 "Nth" can be obtained, which is a sequence containing numbers: [7th, 6th, 9th, 10th, 1st, 2nd, 3rd, 4th, 5th]. Furthermore, from this sequence containing numbers, the number sequence [7, 6, 9, 10, 1, 2, 3, 4, 5] can be extracted.

[0105] In the embodiments of this specification, the process of extracting the numbers corresponding to each filename matching the number extraction rule from the filename sequence using the number extraction rule may include: determining whether the extracted number is in a standard format; if not, converting the extracted number to a standard format. Specifically, the standard format is Arabic numerals. In practical applications, if the number obtained based on the number extraction rule is not of Arabic numeral type, it can be converted to Arabic numeral type to improve the processing efficiency of subsequent steps.

[0106] Additionally, as in rule 4 of the aforementioned example, which specifies "starting with N, or in the middle of N, or ending with N," in cases where multiple sub-rules have equal priority, the sub-rule with the most matches in the file sequence can be selected as the chosen rule. For example, if rules 1 through 3 do not match, each filename in the filename sequence can be matched against the first sub-rule "starting with N," the second sub-rule "in the middle of N," and the third sub-rule "ending with N" in rule 4. The number of filenames matching each sub-rule can then be determined, and the sub-rule that matches the most filenames (e.g., the first sub-rule) can be selected as the chosen rule for extracting the number sequence.

[0107] In one or more embodiments of this specification, after extracting a numerical sequence that conforms to the current marking order from each filename in the filename sequence, it is further possible to determine whether the extracted numerical sequence is abnormal, thereby determining whether the content logic of each file in each file sequence is abnormal under the current marking order. This will be explained in detail below.

[0108] In the embodiments of this specification, the numbers in the number sequence can be traversed to identify at least one ordered subsequence, including ascending and descending sequences, and then the type of each ordered subsequence can be used to determine whether the number sequence is abnormal.

[0109] Optionally, identifying at least one ordered subsequence from the number sequence may specifically include: generating a first subsequence that sequentially contains adjacent first and second numbers in the number sequence; determining the sequence type of the first subsequence; the sequence type being an ascending or descending sequence; and determining whether a third number in the number sequence following the second number meets a preset ordering condition for adding to the first subsequence, thereby obtaining a fifth determination result. The preset ordering condition includes: the sequence type of the first subsequence is an ascending sequence and the third number is not less than the second number, or the sequence type of the first subsequence is a descending sequence and the third number is not greater than the second number. If the fifth determination result is yes, an updated first subsequence containing the first number, the second number, and the third number in sequence is generated. If the fifth determination result is no, a second subsequence containing the third number and a fourth number in sequence is generated; the fourth number is the next number in the number sequence after the third number.

[0110] As an example, when the first number is the first number in the text sequence, the solution of the aforementioned embodiment can specifically be as follows: generating a first subsequence that sequentially contains the first number and the second number in the number sequence; determining the sequence type of the first subsequence; the sequence type includes an ascending sequence or a descending sequence; determining whether the third number in the number sequence meets the preset entry condition for adding to the first subsequence, and obtaining a fifth judgment result; the preset entry condition includes: the sequence type of the first subsequence is an ascending sequence and the third number is greater than the second number, or the sequence type of the first subsequence is a descending sequence and the third number is less than the second number; if the fifth judgment result is yes, then generating an updated first subsequence that sequentially contains the first number, the second number, and the third number; if the fifth judgment result is no, then generating a second subsequence that sequentially contains the third number and the fourth number after the third number.

[0111] Optionally, after generating the second subsequence that sequentially contains the third and fourth numbers, the process may further include: determining the sequence type of the second subsequence; and determining whether the fifth number in the number sequence following the fourth number meets the preset ordering condition for adding it to the second subsequence. This process continues until all numbers in the number sequence have been traversed, resulting in a first subsequence, a second subsequence, and so on, i.e., obtaining at least one ordered subsequence in the embodiments of this specification.

[0112] Following the example above, after obtaining the numeric sequence [7,6,9,10,1,2,3,4,5] corresponding to the filename sequence, we can further obtain several ordered subsequences of this sequence, namely [7,6], [9,10] and [1,2,3,4,5].

[0113] In one or more embodiments of this specification, after identifying at least one ordered subsequence from a number sequence, it can be determined whether the number sequence is abnormal based on the type of the at least one ordered subsequence.

[0114] Specifically, it can be determined whether the at least one ordered subsequence is an ascending sequence to obtain a first judgment result; if the first judgment result is negative, it is determined that the marking order of each file in the file sequence is abnormal; if the first judgment result is positive, it is determined that the marking order of each file in the file sequence is correct.

[0115] Specifically, determining that the labeling order of each file in the file sequence is abnormal may include: if all at least one ordered subsequence is a descending sequence, then the labeling order of each file in the file sequence is determined to be a reverse order abnormality; if the at least one ordered subsequence contains both ascending and descending sequences, then the labeling order of each file in the file sequence is determined to be a disordered order abnormality.

[0116] Using the example above, for the file sequence to be identified, the resulting subsequences [7,6], [9,10], and [1,2,3,4,5] are descending, ascending, and ascending intervals, respectively. This indicates that the labeling order of the current file sequence to be identified is abnormal, and the abnormality type is out-of-order abnormality.

[0117] In practical applications, if it is determined that the labeling order of the files in the file sequence is a reverse order anomaly, then: a first label can be added to the file sequence; the first label is used to indicate that the labeling order of the files in the file sequence is a reverse order anomaly. Furthermore, the sequence identifier of the file sequence labeled by the first label and the first label can be sent to an anomaly handling system; the anomaly handling system is used to process the file sequence according to the first label using a corresponding processing algorithm, so that the labeling order of the file sequence is changed back to normal.

[0118] In practical applications, if it is determined that the labeling order of the files in the file sequence is of the out-of-order anomaly type, then: a second label can be added to the file sequence, and a third label can be added to the files in the file sequence corresponding to the descending sequence; the second label is used to indicate that the labeling order of the files in the file sequence is of the out-of-order anomaly type; the third label is used to indicate that the labeling order of the labeled files is incorrect. Furthermore, the sequence identifier of the file sequence labeled by the second label (and the third label) and the second label (and the third label) can be sent to an anomaly handling system; the anomaly handling system is used to process the file sequence according to the second label (and the third label) using a corresponding processing algorithm to correct the labeling order of the file sequence to normal.

[0119] Following the example above, for a sequence of files to be identified as an out-of-order anomaly, a second marker (e.g., 1) can be added to the sequence to indicate the out-of-order anomaly type. Further, optionally, a third marker (e.g., 11) can be added to the files corresponding to the descending subsequence [7,6]. For example, a third marker can be added to the files corresponding to the filenames “Recommended Classic Children's Songs for Issue 07!” and “Classic Children's Songs for Issue 06 1!”.

[0120] Based on the above description, the flowchart of a method for identifying abnormal sequence marker order in a practical application scenario provided in the embodiments of this specification is as follows: Figure 2 As shown.

[0121] like Figure 2 As shown, step 202: After obtaining the file name sequence corresponding to the file sequence to be identified, the number corresponding to each file name can be matched according to the selected rule, denoted as n.

[0122] Step 204: Arrange the numbers n identified from each filename in the order of the file sequence markers to obtain a number sequence, denoted as S. The format of S can be n1, n2, n3...

[0123] Step 206: Traverse the elements of the number sequence S to obtain several ordered subsequences. The sequence formed by these ordered subsequences can be denoted as sequence C.

[0124] Optionally, step 206 may specifically include:

[0125] Iterate through the elements in sequence S one by one, and put the elements in sequence S into the subsequence;

[0126] If the current subsequence is already determined to be an ascending sequence, and the current element is less than the last element of the current subsequence, then adding this element would no longer satisfy the condition that the entire subsequence is in ascending order. Therefore, this element should be placed into a new subsequence. The same applies to descending sequences.

[0127] After traversing all elements in sequence S, a sequence consisting of several ordered subsequences is finally obtained, denoted as sequence C.

[0128] Step 208: Determine whether the multiple ordered subsequences in sequence C are in uniform ascending or descending order.

[0129] For example, if all ordered subsequences are in ascending order, it means that the labeling order of the file sequence to be identified is correct.

[0130] For example, if all ordered subsequences are in descending order, it means that the labeling order of the file sequence to be identified is in reverse order.

[0131] For example, if an ordered subsequence is partly ascending and partly descending, it means that the tag order of the file sequence to be identified is out of order.

[0132] In existing technologies, some applications that present content through file sequences, such as audiobooks and reading apps, may have files in reverse or out-of-order formats. This causes the logical flow of file content retrieved by the user on their device to be inconsistent according to the marked order, severely impacting the user experience. Furthermore, this impact cannot be improved manually by the user (usually, users can only arrange the files in the file sequence in ascending or descending order according to the existing marked order). Moreover, since applications often contain a large number of file sequences, each with a potentially large number of files, and the sorting rules for different types of file sequences are quite complex, it is difficult to manually determine whether the marked order of the file sequences is abnormal.

[0133] Based on the solutions implemented in this specification, it is possible to determine whether a file sequence exists in reverse or descending order based on the textual rules of the filenames, and to locate files with sequence errors so that downstream programs can correct the anomalies.

[0134] Based on the same idea, embodiments of this specification also provide apparatus corresponding to the above methods.

[0135] Figure 3 The embodiments provided in this specification correspond to Figure 1 A schematic diagram of a device for identifying abnormal sequence marker order.

[0136] like Figure 3 As shown, the device may include:

[0137] The filename sequence acquisition module 302 is used to acquire the filename sequence corresponding to the file sequence; the order of the filenames in the filename sequence is consistent with the marking order of the files in the file sequence.

[0138] The number sequence extraction module 304 is used to extract a number sequence from each filename in the filename sequence; each number in the number sequence corresponds to a filename in the filename sequence; the order of the numbers in the number sequence is consistent with the order of the corresponding filenames in the filename sequence.

[0139] The ordered subsequence identification module 306 is used to identify at least one ordered subsequence from the number sequence; the ordered subsequence consists of two or more adjacent numbers in the number sequence;

[0140] The judgment module 308 is used to determine whether the at least one ordered subsequence is an ascending sequence, and to obtain a first judgment result;

[0141] The identification result determination module 310 is used to determine that the marking order of each file in the file sequence is abnormal if the first judgment result is negative.

[0142] based on Figure 3 The embodiments of this specification also provide some specific implementation schemes of the method, which are described below.

[0143] Optionally, the number sequence extraction module 304 is specifically used to: extract numbers corresponding to at least a portion of the filenames in the filename sequence based on the filename sequence; and obtain a number sequence corresponding to the filename sequence based on the numbers corresponding to the at least a portion of the filenames.

[0144] Optionally, the step of extracting numbers corresponding to at least some of the filenames in the filename sequence based on the filename sequence may specifically include: determining a number extraction rule that matches the filename sequence; and using the number extraction rule to extract the numbers corresponding to each filename that matches the number extraction rule from each filename in the filename sequence that matches the number extraction rule.

[0145] Optionally, determining the number extraction rule that matches the filename sequence may specifically include: obtaining a first matching rule from at least one preset matching rule; applying the first matching rule to all filenames in the filename sequence to obtain a first matching result corresponding to each filename in the filename sequence; determining whether the first matching rule meets a first preset condition based on the first matching result corresponding to each filename in the filename sequence to obtain a second judgment result; if the second judgment result indicates that the first matching rule meets the first preset condition, then determining the first matching rule as the number extraction rule that matches the filename sequence.

[0146] Optionally, the step of determining whether the first matching rule meets a first preset condition based on the first matching result corresponding to each filename in the filename sequence to obtain a second judgment result may specifically include: determining a first number of filenames in the filename sequence that match the first matching rule; calculating the first number and the total number of filenames in the filename sequence; determining whether the ratio of the first number to the total number is greater than or equal to a preset first ratio threshold to obtain a third judgment result. Correspondingly, the step of determining the first matching rule as a number extraction rule matching the filename sequence if the second judgment result indicates that the first matching rule meets the first preset condition may specifically include: if the third judgment result indicates that the ratio of the first number to the total number is greater than or equal to a preset first ratio threshold, then determining the first matching rule as a number extraction rule matching the filename sequence.

[0147] Optionally, after determining whether the first matching rule meets the first preset condition based on the first matching result corresponding to each filename in the filename sequence and obtaining the second judgment result, the method may further include: if the second judgment result indicates that the first matching rule does not meet the first preset condition, then obtaining a second matching rule from at least one preset matching rule; the priority of the second matching rule is not higher than that of the first matching rule; applying the second matching rule to all filenames in the filename sequence to obtain the second matching result corresponding to each filename in the filename sequence; determining whether the second matching rule meets the second preset condition based on the second matching result corresponding to each filename in the filename sequence, and obtaining a fourth judgment result; if the fourth judgment result indicates that the second matching rule meets the second preset condition, then determining the second matching rule as the number extraction rule matching the filename sequence.

[0148] Optionally, the step of using the number extraction rule to extract the numbers corresponding to each filename in the filename sequence that matches the number extraction rule may specifically include: obtaining the rule matching result of the number extraction rule for each filename in the filename sequence that matches the number extraction rule; and extracting the numbers corresponding to each filename in the filename sequence that matches the number extraction rule from the rule matching result.

[0149] Optionally, the ordered subsequence identification module 306 is specifically configured to: generate a first subsequence that sequentially contains adjacent first and second numbers in the number sequence; determine the sequence type of the first subsequence; the sequence type is an ascending sequence or a descending sequence; determine whether a third number in the number sequence following the second number meets a preset entry condition for adding to the first subsequence, and obtain a fifth judgment result; the preset entry condition includes: the sequence type of the first subsequence is an ascending sequence and the third number is not less than the second number, or, the sequence type of the first subsequence is a descending sequence and the third number is not greater than the second number; if the fifth judgment result is yes, then an updated first subsequence containing the first number, the second number, and the third number in sequence is generated. If the fifth judgment result is no, then a second subsequence containing the third number and a fourth number in sequence is generated; the fourth number is the next number in the number sequence after the third number.

[0150] Optionally, the identification result determination module 310 can also be used to: if the first judgment result is yes, then determine that the marking order of each file in the file sequence is correct.

[0151] Optionally, the identification result determination module 310 can be specifically used to: if all at least one ordered subsequence is a descending sequence, then determine that the labeling order of each file in the file sequence is a reverse order anomaly type; if the at least one ordered subsequence contains both ascending and descending sequences, then determine that the labeling order of each file in the file sequence is a disordered order anomaly type.

[0152] Optionally, the device for identifying sequence labeling order anomalies may further include a labeling module, configured to: after determining that the labeling order of each file in the file sequence is of the reverse order anomaly type, add a first label to the file sequence; the first label is used to indicate that the labeling order of each file in the file sequence is of the reverse order anomaly type; or, after determining that the labeling order of each file in the file sequence is of the out-of-order anomaly type, add a second label to the file sequence and add a third label to the file in the file sequence corresponding to the descending order sequence; the second label is used to indicate that the labeling order of each file in the file sequence is of the out-of-order anomaly type; the third label is used to indicate that the labeling order of the labeled files is incorrect.

[0153] It is understood that the modules mentioned above refer to computer programs or program segments used to perform one or more specific functions. Furthermore, the distinction between these modules does not imply that the actual program code must also be separate.

[0154] Based on the same idea, this specification also provides devices corresponding to the above methods in its embodiments.

[0155] Figure 4 The embodiments provided in this specification correspond to Figure 1 A schematic diagram of the structure of a device for identifying abnormal sequence marker order.

[0156] like Figure 4 As shown, device 400 may include:

[0157] At least one processor 410; and,

[0158] Memory 430 communicatively connected to the at least one processor; wherein,

[0159] The memory 430 stores instructions 420 that can be executed by the at least one processor 410, the instructions being executed by the at least one processor 410 to enable the at least one processor 410 to:

[0160] Obtain the filename sequence corresponding to the file sequence; the order of the filenames in the filename sequence is consistent with the marking order of the files in the file sequence;

[0161] Extract a number sequence from each filename in the filename sequence; each number in the number sequence corresponds to a filename in the filename sequence; the order of the numbers in the number sequence is consistent with the order of the corresponding filenames in the filename sequence.

[0162] Identify at least one ordered subsequence from the number sequence; the ordered subsequence consists of two or more adjacent numbers in the number sequence;

[0163] Determine whether all at least one ordered subsequence is an ascending sequence to obtain a first determination result;

[0164] If the first judgment result is negative, then it is determined that the marking order of each file in the file sequence is abnormal.

[0165] Following the same approach, embodiments of this specification also provide a computer-readable medium corresponding to the above-described methods. The computer-readable medium stores computer-readable instructions that can be executed by a processor to implement the following methods:

[0166] Obtain the filename sequence corresponding to the file sequence; the order of the filenames in the filename sequence is consistent with the marking order of the files in the file sequence;

[0167] Extract a number sequence from each filename in the filename sequence; each number in the number sequence corresponds to a filename in the filename sequence; the order of the numbers in the number sequence is consistent with the order of the corresponding filenames in the filename sequence.

[0168] Identify at least one ordered subsequence from the number sequence; the ordered subsequence consists of two or more adjacent numbers in the number sequence;

[0169] Determine whether all at least one ordered subsequence is an ascending sequence to obtain a first determination result;

[0170] If the first judgment result is negative, then it is determined that the marking order of each file in the file sequence is abnormal.

[0171] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0172] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the apparatus and device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The apparatus, device and method provided in the embodiments of this specification are corresponding to each other, and therefore the apparatus and device also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding apparatus and device will not be repeated here.

[0173] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program a digital system themselves to "integrate" it onto a PLD, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0174] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, ASICs, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0175] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0176] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.

[0177] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0178] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0179] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0180] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0181] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0182] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0183] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital character versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0184] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0185] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0186] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for identifying sequence marker order anomalies, comprising: Get the sequence of filenames corresponding to the file sequence; The order of the filenames in the filename sequence is consistent with the order of the tags of the files in the file sequence; Based on the filename sequence, extract the numbers corresponding to at least some of the filenames in the filename sequence; Based on the numbers corresponding to at least some of the filenames, a number sequence corresponding to the filename sequence is obtained; each number in the number sequence corresponds to a filename in the filename sequence; the order of the numbers in the number sequence is consistent with the order of the corresponding filenames in the filename sequence. Identify at least one ordered subsequence from the number sequence; the ordered subsequence consists of two or more adjacent numbers in the number sequence; Determine whether all at least one ordered subsequence is an ascending sequence to obtain a first determination result; If the first determination result is negative, then it is determined that the marking order of each file in the file sequence is abnormal; The marking order anomalies include reverse order anomalies and out-of-order anomalies; If it is determined that the tag order of the files in the file sequence is the reverse order anomaly type, then a first tag is added to the file sequence; The first marker is used to indicate that the marker order of the files in the file sequence is a reversed anomaly type; If it is determined that the labeling order of each file in the file sequence is of the out-of-order anomaly type, then a second label is added to the file sequence; the second label is used to indicate that the labeling order of each file in the file sequence is of the out-of-order anomaly type.

2. The method as described in claim 1, wherein extracting numbers corresponding to at least a portion of the filenames in the filename sequence based on the filename sequence specifically includes: Determine the number extraction rules that match the filename sequence; Using the aforementioned number extraction rules, numbers corresponding to each filename that matches the number extraction rules are extracted from the filename sequence.

3. The method as described in claim 2, wherein determining the number extraction rule matching the filename sequence specifically includes: Obtain the first matching rule from at least one preset matching rule; Apply the first matching rule to all filenames in the filename sequence to obtain the first matching result corresponding to each filename in the filename sequence; Based on the first matching result corresponding to each filename in the filename sequence, determine whether the first matching rule meets the first preset condition, and obtain the second judgment result; If the second judgment result indicates that the first matching rule meets the first preset condition, then the first matching rule is determined as the number extraction rule that matches the file name sequence.

4. The method as described in claim 3, wherein determining whether the first matching rule meets the first preset condition based on the first matching result corresponding to each filename in the filename sequence, and obtaining the second judgment result, specifically includes: Determine a first number of filenames in the filename sequence that match the first matching rule; Calculate the first quantity and the total number of filenames in the filename sequence; Determine whether the ratio of the first quantity to the total quantity is greater than or equal to a preset first ratio threshold to obtain a third determination result; If the second judgment result indicates that the first matching rule meets the first preset condition, then the first matching rule is determined as a number extraction rule that matches the filename sequence, specifically including: If the third judgment result indicates that the ratio of the first quantity to the total quantity is greater than or equal to a preset first ratio threshold, then the first matching rule is determined as a number extraction rule that matches the file name sequence.

5. The method as described in claim 3, further comprising, after determining whether the first matching rule meets the first preset condition based on the first matching result corresponding to each filename in the filename sequence, and obtaining the second determination result, including: If the second judgment result indicates that the first matching rule does not meet the first preset condition, then the second matching rule is obtained from at least one preset matching rule; the priority of the second matching rule is not higher than that of the first matching rule. The second matching rule is applied to all filenames in the filename sequence to obtain the second matching result corresponding to each filename in the filename sequence; Based on the second matching result corresponding to each filename in the filename sequence, determine whether the second matching rule meets the second preset condition, and obtain the fourth judgment result; If the fourth judgment result indicates that the second matching rule meets the second preset condition, then the second matching rule is determined as the number extraction rule that matches the file name sequence.

6. The method as described in claim 2, wherein the step of extracting the number corresponding to each filename matching the number extraction rule from the filename sequence according to the number extraction rule specifically includes: Obtain the rule matching results of the number extraction rule for each filename in the filename sequence that matches the number extraction rule; From the rule matching results, extract the numbers corresponding to each filename that matches the number extraction rule.

7. The method of claim 1, wherein identifying at least one ordered subsequence from the numerical sequence specifically includes: Generate a first subsequence that sequentially contains adjacent first and second digits from the number sequence; Determine the sequence type of the first subsequence; The sequence type is either an ascending sequence or a descending sequence; Determine whether the third number in the number sequence that is located after the second number meets the preset entry condition for adding it to the first subsequence, and obtain the fifth determination result; The preset ordering conditions include: the first subsequence is an ascending sequence and the third number is not less than the second number; or, the first subsequence is a descending sequence and the third number is not greater than the second number. If the fifth judgment result is yes, then an updated first subsequence containing the first number, the second number, and the third number in sequence is generated.

8. The method of claim 7, further comprising, after determining whether the third number in the number sequence following the second number meets the preset ordering condition for adding to the first subsequence and obtaining the fifth determination result: If the fifth judgment result is negative, then a second subsequence containing the third and fourth numbers in sequence is generated; The fourth number is the number following the third number in the number sequence.

9. The method of claim 1, further comprising, after determining whether the at least one ordered subsequence is an ascending sequence and obtaining a first determination result: If the first judgment result is yes, then it is determined that the marking order of each file in the file sequence is correct.

10. The method of claim 1, wherein determining that the tag order of each file in the file sequence is abnormal specifically includes: If all at least one ordered subsequence is a descending sequence, then the labeling order of the files in the file sequence is determined to be a reverse order anomaly. If the at least one ordered subsequence contains both ascending and descending sequences, then the labeling order of the files in the file sequence is determined to be an out-of-order anomaly.

11. The method of claim 10, further comprising, after determining that the tag order of each file in the file sequence is a reverse order anomaly type: Add a first marker to the file sequence; The first marker is used to indicate that the marker order of the files in the file sequence is a reversed anomaly type; or, After determining that the tag order of the files in the file sequence is of the out-of-order anomaly type, the method further includes: A second tag is added to the file sequence, and a third tag is added to the files in the file sequence that correspond to the descending sequence; the second tag is used to indicate that the tag order of each file in the file sequence is out of order; the third tag is used to indicate that the tag order of the tagged files is incorrect.

12. A device for identifying sequence marker order anomalies, comprising: The filename sequence acquisition module is used to obtain the filename sequence corresponding to the file sequence; The order of the filenames in the filename sequence is consistent with the order of the tags of the files in the file sequence; A number sequence extraction module is used to extract a number sequence from each filename in the filename sequence; each number in the number sequence corresponds to a filename in the filename sequence; the order of the numbers in the number sequence is consistent with the order of the corresponding filenames in the filename sequence. An ordered subsequence identification module is used to identify at least one ordered subsequence from the number sequence; the ordered subsequence consists of two or more adjacent numbers in the number sequence; The judgment module is used to determine whether the at least one ordered subsequence is an ascending sequence, and to obtain a first judgment result; The identification result determination module is used to determine that the marking order of each file in the file sequence is abnormal if the first judgment result is negative. The marking order anomalies include reverse order anomalies and out-of-order anomalies; A marking module is used to add a first mark to the file sequence if it is determined that the marking order of the files in the file sequence is the reverse order anomaly type; the first mark is used to indicate that the marking order of the files in the file sequence is the reverse order anomaly type; The marking module is further configured to add a second mark to the file sequence if it is determined that the marking order of each file in the file sequence is the out-of-order anomaly type; the second mark is used to indicate that the marking order of each file in the file sequence is the out-of-order anomaly type.

13. A device for identifying sequence marker order anomalies, comprising: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to: Obtain the filename sequence corresponding to the file sequence; the order of the filenames in the filename sequence is consistent with the marking order of the files in the file sequence; Extract a number sequence from each filename in the filename sequence; each number in the number sequence corresponds to a filename in the filename sequence; the order of the numbers in the number sequence is consistent with the order of the corresponding filenames in the filename sequence. Identify at least one ordered subsequence from the number sequence; the ordered subsequence consists of two or more adjacent numbers in the number sequence; Determine whether all at least one ordered subsequence is an ascending sequence to obtain a first determination result; If the first determination result is negative, then it is determined that the marking order of each file in the file sequence is abnormal; the marking order abnormality includes reverse order abnormality type and out-of-order abnormality type; If it is determined that the labeling order of the files in the file sequence is the reverse order anomaly type, then a first label is added to the file sequence; the first label is used to indicate that the labeling order of the files in the file sequence is the reverse order anomaly type. If it is determined that the labeling order of each file in the file sequence is of the out-of-order anomaly type, then a second label is added to the file sequence; the second label is used to indicate that the labeling order of each file in the file sequence is of the out-of-order anomaly type.

Citation Information

Patent Citations

  • File sorting method and device and mobile terminal

    CN108133048A