Organizing methods, apparatuses, devices, and media for command words

By using clustering and differentiated labeling methods for command words, the problems of easy confusion between similar command words and large storage requirements are solved, achieving lightweight and efficient command word recognition.

CN121565158BActive Publication Date: 2026-07-31WUXUE GUANGJI INTELLIGENT SOFTWARE TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUXUE GUANGJI INTELLIGENT SOFTWARE TECHNOLOGY CO LTD
Filing Date
2025-12-23
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing technologies, similar command words are easily confused, have large storage requirements, and have complex scoring comparison logic, making it difficult to meet the needs of lightweight devices and efficient recognition.

Method used

By clustering the command word set, command words with the same suffix are grouped into the same category. Differentiated identifiers are assigned and compressed for storage. Command words with scores exceeding a preset threshold are selected. A dynamic update strategy is used to determine the optimal within the group. The pass scores of a single command word group are recorded. Finally, a comprehensive comparison is made to generate the final recognition result.

Benefits of technology

It reduces confusion and interference, lowers storage usage, simplifies logic, and improves recognition efficiency, adapting to the lightweight and efficient recognition needs of devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121565158B_ABST
    Figure CN121565158B_ABST
Patent Text Reader

Abstract

This application relates to the field of speech recognition technology, and discloses a method, apparatus, device, and medium for organizing command words. The method includes: clustering a set of command words, grouping those with identical suffixes into one category, and the rest into separate categories, generating clustering results; compressing and storing the results, assigning continuous integer compressed identifiers to multiple command word categories, marking single command word categories with special identifiers, and storing the identifiers corresponding to each command word; grouping by identifier, filtering command words with scores exceeding a preset threshold, using a dynamic update strategy to determine the optimal within a group for multiple command word groups and storing the information, recording the qualifying score for a single command word group, and generating results for each group; comprehensively comparing the scores of single command word groups with the optimal information of multiple command word groups, and selecting the highest score as the final recognition result output. Suffix clustering reduces easily confused interference, compressed storage reduces resource consumption, group filtering and dynamic updating simplify comparison logic, improve recognition efficiency, and adapt to the needs of lightweight and efficient recognition devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of speech recognition technology, and more specifically, to a method, apparatus, device, and medium for organizing command words. Background Technology

[0002] Command word recognition, a key technology in the field of speech recognition, is widely used in smart homes, smart terminals, and other scenarios, providing users with a convenient voice interaction experience. However, in existing technologies, similar command words (such as those with the same suffix) are prone to misidentification, requiring significant post-processing work for correction. Furthermore, command word storage has not been specifically optimized; when the number of command words is large, storage consumes a lot of memory, resulting in resource waste. In addition, the sorting and score comparison logic during command word recognition is complex, often employing the method of storing all scores before comparison, leading to low processing efficiency, high algorithm design difficulty, and an inability to meet the device's demand for lightweight and efficient recognition. Summary of the Invention

[0003] The main purpose of this application is to provide a method for organizing command words, which aims to solve the technical problems in command word recognition, such as easy confusion between similar words, large storage consumption, complex and inefficient scoring comparison logic, which makes it difficult to meet the requirements of lightweight and efficient recognition of devices.

[0004] The first aspect of this application proposes a method for organizing command words, comprising: Cluster the command word set, grouping command words with the same suffix into the same category, and the remaining command words into their own categories, generating clustering results; Based on the clustering results, compressed storage is performed. Compressed clustering identifiers in the form of consecutive integers are assigned to multiple command word categories, special identifiers are marked for single command word categories, and the identifiers corresponding to each command word are stored. Command words are grouped according to their identifiers. Command words with scores exceeding a preset threshold are filtered out. For multiple command word groups, a dynamic update strategy is used to determine the optimal group and store the information. For a single command word group, its qualifying score is recorded, and corresponding results for each group are generated. By comprehensively comparing the scores of all single-command phrases and the optimal information of multi-command phrases, the command word with the highest score is selected as the final recognition result output.

[0005] Furthermore, the step of clustering the command word set, grouping command words with identical suffixes into the same category, and the remaining command words into their own categories, to generate clustering results, includes: Iterate through each command word in the command word set and obtain the complete character sequence of each command word; Suffix comparison is performed on the character sequences of any two command words to determine whether the whole of one command word is a suffix of the other command word, and to identify command word groups with the same suffix. Clustering algorithms are used to group command word groups with identical suffixes into the same category, and individual command words that are not grouped into any command word group are divided into independent categories. The mapping information of all categories and their corresponding command terms is summarized and integrated to form the clustering results.

[0006] Further, the step of compressing and storing the clustering results, assigning compressed clustering identifiers in the form of consecutive integers to multiple command word categories, and storing the identifier corresponding to each command word includes: Traverse the clustering results, distinguish between categories with multiple command words and categories containing only a single command word, and extract the original category information of all categories with multiple command words; Assign compressed clustering identifiers in the form of consecutive integers to each multi-command word category, and establish a mapping relationship between compressed clustering identifiers and original category information; Each command term is associated with its corresponding compressed clustering identifier or special identifier to clarify the correspondence between command terms and identifiers; Store the mapping relationship and the correspondence between command words and identifiers to complete the compressed storage of clustering information.

[0007] Furthermore, the step of compressing and storing the clustering results, assigning special identifiers to single command word categories, and storing the identifiers corresponding to each command word includes: Traverse the clustering results, filter out the categories containing only a single command word, and determine the command word to which the category belongs; Each selected single command term category is assigned a pre-defined special identifier, clearly defining the correspondence between the identifier and the category; Associate the command words in each single command word category with the special identifier of its category; Store the association between the command words and special identifiers to complete the storage of single command word category identifiers.

[0008] Furthermore, the steps of grouping command words according to identifiers, filtering command words with scores exceeding a preset threshold, using a dynamic update strategy to determine the optimal command word group within a group and storing the information, and generating the corresponding results for each group include: Command words are divided into multiple groups based on compressed clustering identifiers, so that command words corresponding to the same compressed clustering identifier are grouped into the same group; Iterate through each group of command words, obtain the score of each command word one by one, and filter out the command words with scores exceeding the preset threshold as competitive candidates within the group; For each group of candidate command words, a dynamic update strategy is adopted to determine the optimal one within the group. The optimal information within the group is continuously updated and recorded according to the rules of length priority and score priority when the lengths are the same. Store the information related to the final optimal command word for each group, and generate the optimal result within each group corresponding to the multi-command word group.

