Keyword fuzzy matching method and device, vehicle and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GREAT WALL MOTOR CO LTD
- Filing Date
- 2023-02-17
- Publication Date
- 2026-06-16
Smart Images

Figure CN116226331B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle technology, and in particular to a keyword fuzzy matching method and apparatus, a vehicle, and a storage medium. Background Technology
[0002] In the automotive industry, the traditional method for quality inspection departments is manual sampling. With the development of technology, in order to conduct quality inspection of full audio data and improve coverage and efficiency, keyword matching algorithms, violation word matching, and quality inspection scoring rules are usually used to output quality inspection reports to achieve sampling inspection.
[0003] However, in different scenarios, such as voice-based test drives, the keyword matching algorithm described above suffers from poor recording quality due to various external factors. When the speech is recognized as the text to be detected, the words in the text may be misrecognized, such as missing some keywords or failing to accurately identify keywords. This results in low keyword recognition accuracy for rule-based quality inspection solutions, which are time-consuming and complex, affecting the accuracy of quality inspection scores in test drive scenarios. Summary of the Invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art.
[0005] Therefore, one objective of this invention is to propose a keyword fuzzy matching method that avoids the problem of keywords being unrecognizable in the text to be detected due to accents or environment, thereby improving the accuracy of speech recognition and thus improving the accuracy of quality inspection scoring.
[0006] Therefore, a second objective of the present invention is to provide a keyword fuzzy matching device.
[0007] Therefore, a third objective of the present invention is to provide a vehicle.
[0008] Therefore, a fourth objective of this invention is to provide a non-transitory computer-readable storage medium.
[0009] To achieve the above objectives, an embodiment of the first aspect of the present invention proposes a keyword fuzzy matching method, the method comprising: determining keyword information in a text to be detected; determining multiple sub-word positions based on the keyword information and the text to be detected, and outputting a target keyword based on the multiple sub-word positions; and / or outputting the target keyword based on the pinyin information of the keyword information and the pinyin information of the text to be detected.
[0010] According to the keyword fuzzy matching method of the present invention, by determining the keyword information in the text to be detected, the method identifies the position of the sub-word information extracted from the keyword information based on the keyword information and the text to be detected, thereby determining the position of multiple sub-words in the text to be detected, and outputting target keywords by combining keywords based on the determined sub-word positions. This makes the keyword matching algorithm more accurate and efficient, and / or outputs target keywords based on the pinyin information of the keyword information and the pinyin information of the text to be detected, avoiding the problem of keywords not being recognized in the text to be detected due to accents or environment, thereby improving the accuracy of speech recognition and thus improving the accuracy of quality inspection scoring.
[0011] In some embodiments, determining the positions of multiple sub-words in the text to be detected based on the keyword information and the text to be detected, and determining the target keyword based on the multiple sub-word positions, includes: determining multiple sub-word information and an initial flag corresponding to the keyword information based on the keyword information; determining the positions of multiple sub-words in the text to be detected based on the multiple sub-word information and the text to be detected; and determining the target keyword based on the multiple sub-word positions and the initial flag.
[0012] In some embodiments, determining the sub-word positions of multiple sub-words in the text to be detected based on multiple sub-word information and the text to be detected includes: determining the arrangement order of multiple sub-words in the text to be detected based on multiple sub-word information, and using the arrangement order as the sub-word positions of multiple sub-words in the text to be detected.
[0013] In some embodiments, outputting the target keyword based on multiple sub-word positions and the initial flag bit includes: determining the sub-word distance based on different sub-word positions; determining whether the sub-word distance is less than a preset sub-word distance threshold; if so, determining that the sub-word information matches the keyword successfully, rewriting the initial flag bit to the target flag bit, and outputting the target keyword.
[0014] In some embodiments, before outputting the target keyword, the method further includes: determining the number of valid target flag bits; determining whether the number of valid target flag bits is greater than a preset flag bit threshold; if so, outputting the target keyword.
[0015] In some embodiments, outputting the target keyword based on the pinyin information of the keyword information and the pinyin information of the text to be detected includes: determining homophones that are consistent with the pinyin information in the text to be detected based on the pinyin information of the keyword information; and determining the target keyword based on the homophones.
[0016] To achieve the above objectives, a second aspect of the present invention provides a keyword fuzzy matching device, the device comprising: a determining module for determining keyword information in a text to be detected; an output module for determining multiple sub-word positions based on the keyword information and the text to be detected, and determining a target keyword based on the multiple sub-word positions; and / or determining the target keyword based on the pinyin information of the keyword information and the pinyin information of the text to be detected.
[0017] According to the keyword fuzzy matching device of the present invention, by determining the keyword information in the text to be detected, the device performs position recognition on the sub-word information extracted from the keyword information based on the keyword information and the text to be detected, thereby determining the sub-word positions of multiple sub-words in the text to be detected, and outputting target keywords by combining keywords based on the determined sub-word positions, making the keyword matching algorithm more accurate and efficient, and / or outputting target keywords based on the pinyin information of the keyword information and the pinyin information of the text to be detected, avoiding the problem of keywords not being recognized in the text to be detected due to accents or environment, thereby improving the accuracy of speech recognition and thus improving the accuracy of quality inspection scoring.
[0018] In some embodiments, the output module is specifically configured to: determine multiple sub-word information and an initial flag corresponding to the keyword information based on the keyword information; determine the sub-word positions of the multiple sub-words in the text to be detected based on the multiple sub-word information and the text to be detected; and output the target keyword based on the multiple sub-word positions and the initial flag.
[0019] To achieve the above objectives, a third aspect of the present invention provides a vehicle that includes a keyword fuzzy matching device as described in the above embodiments.
[0020] According to the vehicle of the present invention, by determining the keyword information in the text to be detected, the position recognition of the sub-word information extracted from the keyword information is performed based on the keyword information and the text to be detected, so as to determine the position of multiple sub-words in the text to be detected, and the target keyword is output by combining keywords based on the determined sub-word positions, making the keyword matching algorithm more accurate and efficient, and / or the target keyword is output based on the pinyin information of the keyword information and the pinyin information of the text to be detected, avoiding the problem of keywords not being recognized in the text to be detected due to accent or environment, thereby improving the accuracy of speech recognition, and thus improving the accuracy of quality inspection scoring.
[0021] To achieve the above objectives, a fourth aspect of the present invention provides a non-transitory computer-readable storage medium storing a keyword fuzzy matching program, which, when executed by a processor, implements the keyword fuzzy matching method as described in the above embodiments.
[0022] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0023] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0024] Figure 1 This is a flowchart of a keyword fuzzy matching method according to an embodiment of the present invention;
[0025] Figure 2 This is a flowchart of position matching according to an embodiment of the present invention;
[0026] Figure 3 This is a flowchart of a keyword fuzzy matching method according to a specific embodiment of the present invention;
[0027] Figure 4 This is a block diagram of a keyword fuzzy matching device according to an embodiment of the present invention;
[0028] Figure 5 This is a block diagram of a vehicle according to an embodiment of the present invention. Detailed Implementation
[0029] The embodiments of the present invention are described in detail below. The embodiments described with reference to the accompanying drawings are exemplary. The embodiments of the present invention are described in detail below.
[0030] In related technologies, the inability of keyword matching to be accurately identified is caused by a variety of reasons. For example, the audio data of test drive scenarios comes from all over the country. People from different regions have heavy accents in their speech, as well as the characteristics of colloquial expression habits. After speech recognition is used as the text to be detected, due to issues such as heavy accents and expression habits, the problem of inaccurate keyword recognition will occur.
[0031] For example, noisy test drive environments, aging recording equipment, and improper use of recording equipment can cause background noise, making the audio content unclear and keyword recognition inaccurate. When using a keyword fuzzy matching algorithm, the special keywords generated by the above situations cannot be identified when using a pre-set keyword library to perform a complete keyword match on the text to be tested, thus affecting the accuracy of the quality inspection score.
[0032] Therefore, the keyword fuzzy matching method of this invention determines the positions of multiple sub-words to output the target keyword by performing position matching between the keyword information in the text to be detected and the text to be detected; at the same time, it performs homophone matching based on the pinyin information of the keyword information and the pinyin information of the text to be detected to improve the accuracy of keyword recognition. Moreover, compared with keyword matching, using both position recognition and speech recognition to determine keywords reduces the problem of word errors in the text due to various external factors, making the matching time shorter. Thus, while reducing the matching time, it provides support for improving the quality inspection score.
[0033] The following is combined Figures 1-3 The keyword fuzzy matching method of this invention will be illustrated with an example.
[0034] like Figure 1 As shown, the keyword fuzzy matching method of this embodiment of the invention includes at least step S1 and step S2.
[0035] Step S1: Determine keyword information in the text to be detected.
[0036] The text to be detected is user audio obtained through recording equipment during test drives, and the user audio is converted into text to be detected using speech recognition technology.
[0037] After obtaining the text to be tested, keyword information is determined in the text. Keyword information refers to the words that need to be accurately output in the text. For example, if the text to be tested is: "Here you can see that the chassis is transparent", keyword information can be determined by analyzing the text. For example, the keyword information is "transparent chassis".
[0038] In this embodiment, during a test drive, user audio obtained through a recording device, such as audio of a user who says the car uses a 2.0T engine, is converted into text information using speech recognition technology to identify the text to be detected. Feature extraction is then performed on the text to be detected, such as extracting keyword information, for example, extracting "2.0T engine" as keyword information. By identifying keyword information in the text to be detected, it is easier to match based on the keyword information.
[0039] Step S2: Determine multiple sub-word positions based on keyword information and the text to be detected, and output target keywords based on multiple sub-word positions; and / or output target keywords based on the pinyin information of keyword information and the pinyin information of the text to be detected.
[0040] Identifying target keywords in the text to be detected can be done using positional matching or homonym matching. In this method, the target keyword is considered a valid keyword, and a successful match is considered achieved after outputting the target keyword. Positional matching is used to identify cases where keywords are synonyms. After determining the keyword information in the text to be detected, positional matching is performed on the keyword information. This involves splitting the keyword information into multiple sub-words and comparing these sub-words with the text to determine their positions within the text, thus obtaining the positional information of each sub-word.
[0041] Homophone matching is used to identify cases where keywords are homophones. After determining the keyword information in the text to be detected, homophone matching is performed on the keyword information, that is, the pinyin information of the keyword information is compared with the pinyin of the text to be detected to output the target keyword. Position matching or homophone matching is performed on the keyword information to achieve keyword matching, and the target keyword is output after the matching is completed. The target keyword is determined based on the keyword information in the text to be detected. Using position matching and / or homophone matching can improve the accuracy of identifying the target keyword.
[0042] In this embodiment, after determining the keyword information in the text to be detected, fuzzy keyword matching is performed, such as position matching of the keyword information. The keyword information in the text to be detected is split into multiple sub-word information. For example, if the keyword information is "transparent chassis", the split sub-word information is "chassis", "chassis transparent", "transparent", and "chassis transparent". After determining the above multiple sub-word information, the positions of multiple sub-words in the text to be detected are determined according to the multiple sub-word information. For example, the positions of the sub-words "chassis" and "transparent" in the text to be detected are determined. By matching the sub-words in the text to be detected, the position of each sub-word can be determined. The keywords are combined according to the multiple sub-word positions to determine whether the keywords are successfully matched. By performing position matching of the keyword information, the situation where the keywords are synonyms can be identified, avoiding the problem of keywords not being recognized due to expression habits in the text to be detected.
[0043] And / or perform homophone matching on keyword information. The keyword information and the text to be detected are transcribed into pinyin information according to the homophone matching algorithm. By judging whether the pinyin information of the keyword information and the pinyin information of the text to be detected are consistent, it is determined whether the keyword is successfully matched. By performing homophone matching on keyword information, it is possible to identify cases where the keyword is a homophone, and identify keyword information that is incorrectly identified in speech recognition. This avoids the problem of keywords not being recognized due to accent problems in the text to be detected. Position matching and / or homophone matching are used to improve the accuracy of speech recognition, thereby improving the accuracy of quality inspection scoring.
[0044] According to the keyword fuzzy matching method of the present invention, by determining the keyword information in the text to be detected, the method identifies the position of the sub-word information extracted from the keyword information based on the keyword information and the text to be detected, thereby determining the position of multiple sub-words in the text to be detected, and outputting target keywords by combining keywords based on the determined sub-word positions. This makes the keyword matching algorithm more accurate and efficient, and / or outputs target keywords based on the pinyin information of the keyword information and the pinyin information of the text to be detected, avoiding the problem of keywords not being recognized in the text to be detected due to accents or environment, thereby improving the accuracy of speech recognition and thus improving the accuracy of quality inspection scoring.
[0045] In some embodiments, when determining the positions of multiple sub-words in the text to be detected based on keyword information and the text to be detected, and outputting the target keyword based on the positions of multiple sub-words, the process involves determining multiple sub-word information and an initial flag corresponding to the keyword information based on the keyword information; determining the positions of multiple sub-words in the text to be detected based on the multiple sub-word information and the text to be detected; and determining the target keyword based on the positions of multiple sub-words and the initial flag.
[0046] In this embodiment, after determining the keyword information in the text to be detected, the keyword information is split into multiple sub-word information according to the word segmentation rules, and a corresponding initial flag is created for the keyword information. The multiple sub-word information is precisely matched, and the sub-word positions in the text to be detected are determined based on the multiple sub-word information and the text to be detected. The keyword information is combined based on the sub-word positions in the text to be detected and the initial flags. The position matching of the keyword information is judged based on the combination information. If the matching is successful, the target keyword is output; if the matching fails, the target keyword is not output.
[0047] Understandably, multiple sub-words are determined based on keyword information, and these sub-words are used to perform precise matching on the text to be detected, so as to obtain the position of each sub-word in the text to be detected, such as the start and end positions of the sub-word, thereby achieving fuzzy matching of keywords.
[0048] The keyword information contains Chinese characters, numbers, and characters. When splitting it according to the word segmentation rules, the keyword information needs to be segmented in both forward and backward order, and the continuity between numbers and characters needs to be preserved. By segmenting the keyword information, the number of redundant sub-words can be avoided and the keyword combination of sub-words can be increased.
[0049] For example, the keyword information such as "2.0T engine" can be split into multiple sub-word information according to the word segmentation rules: 2.0, 2.0T, 2.0T engine, engine and motivation; the keyword information such as "transparent chassis" can be split into multiple sub-word information according to the word segmentation rules: chassis, transparent, chassis transparent and chassis transparent.
[0050] In some embodiments, when determining the position of multiple sub-words in the text to be detected based on multiple sub-word information and the text to be detected, the order of the multiple sub-words in the text to be detected is determined based on the multiple sub-word information; and the order of the order is used as the position of the multiple sub-words in the text to be detected.
[0051] In this embodiment, after obtaining multiple sub-word information, the text to be detected is matched according to the multiple sub-word information to obtain the arrangement order of the multiple sub-words in the text to be detected, and the position of the multiple sub-words in the text to be detected is determined according to the arrangement order.
[0052] For example, the text to be detected is: "Here you can see the chassis is transparent." The keyword information is: "transparent chassis." After processing the keyword information, the resulting sub-word information is: chassis, chassis transparent, transparent, chassis transparent. The sub-word information is matched with the text to be detected. For example, the text to be detected is sorted according to the order of the text from front to back, starting from 0 and continuing until the last character of the text to be detected. The sub-word information is substituted into the text to be detected to obtain the corresponding sorting order. For example, the start and end positions of the sub-word information in the text to be detected are used as the sub-word positions.
[0053] For example, if the order of the sub-word information base in the text to be detected starts from 0, its starting position is 6. To identify both sub-word bases, its ending position is 8. Therefore, the order of the sub-word information base in the text to be detected is [6, 8]. Similarly, if the order of the sub-word information transparency in the text to be detected starts from 0, its starting position is 9. To identify both sub-word transparency, its ending position is 11. Therefore, the order of the sub-word information in the text to be detected is [9, 11]. After determining the order of the sub-words in the text to be detected, this order is used as the sub-word position in the text to be detected. Using the order of multiple sub-words in the text to be detected as the sub-word position is a simple and easy process to implement.
[0054] In some embodiments, when outputting target keywords based on multiple sub-word positions and an initial flag, the sub-word distance is determined based on different sub-word positions; it is determined whether the sub-word distance is less than a preset sub-word distance threshold; if so, it is determined that the sub-word information matches the keyword successfully, the initial flag is rewritten to the target flag, and the target keyword is output.
[0055] In this embodiment, after determining multiple sub-word positions, the sub-word distance between different sub-word positions is calculated. The relationship between the sub-word distance between different sub-word positions and a preset sub-word distance threshold is determined. If the sub-word distance is less than the preset sub-word distance threshold, it is considered that the distance between sub-words meets the requirements. Then, it is determined that the sub-word information matches the keyword successfully, the initial flag of the keyword is rewritten to the target flag, and the target keyword is output. If the sub-word distance is greater than the preset sub-word distance threshold, it is considered that the distance between sub-words does not meet the requirements. Then, it is determined that the sub-word information does not match the keyword, and the subsequent text information to be detected is identified, thereby achieving fuzzy keyword matching.
[0056] For example, if the preset sub-word distance threshold is 2, the initial flag of the keyword information transparency chassis is [0,0,0,0], the position of the sub-word information chassis is [6,8], and the position of the sub-word information transparency is [9,11], and the distance between the sub-word chassis and the sub-word transparency is less than the preset sub-word distance threshold of 2, then the sub-word information chassis and the sub-word information transparency are determined to be successfully matched with the keyword information transparency chassis. The initial flag of the keyword transparency chassis [0,0,0,0] is rewritten to the target flag [1,1,1,1], and the target keyword is output as the transparency chassis.
[0057] For example, if the preset sub-word distance threshold is 6, and the keyword information is AEB crossroads assistance, then when the keyword information AEB crossroads assistance appears in the text to be detected, it is considered that the keyword information AEB crossroads assistance can be successfully identified and output.
[0058] In some embodiments, before outputting the target keyword, the number of valid target flags is determined; it is then determined whether the number of valid target flags is greater than a preset flag threshold; if so, the target keyword is output. The preset flag threshold can be set according to keywords of different lengths, enabling the identification of some synonyms to a greater extent.
[0059] In this embodiment, keyword information is combined based on the position information and initial flags in the text to be detected. It is then determined whether the keyword information matches successfully. If the keyword information matches successfully, the number of valid target flags is determined, and the relationship between the number of valid target flags and a preset flag threshold is compared. If the number of valid target flags is greater than the preset flag threshold, the number of valid target flags is determined to meet the requirements, and the target keyword is output. If the number of valid target flags is less than the preset flag threshold, the number of valid target flags is determined to not meet the requirements, and the subsequent text information to be detected is identified. By determining the number of valid target flags, flag thresholds can be set for keywords of different lengths, which can greatly help to identify some synonyms.
[0060] The following is combined Figure 2 The location matching method of the present invention is described in the following embodiments: Figure 2 As shown, the location matching method in this embodiment of the invention includes at least steps S11-S22.
[0061] Step S11: Determine keyword information in the text to be detected.
[0062] Step S12: Split the keyword information into multiple sub-word information according to the word segmentation rules, and create corresponding initial flags for the keyword information.
[0063] Step S13: Use multiple sub-word information to perform precise matching on the text to be detected.
[0064] Step S14: Determine the order of multiple sub-words in the text to be detected, and use the order as the position of the multiple sub-words in the text to be detected.
[0065] Step S15: Calculate the word distance between different word positions.
[0066] Step S16: Determine whether the sub-word distance is less than the preset sub-word distance threshold. If yes, proceed to step S17; otherwise, proceed to step S18.
[0067] Step S17: Confirm that the sub-word information and the keyword are successfully matched, and rewrite the initial flag of the keyword to the target flag.
[0068] Step S18: If the sub-word information fails to match the keyword, continue to identify the subsequent text information to be detected.
[0069] Step S19: Determine the number of valid target flag bits.
[0070] Step S20: Determine whether the number of valid target flag bits is greater than the preset flag bit threshold. If yes, proceed to step S21; otherwise, proceed to step S22.
[0071] Step S21: Determine if the number of valid target flags meets the requirements, and output the target keywords.
[0072] Step S22: Determine that the number of valid target flag bits does not meet the requirements.
[0073] In some embodiments, when determining multiple sub-word positions based on keyword information and the text to be detected, and outputting target keywords based on multiple sub-word positions, homophone information that matches the pinyin information in the text to be detected is determined based on the pinyin information of the keyword information; and target keywords are output based on the homophone information.
[0074] In this embodiment, after the user's audio is converted into text to be detected using speech recognition technology, the keyword information and the text to be detected are transcribed into pinyin information. It is then determined whether the pinyin information of the keyword information is consistent with the pinyin information in the text to be detected. If consistent pinyin information is found, it is considered that the consistent pinyin information is a homophone of the keyword. The homophone of the keyword in the text to be detected is output as the target keyword. By performing homophone matching on the keyword information, keywords that are incorrectly identified in speech recognition can be identified as quickly as possible, thus realizing pinyin fuzzy algorithm matching.
[0075] For example, the text to be detected is "This car is completely visible", which is transliterated into pinyin as "zhekuancheshikeshichedide". The keyword information is "visible car bottom", which is transliterated into pinyin as "keshichedi". The pinyin information "keshichedi" of the keyword information is consistent with the pinyin information "keshichedi" of the text to be detected. Therefore, "completely visible" is determined to be a homophone of the keyword "visible car bottom", and the target keyword is "visible car bottom".
[0076] The following is combined Figure 3 The keyword fuzzy matching method of the present invention is described in the following embodiments: Figure 3 The diagram shown is a flowchart of a keyword fuzzy matching method according to a specific embodiment of the present invention.
[0077] Step S31: Determine keyword information in the text to be detected.
[0078] Step S32: Perform position matching on the keyword information.
[0079] Step S33: Convert the keyword information and the text to be detected into pinyin information.
[0080] Step S34: Perform homophone matching on the keyword information.
[0081] Step S35: Output the target keywords.
[0082] Step S36: Calculate the quality inspection score based on the quality inspection scoring rules.
[0083] The aforementioned homophone and synonym matching methods can quickly identify keyword information that is incorrect in speech recognition, and calculate the quality inspection score based on the quality inspection scoring rules, thereby improving the accuracy of quality inspection.
[0084] According to the keyword fuzzy matching method of the present invention, by determining the keyword information in the text to be detected, the method identifies the position of the sub-word information extracted from the keyword information based on the keyword information and the text to be detected, thereby determining the position of multiple sub-words in the text to be detected, and outputting target keywords by combining keywords based on the determined sub-word positions. This makes the keyword matching algorithm more accurate and efficient, and / or outputs target keywords based on the pinyin information of the keyword information and the pinyin information of the text to be detected, avoiding the problem of keywords not being recognized in the text to be detected due to accents or environment, thereby improving the accuracy of speech recognition and thus improving the accuracy of quality inspection scoring.
[0085] The following is for reference. Figure 4 The keyword fuzzy matching device 2 of this invention is described in an embodiment.
[0086] like Figure 4 As shown, the keyword fuzzy matching device of this embodiment includes: a determining module 21 and an output module 22, wherein,
[0087] The determination module 21 is used to determine keyword information in the text to be detected; the output module 22 is used to determine the positions of multiple sub-words based on the keyword information and the text to be detected, and output the target keyword based on the positions of the multiple sub-words; and / or output the target keyword based on the pinyin information of the keyword information and the pinyin information of the text to be detected.
[0088] According to the keyword fuzzy matching device 2 of the present invention, by determining the keyword information in the text to be detected, the device performs position recognition on the sub-word information extracted from the keyword information based on the keyword information and the text to be detected, thereby determining the sub-word positions of multiple sub-words in the text to be detected, and outputting target keywords by combining keywords based on the determined sub-word positions, making the keyword matching algorithm more accurate and efficient, and / or outputting target keywords based on the pinyin information of the keyword information and the pinyin information of the text to be detected, avoiding the problem of keywords not being recognized in the text to be detected due to accents or environment, thereby improving the accuracy of speech recognition and thus improving the accuracy of quality inspection scoring.
[0089] In some embodiments, the output module 22 is specifically used to: determine multiple sub-word information and an initial flag corresponding to the keyword information based on the keyword information; determine the sub-word positions of multiple sub-words in the text to be detected based on the multiple sub-word information and the text to be detected; and determine the target keyword based on the multiple sub-word positions and the initial flag.
[0090] In some embodiments, the output module 22 is specifically used to: determine the order of multiple sub-words in the text to be detected based on multiple sub-word information, and use the order of arrangement as the sub-word position of the multiple sub-words in the text to be detected.
[0091] In some embodiments, the output module 22 is specifically used to: determine the word distance based on different word positions; determine whether the word distance is less than a preset word distance threshold; if so, determine that the word information and the keyword are successfully matched, rewrite the initial flag bit to the target flag bit, and output the target keyword.
[0092] In some embodiments, the output module 22 is further specifically used to: determine the number of valid target flags before outputting the target keyword; determine whether the number of valid target flags is greater than a preset flag threshold; if so, output the target keyword. The preset flag threshold can be set according to keywords of different lengths, and can identify a large number of synonyms.
[0093] In some embodiments, the determining module 21 is specifically used to: determine homophones that are consistent with the pinyin information in the text to be detected based on the pinyin information of the keyword information; and output the target keyword based on the homophone information.
[0094] According to the keyword fuzzy matching device 2 of the present invention, by determining the keyword information in the text to be detected, the device performs position recognition on the sub-word information extracted from the keyword information based on the keyword information and the text to be detected, thereby determining the sub-word positions of multiple sub-words in the text to be detected, and outputting target keywords by combining keywords based on the determined sub-word positions, making the keyword matching algorithm more accurate and efficient, and / or outputting target keywords based on the pinyin information of the keyword information and the pinyin information of the text to be detected, avoiding the problem of keywords not being recognized in the text to be detected due to accents or environment, thereby improving the accuracy of speech recognition and thus improving the accuracy of quality inspection scoring.
[0095] The following is for reference. Figure 5 Vehicle 3, as described in an embodiment of the present invention.
[0096] like Figure 5 As shown, the vehicle 3 in this embodiment of the invention includes the keyword fuzzy matching device 2 as described in the above embodiment.
[0097] According to the vehicle 3 of the present invention, by determining the keyword information in the text to be detected, the vehicle identifies the position of the sub-word information extracted from the keyword information based on the keyword information and the text to be detected, thereby determining the position of multiple sub-words in the text to be detected, and outputting target keywords by combining keywords based on the determined sub-word positions, making the keyword matching algorithm more accurate and efficient, and / or outputting target keywords based on the pinyin information of the keyword information and the pinyin information of the text to be detected, avoiding the problem of keywords not being recognized in the text to be detected due to accents or environment, thereby improving the accuracy of speech recognition and thus improving the accuracy of quality inspection scoring.
[0098] The following describes a non-transitory computer-readable storage medium according to embodiments of the present invention.
[0099] The non-transitory computer-readable storage medium of this invention stores a keyword fuzzy matching program, which, when executed by a processor, implements the keyword fuzzy matching method as described in the above embodiments.
[0100] In the description of this invention, "a plurality of" means two or more.
[0101] In the description of this invention, the first feature being "above" or "below" the second feature may include the first and second features being in direct contact, or it may include the first and second features not being in direct contact but being in contact through another feature between them.
[0102] In the description of this invention, the terms "above," "over," and "on top" for the first feature and the second feature include the first feature being directly above or diagonally above the second feature, or simply indicating that the first feature is at a higher horizontal level than the second feature.
[0103] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example.
[0104] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A keyword fuzzy matching method, characterized in that, include: Identify keyword information in the text to be detected; Based on the keyword information and the text to be detected, multiple sub-word positions are determined, and target keywords are output based on the multiple sub-word positions, including: Based on the keyword information, determine multiple sub-word information and initial flag bits corresponding to the keyword information; Based on the multiple sub-word information and the text to be detected, determine the positions of multiple sub-words in the text to be detected; The target keyword is determined based on multiple sub-word positions and the initial flag; and / or The target keyword is output based on multiple sub-word positions and the initial flag, including: Determine the sub-word distance based on the different sub-word positions; Determine whether the sub-word distance is less than a preset sub-word distance threshold; If so, if the sub-word information is found to match the keyword successfully, the initial flag bit is rewritten to the target flag bit, and the target keyword is output; The target keywords are output based on the pinyin information of the keyword information and the pinyin information of the text to be detected, including: Based on the pinyin information of the keyword information, determine the homophones that match the pinyin information in the text to be detected; output the target keyword based on the homophone information; Keyword information is split into multiple sub-word information, including word segmentation in both forward and backward order, while preserving the continuity between numbers and characters.
2. The keyword fuzzy matching method according to claim 1, wherein, Determining the position of multiple sub-words in the text to be detected based on multiple sub-word information and the text to be detected includes: The order of the multiple sub-words in the text to be detected is determined based on the information of the multiple sub-words, and the order of the multiple sub-words is used as the position of the multiple sub-words in the text to be detected.
3. The keyword fuzzy matching method according to claim 1, wherein, Before outputting the target keyword, the following is also included: Determine the number of valid target flag bits; Determine whether the number of valid target flag bits is greater than a preset flag bit threshold; If so, output the target keyword.
4. A keyword fuzzy matching apparatus characterized by comprising: include: The identification module is used to identify keyword information in the text to be detected; The output module is used to determine multiple sub-word positions based on the keyword information and the text to be detected, and to determine the target keyword based on the multiple sub-word positions, including: Based on the keyword information, determine multiple sub-word information and initial flag bits corresponding to the keyword information; Based on the multiple sub-word information and the text to be detected, determine the positions of multiple sub-words in the text to be detected; The target keyword is determined based on multiple sub-word positions and the initial flag; and / or The target keyword is output based on multiple sub-word positions and the initial flag, including: Determine the sub-word distance based on the different sub-word positions; Determine whether the sub-word distance is less than a preset sub-word distance threshold; If so, if the sub-word information is found to match the keyword successfully, the initial flag bit is rewritten to the target flag bit, and the target keyword is output; The target keywords are output based on the pinyin information of the keyword information and the pinyin information of the text to be detected, including: Based on the pinyin information of the keyword information, determine the homophones that match the pinyin information in the text to be detected; output the target keyword based on the homophone information; Keyword information is split into multiple sub-word information, including word segmentation in both forward and backward order, while preserving the continuity between numbers and characters.
5. The keyword fuzzy matching apparatus according to claim 4, wherein, The output module is specifically used for: Based on the keyword information, determine multiple sub-word information and initial flag bits corresponding to the keyword information; The positions of the multiple sub-words in the text to be detected are determined based on the multiple sub-word information and the text to be detected. The target keyword is output based on the multiple sub-word positions and the initial flag.
6. A vehicle characterized by comprising: include: The keyword fuzzy matching device as described in claim 4 or 5.
7. A non-transitory computer-readable storage medium, comprising: The non-transitory computer-readable storage medium stores a keyword fuzzy matching program, which, when executed by a processor, implements the keyword fuzzy matching method as described in any one of claims 1-3.