[0009] Furthermore, the steps of grouping command words according to identifiers, filtering command words with scores exceeding a preset threshold, recording the pass score for each command word group, and generating corresponding results for each group include: Based on special identifiers, command words are divided into multiple single command word groups, so that each single command word corresponding to a special identifier is grouped independently. Iterate through each single command phrase, obtain the score of the command phrase in each phrase, determine whether it exceeds the preset threshold, and filter out the qualified command phrases; The scores of the qualified command words after screening are recorded directly, and these scores are the optimal scores of the corresponding single command word groups. The qualified command words of each group are associated with their best scores and stored to generate the group results corresponding to each single command word group.

[0010] Furthermore, the step of comprehensively comparing the scores of all single-command phrases with the optimal information of multi-command phrases and selecting the command word with the highest score as the final recognition result output includes: The best scores and corresponding command words for all single command phrases, and the best command words and corresponding scores for each multi-command phrase are summarized to form a global score set to be compared. Compare all scores in the global score set one by one to determine the highest score and its corresponding command word; The command word corresponding to the highest score is output as the final recognition result.

[0011] A second aspect of this application also proposes an organization device for command words, comprising: The clustering module is used to cluster the set of command words, grouping command words with the same suffix into the same category, and the remaining command words into their own categories, generating clustering results; The compressed storage module is used to compress and store the clustering results, assign compressed clustering identifiers in the form of consecutive integers to multiple command word categories, mark special identifiers for single command word categories, and store the identifiers corresponding to each command word. The grouping and filtering module is used to group command words according to the identifier, filter command words whose scores exceed the preset threshold, and use a dynamic update strategy to determine the optimal within a group and store the information for multiple command word groups. For a single command word group, its qualifying score is recorded, and the corresponding results for each group are generated. The comprehensive comparison module is used to comprehensively compare the scores of all single command phrases and the optimal information of multi-command phrases, and select the command word with the highest score as the final recognition result output.

[0012] A third aspect of this application proposes an organization device for command words, comprising: processor; Memory, used to store computer programs; Wherein, when the processor executes the computer program, it implements the command word organization method described in any of the above embodiments.

[0013] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the command word organization method described in any of the above embodiments.

[0014] The first aspect of this plan brings the following benefits: This application uses a clustering rule based on identical suffixes to group easily confused and similar command words into one category, reducing confusion and interference from the classification source and improving recognition accuracy. It differentiates the clustering results by assigning labels and compressing their storage, using consecutive integer labels to simplify the mapping of multiple command word categories and special labels to distinguish single command word categories, significantly reducing storage usage. After grouping by label, only qualified command words are selected. For multiple command word groups, the best result within the group is dynamically updated; for single command word groups, the score is directly recorded, avoiding redundant global comparisons, simplifying logic, and improving efficiency. The entire process has no redundant steps, and storage and computing costs are controllable, perfectly adapting to the lightweight and efficient recognition needs of devices. Attached Figure Description

[0015] Figure 1 This is a flowchart illustrating a method for organizing command words according to an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a command word organization device according to an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a computer device according to an embodiment of this application; The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0017] Those skilled in the art will understand that, unless explicitly stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in the specification of this application means the presence of features, integers, steps, operations, elements, modules, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, modules, components, and / or groups thereof. It should be understood that when an element is “connected” or “coupled” to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein may include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any modules and all combinations of one or more associated listed items.

[0018] Those skilled in the art will understand that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0019] Reference Figure 1 This application provides a method for organizing command words, characterized by including: S1: Perform clustering on the set of command words, grouping command words with the same suffix into the same category, and the remaining command words into their own categories, generating clustering results; S2: Based on the clustering results, compress and store them; assign compressed clustering identifiers in the form of consecutive integers to multiple command word categories; mark special identifiers for single command word categories; and store the identifiers corresponding to each command word. S3: Group command words according to the identifier, filter command words whose scores exceed the preset threshold, use a dynamic update strategy to determine the optimal within the group for multiple command word groups and store the information, record the benchmark score for a single command word group, and generate the corresponding results for each group. S4: By comprehensively comparing the scores of all single-command phrases and the optimal information of multi-command phrases, the command word with the highest score is selected as the final recognition result output.

[0020] In step S1, by using character sequence suffix comparison technology and disjoint-set clustering algorithm, combined with the classification rule of "identical suffixes", command words in the command word set that satisfy "one command word as a whole is the suffix of another command word" are grouped into the same category. That is, identical suffixes mean that one command word as a whole is the suffix of another command word. The remaining command words are grouped into their own categories, and finally a clear clustering result is generated. Taking the set of command words for smart home scenarios {"one degree", "eleven degrees", "thirty-one degrees", "turn on the light", "turn off the light", "adjust the fan speed"} as an example, the complete character sequences of each command word are "yidu", "shiyidu", "sanshiyidu", "kai deng", "guandeng", and "tiaojiefengsu", respectively. When the system performs clustering on this set, it first traverses all command words to obtain their complete character sequences. Then, it compares the suffixes of any two command words—determining that "one degree" is a suffix of "eleven degrees" and "thirty-one degrees", while "turn on the light", "turn off the light", and "adjust the fan speed" have no mutual suffix relationship. Subsequently, the disjoint-set data structure algorithm is used to group "one degree", "eleven degrees", and "thirty-one degrees" into the same category, while the other three command words are divided into independent categories. Finally, the mapping information of "category-command word" is summarized to form a clustering result containing four categories. This step is based on the character structure features of command words for clustering, without relying on complex model training, and is adaptable to various smart devices. The disjoint-set data structure algorithm efficiently completes the classification, distinguishing easily confused command words from the source, while laying the foundation for subsequent compressed storage and group filtering. This step uses a precise clustering rule of "identical suffixes" to group easily confused command words such as "degree" and "eleventh degree" together, greatly reducing confusion and interference in subsequent identification and reducing post-processing workload. The application of the disjoint-set data structure algorithm ensures efficient clustering and adapts to the dynamic expansion of the command word set. The clustering results provide a clear classification basis for subsequent compressed storage, making the label allocation more targeted and providing core support for the lightweight and efficient overall solution.

[0021] In step S2, by using differentiated identifier allocation technology and mapping relationship storage method, combined with the compression rule of "multi-class continuous integers and single-class special tags", the information compression and storage is completed based on the clustering results of step S1, and finally a precise correspondence between command words and identifiers is established. Taking the above clustering results (4 categories: category 1 {"1 degree", "11 degrees", "31 degrees"}, category 2 {"turn on lights"}, category 3 {"turn off lights"}, category 4 {"adjust wind speed"}) as an example, the original category information is category 1, category 2, category 3, and category 4. The system first traverses the clustering results, distinguishes between multi-command word categories (category 1) and single-command word categories (category 2, category 3, and category 4), and extracts the original category information of category 1. Then, it assigns compressed clustering identifiers in the form of consecutive integers to the multi-command word categories, maps category 1 to 0, and establishes a "0-category 1" mapping relationship. It marks the single-command word categories with a preset special identifier 255, and associates category 2, category 3, and category 4 with 255 respectively. Next, it binds each command word to the identifier of its category, that is, "1 degree", "11 degrees", and "31 degrees" correspond to 0, and "turn on lights", "turn off lights", and "adjust wind speed" correspond to 255. Finally, it only stores the "command word-identifier" correspondence and the "compressed identifier-original category" mapping relationship to complete the compressed storage. This step accurately assigns labels based on clustering results, eliminating the need for additional storage of redundant original category data and adapting to lightweight storage requirements. The differentiated design of consecutive integers and special labels provides a clear basis for subsequent grouping and filtering, connecting seamlessly with the grouping logic of step S3. This step significantly reduces memory usage through differentiated compressed storage, avoiding redundant storage of original category information. The clear label allocation rules provide a convenient basis for subsequent grouping, connecting the preceding and following processes and improving the overall execution efficiency of the solution.

[0022] In step S3, using identifier grouping technology and a dynamic update strategy, combined with the "threshold filtering + differentiated optimal judgment" rule, the command words are grouped according to the identifiers obtained in step S2, ultimately generating the optimal results for each group. Taking the identifier mapping relationship above (compressed identifier 0 corresponds to {"one degree", "eleven degrees", "thirty-one degrees"}, and special identifier 255 corresponds to {"turn on lights", "turn off lights", "adjust wind speed"}) as an example, with a preset score threshold of 0.7, the system first groups the command words according to the identifiers: the command words corresponding to compressed identifier 0 are grouped into multiple command word groups, and each command word corresponding to special identifier 255 is independently grouped into a single command word group. Then, each group is traversed to obtain the score of each command word (e.g., "one degree" 0.88, "eleven degrees" 0.82, "thirty-one degrees" 0.72, "turn on lights" 0.2, "turn off lights" 0.1, "adjust wind speed" 0.09), and candidate words with scores exceeding the threshold are selected. The multi-command phrases employ a dynamic update strategy: initially, "eleven degrees" (length 2, score 0.82) is selected as the optimal choice, and subsequently, "thirty-one degrees" (length 3 > 2) is updated as the optimal choice and its information is stored. In single-command phrases, "turn on the lights" and "adjust the wind speed" do not meet the criteria, and their scores are not recorded. This step simplifies the competition scope through grouping, and the dynamic update strategy eliminates the need to store all candidate information within a group, adapting to low-resource devices and connecting to the global comparison logic in step S4. This step uses threshold filtering to eliminate low-confidence command words, and the dynamic update strategy simplifies the multi-group optimal determination logic, reduces memory usage and computational load, improves processing efficiency, and provides accurate candidate results for global comparison.

[0023] In step S4, using global score aggregation technology and priority comparison rules, combined with the "highest score wins" principle, the results generated in step S3 are integrated to finally output the optimal recognition command word. Taking the processing results of step S3 above as an example, the optimal results for a single command word group are "turn on the lights" (score 0.2) and "adjust the wind speed" (score 0.09), while the optimal result for a multi-command word group (compression identifier 0) is "thirty-one degrees" (score 0.72). The system first aggregates all information to be compared, forming a global score set: {"turn on the lights" 0.2, "adjust the wind speed" 0.09, "thirty-one degrees" 0.72}. Then, all scores in the set are compared one by one. First, "adjust the wind speed" 0.09 is compared with "thirty-one degrees" 0.72, the latter having a higher score and temporarily considered optimal; then it is compared with "turn on the lights" 0.2, and "thirty-one degrees" still has the highest score. Finally, "thirty-one degrees" is determined as the globally optimal command word. This step compares the results of the previous grouping and screening, eliminating the need to repeatedly process low-confidence command words. It seamlessly integrates with the overall workflow, ensuring the accuracy and efficiency of the recognition results. Through global aggregation and precise comparison, this step quickly identifies the optimal command words, avoiding invalid output; it simplifies the global competition logic, improves recognition efficiency, and guarantees the accuracy and reliability of the final results.

[0024] In one embodiment, the step of clustering the command word set, grouping command words with identical suffixes into the same category, and the remaining command words into their own categories, to generate clustering results includes: S10: Traverse each command word in the command word set and obtain the complete character sequence of each command word; S11: Perform suffix comparison on the character sequences of any two command words to determine whether the whole of one command word is a suffix of the other command word, and identify command word groups with completely identical suffixes; S12: Use a clustering algorithm to group command word groups with identical suffixes into the same category, and divide individual command words that are not grouped into any command word group into independent categories; S13: Summarize the mapping information of all categories and corresponding command words, and integrate them to form clustering results.

[0025] In this embodiment, each command word in the command word set is first traversed to obtain the complete character sequence of each command word. Taking the command word set {"one degree", "eleven degrees", "thirty-one degrees", "turn on the light", "turn off the light", "adjust the fan speed"} of the smart home scenario above as an example, the system traverses the six command words in the set one by one and extracts the complete character sequence of each command word. That is, "one degree" corresponds to "yidu", "eleven degrees" corresponds to "shiyidu", "thirty-one degrees" corresponds to "sanshiyidu", "turn on the light" corresponds to "kai deng", "turn off the light" corresponds to "guandeng", and "adjust the fan speed" corresponds to "tiaojiefengsu". This ensures that the character information of each command word is extracted without omission, providing a complete data foundation for subsequent suffix comparison. Then, the character sequences of any two command words are compared by suffix to determine whether the whole of one command word is a suffix of the other, thus identifying command word groups with identical suffixes. All command words are compared pairwise: comparing "one degree" and "eleven degrees", the complete character sequence of "one degree", "yidu", is the end of "shiyidu", meaning "one degree" is a suffix of "eleven degrees"; comparing "one degree" and "thirty-one degrees", "yidu" is also a suffix of "sanshiyidu"; comparing "eleven degrees" and "thirty-one degrees", both end with "yidu", but they are not each other's whole suffixes, therefore they do not form a direct suffix relationship; and comparing the character sequences of "turn on the light", "turn off the light", and "adjust the wind speed", none of the three command words are suffixes of the other, thus identifying command word groups with identical suffixes as {"one degree", "eleven degrees", and "thirty-one degrees"}. Next, a clustering algorithm is used to group command phrases with identical suffixes into the same category, and individual command phrases not grouped into any command phrase group are divided into independent categories. This embodiment uses a disjoint-set data structure (DFS) clustering algorithm. First, an initial category is created for "one degree". Then, "eleven degrees" and "thirty-one degrees" are merged into this category using a DFS, forming a multi-command phrase category containing three command phrases. For the three command phrases "turn on the lights", "turn off the lights", and "adjust the wind speed", which are not grouped into any phrase, independent categories are created for each, ultimately forming four categories: Category 1 {"one degree", "eleven degrees", "thirty-one degrees"}, Category 2 {"turn on the lights"}, Category 3 {"turn off the lights"}, and Category 4 {"adjust the wind speed"}. Finally, the mapping information of all categories and corresponding command phrases is summarized and integrated to form the clustering result. The system organizes and records the complete mapping relationship between "category number - command word list", that is, category 1 corresponds to {"one degree", "eleven degrees", "thirty-one degrees"}, category 2 corresponds to {"turn on lights"}, category 3 corresponds to {"turn off lights"}, and category 4 corresponds to {"adjust wind speed"}. This mapping relationship is stored in a structured manner to form a clear and traceable clustering result, providing a direct basis for the compressed storage in the subsequent step S2, ensuring smooth connection between the preceding and following processes. This embodiment achieves accurate classification of command words through complete character sequence extraction, accurate suffix comparison, efficient clustering algorithm, and standardized mapping summary, distinguishing easily confused words from the source, laying a reliable foundation for subsequent compressed storage and group screening, and improving the feasibility and efficiency of the overall solution.

[0026] In one embodiment, the step of compressing and storing the clustering results, assigning compressed clustering identifiers in the form of consecutive integers to multiple command word categories, and storing the identifier corresponding to each command word includes: S210: Traverse the clustering results, distinguish between categories with multiple command words and categories containing only a single command word, and extract the original category information of all categories with multiple command words; S211: Assign compressed clustering identifiers in the form of consecutive integers to each multi-command word category, and establish a mapping relationship between compressed clustering identifiers and original category information; S212: Associate each command word with the compressed clustering identifier or special identifier of its category to clarify the correspondence between command words and identifiers; S213: Store the mapping relationship and the correspondence between command words and identifiers to complete the compressed storage of clustering information.

[0027] In this embodiment, the clustering results are first traversed to distinguish between categories with multiple command words and categories containing only a single command word, and the original category information of all categories with multiple command words is extracted. Taking the four clustering results generated in step S1 above (Category 1 {"1 degree", "11 degrees", "31 degrees"}, Category 2 {"turn on lights"}, Category 3 {"turn off lights"}, and Category 4 {"adjust wind speed"}) as an example, the system traverses each category one by one and distinguishes them by counting the number of command words contained in each category: Category 1 contains 3 command words and is determined to be a category with multiple command words; Categories 2, 3, and 4 each contain only 1 command word and are determined to be categories with single command words. Then, the original category information of the categories with multiple command words is extracted, namely the category number of Category 1, the corresponding list of command words, and the original clustering identifier, providing a clear processing object for subsequent compressed identifier allocation. Then, compressed clustering identifiers in the form of consecutive integers are sequentially assigned to each category with multiple command words, establishing a mapping relationship between compressed clustering identifiers and original category information. In this embodiment, there is only one multi-command word category (Class 1). Following the rule of "continuous integers starting from 0", a compressed clustering identifier of 0 is assigned to it. Then, a mapping table is created to explicitly record the correspondence between the compressed clustering identifier "0" and the original information of Class 1 (category number, command word list {"degree", "eleven degrees", "thirty-one degrees"}). This ensures that the original category information can be traced back through the compressed identifier, which simplifies the identifier form without losing the core clustering data. Next, each command word is associated with its corresponding compressed clustering identifier or special identifier, clarifying the correspondence between command words and identifiers. Based on the set special identifier 255, for command words in multi-command word categories, "degree", "eleven degrees", and "thirty-one degrees" are all associated with compressed clustering identifier 0; for command words in single-command word categories, "turn on the light", "turn off the light", and "adjust the wind speed" are respectively associated with special identifier 255. Through one-to-one binding, a clear "command word-identifier" correspondence table is formed, such as "degree → 0" and "turn on the light → 255", providing a direct basis for subsequent grouping and filtering. Finally, the mapping relationship and the correspondence between command words and identifiers are stored, completing the compressed storage of clustering information. The system stores the mapping relationship of "compressed identifier 0 - original information of class 1" and the association table of "all command words - corresponding identifiers" in a structured manner, without storing redundant information such as the original category number and the number of command words within the category. Compared to directly storing the original clustering results, this method significantly reduces storage usage. For example, it eliminates the need to record information about "containing 3 command words" for class 1; all core data can be associated solely through identifiers. This approach also ensures the completeness of stored information and seamlessly connects to the grouping logic in subsequent step S3. This embodiment, through category differentiation, consecutive integer identifier allocation, command word-identifier association, and streamlined storage, significantly reduces memory usage while maintaining information integrity. This provides a clear basis for subsequent grouping and improves the overall storage efficiency and seamless integration of the solution.

[0028] In one embodiment, the step of compressing and storing the clustering results, assigning special identifiers to single command word categories, and storing the identifiers corresponding to each command word includes: S220: Traverse the clustering results, filter out the categories containing only a single command word, and determine the command word to which the category belongs; S221: Assign a pre-defined special identifier to each selected single command word category, clearly defining the correspondence between the identifier and the category; S222: Associate the command words in each single command word category with the special identifier of its category; S223: Store the association between the command word and the special identifier, and complete the storage of the single command word category identifier.

[0029] In this embodiment, the clustering results are first traversed to filter out categories containing only a single command word, and the command word belonging to that category is determined. Taking the four clustering results generated in step S1 above (Category 1 {"1 degree", "11 degrees", "31 degrees"}, Category 2 {"turn on lights"}, Category 3 {"turn off lights"}, and Category 4 {"adjust wind speed"}) as an example, the system starts the traversal process to check the number of command words in each category one by one: Category 1 contains 3 command words, which does not meet the filtering condition of "containing only a single command word"; Category 2 contains only the command word "turn on lights", Category 3 contains only the command word "turn off lights", and Category 4 contains only the command word "adjust wind speed", all of which meet the filtering rules. Through this filtering operation, the single command word categories are identified as Category 2, Category 3, and Category 4, and their respective command words are "turn on lights", "turn off lights", and "adjust wind speed", thus locking the target objects for subsequent identification assignment. Then, a preset special identifier is assigned to each selected single command word category to clarify the correspondence between the identifier and the category. Referring to the unified standard established earlier, the default special identifier is 255 (this identifier clearly distinguishes itself from the compressed integer identifiers of multiple command word categories, avoiding grouping confusion). The system assigns the special identifier 255 to categories 2, 3, and 4 in the order of the selected single command word categories, establishing a "category-special identifier" correspondence table: Category 2 → 255, Category 3 → 255, Category 4 → 255. Although multiple single command word categories share the same special identifier, combined with the subsequent rule of "independent grouping of individual command words," this will not affect the accuracy of grouping, while simplifying the identifier management logic. Next, the command words in each single command word category are associated with the special identifier of their respective category. Based on the previously established "category-special identifier" correspondence, the system performs the binding operation between command words and identifiers: "turn on the light" in category 2 is associated with 255, "turn off the light" in category 3 is associated with 255, and "adjust the fan speed" in category 4 is associated with 255. A "command word-special identifier" association list is formed through one-to-one binding, specifically "turn on the light → 255", "turn off the light → 255", and "adjust the fan speed → 255". This list clearly defines the identifier attribute corresponding to each single command word, providing direct data support for subsequent step S3 based on identifier grouping, ensuring the logical consistency of grouping. Finally, the association relationship between the command words and special identifiers is stored, completing the storage of the single command word category identifier. The system adopts a lightweight storage scheme, storing the "command word-special identifier" association list in a structured data format (such as key-value pairs), eliminating the need to store redundant information such as the original category number and category description of the single command word category. For example, retaining only the core related data such as "Lights on: 255", "Lights off: 255", and "Adjust fan speed: 255" significantly reduces memory usage compared to storing complete category information. Simultaneously, this storage method supports fast querying; subsequent step S3 can quickly match corresponding special identifiers using command words, or filter all single command words using special identifiers, ensuring smooth workflow and laying an efficient data foundation for group filtering. This embodiment achieves efficient management of single command word identifiers by accurately filtering single command word categories, uniformly allocating special identifiers, binding association relationships, and simplifying storage, reducing memory usage, providing a clear basis for subsequent grouping, and ensuring smooth workflow.

[0030] In one embodiment, the steps of grouping command words according to identifiers, filtering command words with scores exceeding a preset threshold, using a dynamic update strategy to determine the optimal command word group within each group and storing the information, and generating the corresponding results for each group include: S310: Divide command words into multiple groups based on compressed clustering identifiers, so that command words corresponding to the same compressed clustering identifier are grouped into the same group; S311: Traverse each group of command words, obtain the score of each command word one by one, and filter out the command words with scores exceeding the preset threshold as competitive candidates within the group; S312: For each group of candidate command words, a dynamic update strategy is adopted to determine the optimal one within the group. The optimal information within the group is continuously updated and recorded according to the rules of length priority and score priority when the lengths are the same. S313: Store information related to the final optimal command word for each group and generate the optimal result within each group corresponding to the multi-command word group.

[0031] In this embodiment, command words are first divided into multiple groups based on compressed clustering identifiers, ensuring that command words corresponding to the same compressed clustering identifier are grouped into the same group. Taking the compressed storage result of step S2 above as an example, compressed clustering identifier 0 corresponds to multiple command word categories {"one degree", "eleven degrees", "thirty-one degrees"}. The system groups these three command words into the same multiple command word group according to the rule of "grouping words with the same compressed identifier into the same group". Single command word categories ("turn on the light", "turn off the light", "adjust the wind speed") are not included in this multiple command word grouping because they are marked with a special identifier 255, ensuring that the grouping is only for multiple command word categories with clear boundaries, laying the foundation for subsequent intra-group competition. Then, each group of command words is traversed, and the score of each command word is obtained one by one. Command words with scores exceeding a preset threshold are selected as intra-group competition candidates. The preset command word recognition score threshold is 0.7 (the threshold is set based on the device's recognition accuracy requirements and is used to filter low-confidence command words). The system iterates through the above multiple command word groups and calculates and obtains the score of each command word through the speech recognition model: "one degree" scores 0.88, "eleven degrees" scores 0.82, "thirty-one degrees" scores 0.72, "turn on the light" scores 0.2, "turn off the light" scores 0.1, and "adjust the wind speed" scores 0.09. After comparing with the threshold, "turn on the light," "turn off the light," and "adjust the wind speed" are eliminated because their scores do not reach 0.7. "One degree," "eleven degrees," and "thirty-one degrees" become competing candidate words within the group because their scores exceed the threshold, ensuring that only high-confidence command words participate in the subsequent optimal judgment. Next, a dynamic update strategy is used for each group of candidate command words to determine the optimal result within the group. Following the rules of length priority and, in case of equal length, score priority, the optimal information within the group is continuously updated and recorded. The system initializes the storage unit for the optimal information within the group (recording the optimal score, command word index, length, etc.). First, "eleven degrees" is processed: its length is 2 (number of characters), and its score is 0.82. Since there is no initial optimal information, it is directly stored as the current optimal. Then, "thirty-one degrees" is processed: its length is 3, which is greater than the current optimal of 2, triggering a dynamic update. The optimal information is replaced with the score of "thirty-one degrees" (0.72, index 3, length 3). If subsequent candidate words of the same length appear, the score will be used as the update criterion to ensure that the optimal within the group conforms to the rules. Finally, the relevant information of the final optimal command word for each group is stored, generating the optimal result within the group for each multi-command word group. The system stores the core information of "thirty-one degrees" (score 0.72, command word index, length 3, compression identifier 0) in a structured form, without needing to store redundant information from other candidate words within the group. The stored results clearly identify the optimal candidates for multi-command phrases, echoing the qualifying results for single-command phrases (such as "turn on the lights" 0.2 and "adjust the wind speed" 0.09 mentioned earlier). This provides accurate and concise input data for the global comprehensive comparison in step S4, ensuring smooth workflow. This embodiment efficiently determines the optimal results for multi-command phrases through precise grouping, threshold filtering, and dynamic update strategies, reducing redundant calculations and storage, improving processing efficiency, providing high-quality candidates for global comparison, and ensuring recognition accuracy.

[0032] In one embodiment, the steps of grouping command words according to identifiers, filtering command words with scores exceeding a preset threshold, recording the qualifying score for each command word group, and generating corresponding results for each group include: S320: Divide command words into multiple single command word groups based on special identifiers, so that each single command word corresponding to a special identifier is grouped independently; S321: Traverse each single command phrase, obtain the score of the command phrase in each phrase, determine whether it exceeds the preset threshold, and filter out the qualified command phrases; S322: Record the score of the qualified command words directly after screening. This score is the optimal score of the corresponding single command word group. S323: Associate and store the qualifying command words of each group with their best scores to generate the group results corresponding to each single command word group.

[0033] In this embodiment, the command words are first divided into multiple single command word groups based on special identifiers, so that the single command word corresponding to each special identifier is in an independent group. Taking the compressed storage result of step S2 above as an example, special identifier 255 corresponds to three single command word categories {"turn on the light"}, {"turn off the light"}, and {"adjust the wind speed"}. The system follows the rule of "single command words in an independent group" and divides these three command words into three independent single command word groups based on special identifier 255, namely group A {"turn on the light"}, group B {"turn off the light"}, and group C {"adjust the wind speed"}. This grouping method is differentiated from the "same compressed identifier is grouped together" of multiple command word groups, which not only ensures the consistency of the grouping logic, but also lays the foundation for the independent scoring of single command word groups, ensuring clear grouping boundaries and no overlap or confusion. Then, each single command word group is traversed to obtain the score of the command word in each group, and it is determined whether it exceeds the preset threshold, and qualified command words are filtered out. Continuing with the previously set preset score threshold of 0.7 (this threshold applies uniformly to all command word filtering to ensure consistent judgment criteria), the system sequentially traverses three single command word groups: when traversing group A, the recognition score for "thirty-one degrees" is calculated using the speech recognition model to be 0.72; when traversing group B, the score for "eleven degrees" is obtained to be 0.82; and when traversing group C, the score for "adjust wind speed" is obtained to be 0.09. Each score is then compared with the threshold of 0.7. "Thirty-one degrees" (0.72 > 0.7) and "eleven degrees" (0.82 > 0.7) do not meet the criteria and are retained as compliant command words; "adjust wind speed" (0.09 < 0.7) does not meet the threshold and is discarded, ensuring that only single command words with high confidence enter the subsequent process. Next, the scores of the selected qualified command words are directly recorded, and these scores are the optimal scores for the corresponding single command word groups. Since a single command word group contains only one command word, there is no intra-group competition, and there is no need to adopt a dynamic update strategy for multiple command word groups. For the qualified group A, "thirty-one degrees", its score of 0.72 is directly recorded as the optimal score for group A; the score of 0.09 for group C, "adjust wind speed", is directly used as the optimal score for group C. This "score is optimal" determination method simplifies the processing logic of single command word groups, avoids meaningless competitive comparisons, and ensures the accuracy of score recording, forming a unified result format with the optimal scores of multiple command word groups. Finally, the qualified command words of each group are associated with their optimal scores and stored to generate the intra-group results corresponding to each single command word group. The system adopts a key-value pair structured storage method, establishing the association relationship between "thirty-one degrees → 0.72" and "adjust wind speed → 0.09" respectively. The stored content only contains the command word itself and its corresponding optimal score, without the need to store redundant information such as category number and length. The stored result, together with the optimal result of the previous multi-command phrase ("31 degrees → 0.72"), forms a complete candidate result set. This provides a standardized and concise input basis for the global comprehensive comparison in step S4, ensuring smooth transitions between processes and forming a closed-loop logic. This embodiment simplifies the single-command phrase processing logic by using independent grouping, threshold filtering, and direct recording of the optimal score, reducing redundant storage and computation, providing accurate results for global comparison, and improving overall recognition efficiency and reliability.

[0034] In one embodiment, the step of comprehensively comparing the scores of all single-command phrases with the optimal information of multi-command phrases and selecting the command word with the highest score as the final recognition result output includes: S40: Summarize the best scores and corresponding command words for all single command phrases, and the best command words and corresponding scores for each multi-command phrase to form a global score set to be compared; S41: Compare all scores in the global score set one by one to determine the highest score and the corresponding command word; S42: Output the command word corresponding to the highest score as the final recognition result.

[0035] In this embodiment, the optimal scores and corresponding command words of all single command phrases, and the optimal command words and corresponding scores of each multi-command phrase are first summarized to form a global score set to be compared. Based on the grouping results of step S3 above: among the single command phrases, group A {"thirty-one degrees"} has an optimal score of 0.72, and group C {"adjust wind speed"} has an optimal score of 0.09; the optimal result of the multi-command phrase (the group corresponding to compression identifier 0) is "thirty-one degrees", with a score of 0.72. The system starts the summary process, traverses the result data of all qualified groups, extracts the correspondence between "command word - optimal score" one by one, and integrates them to form a global score set: {"eleven degrees": 0.82, "one degree": 0.88, "thirty-one degrees": 0.72}. This set encompasses all high-confidence command terms and their scores that passed the threshold screening, eliminating substandard items such as "turn off the lights" (0.1), "turn on the lights" (0.2), and "adjust the wind speed" (0.09), ensuring that all data to be compared are valid candidates, laying the foundation for subsequent accurate comparisons. Then, all scores in the global score set are compared one by one to determine the highest score and its corresponding command term. The system uses a "pairwise comparison, successive screening" approach to process the global score set: first, the first two elements in the set, "turn on the lights" (0.2) and "eleven degrees" (0.82), are compared; 0.82 > 0.2, so "eleven degrees" is temporarily marked as the current highest-scoring candidate; then, the current candidate is compared with the third element, "thirty-one degrees" (0.72); 0.82 is still higher than 0.72, so "eleven degrees" remains the highest-scoring candidate. The entire comparison process strictly follows the rule of "prioritizing the size of the score value" without adding any additional conditions such as length or category, ensuring that the comparison logic is pure and the results are objective. At the same time, since the set has already removed low-confidence data, there is no need for additional validity verification, thus improving the comparison efficiency. Finally, the command word corresponding to the highest score is output as the final recognition result. Based on the above comparison, "eleven degrees" was determined to win with a highest score of 0.82, exceeding the preset threshold of 0.7, thus meeting the output conditions. The system outputs "eleven degrees" as the final recognition result through voice feedback, device execution commands, etc., while simultaneously recording key information of this recognition (such as score, group, and comparison process) for future reference. This output result echoes the processing logic of each step mentioned above—from clustering and compressed storage to group filtering, all processes revolve around "accurately identifying the optimal command word," forming a complete closed loop—and ensures accurate response to user voice commands, adapting to the actual application scenarios of smart home devices. This embodiment simplifies the global competition logic through global result aggregation, objective score comparison, and accurate result output, ensuring the optimality and accuracy of the recognition results, improving voice interaction response efficiency, and adapting to the application needs of smart devices.

[0036] refer to Figure 2 An organization device for command words, comprising: Clustering module 100 is used to perform clustering processing on the command word set, grouping command words with the same suffix into the same category, and the remaining command words into their own categories, generating clustering results; The compressed storage module 200 is used to compress and store the clustering results, assign compressed clustering identifiers in the form of consecutive integers to multiple command word categories, mark special identifiers for single command word categories, and store the identifiers corresponding to each command word. The grouping and filtering module 300 is used to group command words according to the identifier, filter command words whose scores exceed the preset threshold, use a dynamic update strategy to determine the optimal within the group for multiple command word groups and store the information, record the benchmark score for a single command word group, and generate the corresponding results for each group. The comprehensive comparison module 400 is used to comprehensively compare the scores of all single command phrases and the optimal information of multi-command phrases, and select the command word with the highest score as the final recognition result output.

[0037] Furthermore, the aforementioned clustering module 100 includes: The command word character sequence acquisition unit is used to traverse each command word in the command word set and obtain the complete character sequence of each command word. The unit for determining command phrases with the same suffix is ​​used to compare the character sequences of any two command words with their suffixes, determine whether the whole of one command word is a suffix of another command word, and identify command phrases with the same suffix. The command word category division unit is used to use a clustering algorithm to group command word groups with identical suffixes into the same category, and to divide individual command words that are not grouped into any command word group into independent categories. The clustering result integration unit is used to summarize the mapping information of all categories and corresponding command terms, and integrate them to form the clustering result.

[0038] Furthermore, the aforementioned compressed storage module 200 includes: The multi-command-word category information extraction unit is used to traverse the clustering results, distinguish between multi-command-word categories and categories containing only a single command word, and extract the original category information of all multi-command-word categories; The compressed clustering identifier allocation unit is used to sequentially assign compressed clustering identifiers in the form of consecutive integers to each multi-command word category, and to establish a mapping relationship between compressed clustering identifiers and original category information; The command word and identifier association unit is used to associate each command word with the compressed clustering identifier or special identifier of its category, thus clarifying the correspondence between command words and identifiers; The clustering information storage unit is used to store the mapping relationship and the correspondence between command words and identifiers, and to complete the compressed storage of clustering information.

[0039] Furthermore, the aforementioned compressed storage module 200 includes: The single command word category filtering unit is used to traverse the clustering results, filter out categories containing only a single command word, and determine the command word to which the category belongs; The special identifier allocation unit is used to assign a preset special identifier to each selected single command word category, clarifying the correspondence between the identifier and the category; The single command word and identifier association unit is used to associate the command word in each single command word category with the special identifier of its category; The single command word identifier storage unit is used to store the association between the command word and the special identifier, and to complete the storage of the single command word category identifier.

[0040] Furthermore, the aforementioned group filtering module 300 includes: The multi-command-word grouping unit is used to divide command words into multiple groups based on compressed clustering identifiers, so that command words corresponding to the same compressed clustering identifier are grouped into the same group; The intra-group competitive candidate screening unit is used to traverse each group of command words, obtain the score of each command word one by one, and screen out the command words with scores exceeding the preset threshold as intra-group competitive candidates. The optimal unit within a group is used to determine the optimal unit within each group of candidate command words using a dynamic update strategy. It continuously updates and records the optimal unit within a group according to the rules of length priority and score priority when the lengths are the same. The multi-command group result generation unit is used to store information related to the final optimal command word for each group and generate the optimal result within each group corresponding to the multi-command word group.

[0041] Furthermore, the aforementioned group filtering module 300 includes: The single command word grouping unit is used to divide command words into multiple single command word groups based on special identifiers, so that each single command word corresponding to a special identifier is grouped independently. The single command word compliance filtering unit is used to traverse each single command word group, obtain the score of the command word in each group, determine whether it exceeds the preset threshold, and filter out the qualified command words. The single command group optimal score recording unit is used to directly record the score of the filtered qualified command words. This score is the optimal score of the corresponding single command word group. The single command group result generation unit is used to associate and store the qualified command words of each group with their best scores, and generate the group results corresponding to each single command word group.

[0042] Furthermore, the aforementioned comprehensive comparison module 400 includes: The global score set aggregation unit is used to aggregate the best scores and corresponding command words for all single command phrases, and the best command words and corresponding scores for each multi-command phrase, forming a global score set to be compared. The highest score command word determination unit is used to compare all scores in the global score set one by one to determine the highest score and the corresponding command word. The final recognition result output unit is used to output the command word corresponding to the highest score as the final recognition result.

[0043] Reference Figure 3 This application also provides a computer device, which may be a server, and its internal structure may be as follows: Figure 3 As shown, this computer device includes a processor, memory, network interface, and database connected via a bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores operations, computer programs, and the database. The internal memory provides an environment for the operation and execution of the computer programs stored in the non-volatile storage media. The database stores data such as the organization method of command terms. The network interface is used for communication with external terminals via a network connection. When executed by a processor, this computer program implements a method for organizing command words, including: clustering a set of command words, grouping command words with identical suffixes into the same category, and leaving the remaining command words in their own categories, generating clustering results; compressing and storing the clustering results, assigning compressed clustering identifiers in the form of consecutive integers to multiple command word categories, marking a special identifier for a single command word category, and storing the identifier corresponding to each command word; grouping command words according to the identifiers, filtering command words with scores exceeding a preset threshold, using a dynamic update strategy to determine the optimal value within a group for multiple command word groups and storing the information, recording the qualifying score for a single command word group, and generating corresponding results for each group; comprehensively comparing the scores of all single command word groups with the optimal information of multiple command word groups, and selecting the command word with the highest score as the final recognition result output.

[0044] One embodiment of this application also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements a method for organizing command words, including: performing clustering processing on a set of command words, grouping command words with identical suffixes into the same category, and forming separate categories for the remaining command words, generating clustering results; compressing and storing the clustering results, assigning compressed clustering identifiers in the form of consecutive integers to multiple command word categories, marking a special identifier for a single command word category, and storing the identifier corresponding to each command word; grouping command words according to the identifiers, filtering command words with scores exceeding a preset threshold, using a dynamic update strategy to determine the optimal within a group for multiple command word groups and storing the information, recording the qualifying score for a single command word group, and generating corresponding results for each group; comprehensively comparing the scores of all single command word groups with the optimal information of multiple command word groups, and selecting the command word with the highest score as the final recognition result output.

[0045] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media provided in this application and used in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0046] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method of organizing command words, characterized by, include: Cluster the command word set, grouping command words with the same suffix into the same category, and the remaining command words into their own categories, generating clustering results; Based on the clustering results, compressed storage is performed. Compressed clustering identifiers in the form of consecutive integers are assigned to multiple command word categories, special identifiers are marked for single command word categories, and the identifiers corresponding to each command word are stored. Command words are grouped according to their identifiers. Command words with scores exceeding a preset threshold are filtered out. For multiple command word groups, a dynamic update strategy is used to determine the optimal group and store the information. For a single command word group, its qualifying score is recorded, and corresponding results for each group are generated. By comprehensively comparing the scores of all single-command phrases and the optimal information of multi-command phrases, the command word with the highest score is selected as the final recognition result output.

2. The command word organization method of claim 1, wherein, The step of clustering the command word set, grouping command words with identical suffixes into the same category, and the remaining command words into their own categories, to generate clustering results includes: Iterate through each command word in the command word set and obtain the complete character sequence of each command word; Suffix comparison is performed on the character sequences of any two command words to determine whether the whole of one command word is a suffix of the other command word, and to identify command word groups with the same suffix. Clustering algorithms are used to group command word groups with identical suffixes into the same category, and individual command words that are not grouped into any command word group are divided into independent categories. The mapping information of all categories and their corresponding command terms is summarized and integrated to form the clustering results.

3. The command word organization method of claim 1, wherein, The step of compressing and storing the clustering results, assigning compressed clustering identifiers in the form of consecutive integers to multiple command word categories, and storing the identifier corresponding to each command word includes: Traverse the clustering results, distinguish between categories with multiple command words and categories containing only a single command word, and extract the original category information of all categories with multiple command words; Assign compressed clustering identifiers in the form of consecutive integers to each multi-command word category, and establish a mapping relationship between compressed clustering identifiers and original category information; Each command term is associated with its corresponding compressed clustering identifier or special identifier to clarify the correspondence between command terms and identifiers; Store the mapping relationship and the correspondence between command words and identifiers to complete the compressed storage of clustering information.

4. The command word organization method of claim 1, wherein, The step of compressing and storing the clustering results, assigning special identifiers to single command word categories, and storing the identifiers corresponding to each command word includes: Traverse the clustering results, filter out the categories containing only a single command word, and determine the command word to which the category belongs; Each selected single command term category is assigned a pre-defined special identifier, clearly defining the correspondence between the identifier and the category; Associate the command words in each single command word category with the special identifier of its category; Store the association between the command words and special identifiers to complete the storage of single command word category identifiers.

5. The command word organization method of claim 1, wherein, The steps of grouping command words according to identifiers, filtering command words with scores exceeding a preset threshold, using a dynamic update strategy to determine the optimal command word group within a group and storing the information, and generating the corresponding results for each group include: Command words are divided into multiple groups based on compressed clustering identifiers, so that command words corresponding to the same compressed clustering identifier are grouped into the same group; Iterate through each group of command words, obtain the score of each command word one by one, and filter out the command words with scores exceeding the preset threshold as competitive candidates within the group; For each group of candidate command words, a dynamic update strategy is adopted to determine the optimal one within the group. The optimal information within the group is continuously updated and recorded according to the rules of length priority and score priority when the lengths are the same. Store the information related to the final optimal command word for each group, and generate the optimal result within each group corresponding to the multi-command word group.

6. The command word organization method of claim 1, wherein, The steps of grouping command words according to identifiers, filtering command words with scores exceeding a preset threshold, recording the qualifying score for each command word group, and generating corresponding results for each group include: Based on special identifiers, command words are divided into multiple single command word groups, so that each single command word corresponding to a special identifier is grouped independently. Iterate through each single command phrase, obtain the score of the command phrase in each phrase, determine whether it exceeds the preset threshold, and filter out the qualified command phrases; The scores of the selected qualified command words are recorded directly, and these scores are the optimal scores for the corresponding single command word groups. The qualified command words of each group are associated with their best scores and stored to generate the group results corresponding to each single command word group.

7. The command word organization method of claim 1, wherein, The step of comprehensively comparing the scores of all single-command phrases with the optimal information of multi-command phrases, and selecting the command word with the highest score as the final recognition result output, includes: The best scores and corresponding command words for all single command phrases, and the best command words and corresponding scores for each multi-command phrase are summarized to form a global score set to be compared. Compare all scores in the global score set one by one to determine the highest score and its corresponding command word; The command word corresponding to the highest score is output as the final recognition result.

8. An organization apparatus of command words, characterized by, include: The clustering module is used to cluster the set of command words, grouping command words with the same suffix into the same category, and the remaining command words into their own categories, generating clustering results; The compressed storage module is used to compress and store the clustering results, assign compressed clustering identifiers in the form of consecutive integers to multiple command word categories, mark special identifiers for single command word categories, and store the identifiers corresponding to each command word. The grouping and filtering module is used to group command words according to the identifier, filter command words whose scores exceed the preset threshold, and use a dynamic update strategy to determine the optimal within a group and store the information for multiple command word groups. For a single command word group, its qualifying score is recorded, and the corresponding results for each group are generated. The comprehensive comparison module is used to comprehensively compare the scores of all single command phrases and the optimal information of multi-command phrases, and select the command word with the highest score as the final recognition result output.

9. An organization device of command words, characterized by, include: processor; Memory, used to store computer programs; Wherein, when the processor executes the computer program, it implements the method for organizing command words according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method for organizing command words according to any one of claims 1 to 7.