Test method and device, wearable equipment and storage medium

Through feature extraction and matching technology and the application of the rule base, efficient and accurate testing of wearable device test cases is achieved, solving the problems of inefficiency and difficulty in ensuring the accuracy of traditional testing methods.

CN119473915APending Publication Date: 2025-02-18BEIJING SUPERHEXA CENTURY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411752795.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

Traditional broadcast testing methods rely on manual listening and recording, are inefficient and susceptible to subjective factors, making it difficult to guarantee the accuracy and consistency of test results.

Method used

The core features of the test cases are obtained through feature extraction technology and matched with multiple feature data sets in the feature database to quickly locate the target feature data set that matches the target feature. Automatically determine the corresponding target rule set based on the target feature data set, and then test the test cases.

Benefits of technology

It improves the efficiency and accuracy of the test work, ensures the targetedness of the test, avoids invalid or redundant test operations, and improves the accuracy and reliability of the test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473915A_ABST
    Figure CN119473915A_ABST
Patent Text Reader

Abstract

The invention provides a test method and device, wearable equipment and a storage medium, and belongs to the technical field of broadcast test.The method comprises the steps that feature extraction is conducted on use cases in a test set to obtain target features, and a target feature data set corresponding to the target features is determined based on a matching result of the target features and features in a feature database; the feature database comprises a plurality of feature data sets; determining a target rule set corresponding to the target feature data set in the rule base; and testing the target rule set based on the use cases in the test set. According to the invention, the testing accuracy and effectiveness of the wearable device can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the technical field of broadcast testing, and more specifically, relates to a testing method and apparatus, a wearable device, and a storage medium. Background Art

[0002] With the continuous advancement of information technology, broadcast testing technology is playing an increasingly important role in many fields, especially in the field of wearable devices. Wearable devices, such as smart watches and smart glasses, not only have the functions of traditional watches or glasses, but also integrate intelligent functions such as voice broadcast, message reminders, and health monitoring, which greatly enriches users' daily lives.

[0003] However, as the functions of wearable devices continue to increase, the accuracy and stability of their broadcast functions have also become the focus of users. Traditional broadcast testing methods often rely on manual listening and recording, which is not only inefficient but also easily affected by subjective factors, making it difficult to ensure the accuracy and consistency of test results. Summary of the invention

[0004] The purpose of the present disclosure is to provide a testing method and apparatus, a wearable device, and a storage medium to improve the accuracy and effectiveness of wearable device testing.

[0005] A first aspect of the embodiments of the present disclosure provides a testing method, including: Extracting features from the test cases in the test set to obtain target features, and determining a target feature data set corresponding to the target features based on a matching result between the target features and features in a feature database; the feature database includes multiple feature data sets; Determine a target rule set corresponding to the target feature data set in the rule base; The target rule set is tested based on the use cases in the test set.

[0006] A second aspect of the embodiments of the present disclosure provides a testing device, including: A feature extraction module is used to extract features from the test cases in the test set to obtain target features, and determine a target feature data set corresponding to the target feature based on a matching result between the target feature and features in a feature database; the feature database includes multiple feature data sets; A first matching module, used to determine a target rule set corresponding to the target feature data set in a rule base; A testing module is used to test the target rule set based on the use cases in the test set.

[0007] According to a third aspect of an embodiment of the present disclosure, a wearable device is provided, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above-mentioned test method when executing the computer program.

[0008] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned test method are implemented.

[0009] The test method and apparatus, wearable device, and storage medium provided by the embodiments of the present disclosure have the following beneficial effects: The present disclosure uses feature extraction technology to obtain the core features of the test case in the test set, and matches them with multiple feature data sets in the feature database, so as to quickly locate the target feature data set that matches the target feature. This process not only greatly improves the efficiency of the testing work, but also ensures the pertinence of the test and avoids invalid or redundant testing operations. At the same time, the present disclosure also makes full use of the resources in the rule base, automatically determines the corresponding target rule set according to the target feature data set, and then tests the use cases in the test set. This rule-based testing method not only makes the testing process more standardized and systematic, but also effectively improves the accuracy and reliability of the test. In summary, the present disclosure achieves efficient and accurate testing of test cases through steps such as feature extraction, feature matching, and rule base application. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0011] Figure 1 A flow chart of a testing method provided in one embodiment of the present disclosure; Figure 2 A structural block diagram of a testing device provided in one embodiment of the present disclosure; Figure 3 A schematic block diagram of a wearable device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION

[0012] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.

[0013] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0014] Please refer to Figure 1 , Figure 1 A flow chart of a testing method provided in one embodiment of the present disclosure, the method comprising: S101: Extracting features of the test cases in the test set to obtain target features, and determining a target feature data set corresponding to the target features based on a matching result between the target features and features in a feature database; the feature database includes multiple feature data sets.

[0015] In this embodiment, the test set is a data set for training the intelligent voice model of the wearable device. The test set contains many use cases for training the intelligent voice model. By using the data information contained in these use cases, the intelligent voice model can learn and master how to make expected responses in different voice input scenarios or when receiving information, so as to continuously optimize its voice recognition, semantic understanding, and reply generation functions.

[0016] The use cases in the test set include original information and correct output information. For example, the original information is "The weather is great today + an emoticon", and the meaning of the emoticon is "Happy Travel". Then the correct output information should be "The weather is great today + an emoticon for happy travel", which is the corresponding feedback to the user's input with emotional implications. The use case simulates the actual scenario of conveying meaning through the combination of text and emoticons in daily communication and expecting corresponding responses, which is used to test whether the model can accurately interpret and correctly respond to such input content with complex meanings.

[0017] For the original information and the corresponding correct output information in the training cases of the intelligent voice model of these wearable devices, we can use the technical means of lexical analysis, syntactic analysis, semantic representation and other technical means in the field of natural language processing, or use the feature extraction model in deep learning (such as convolutional neural network and other model architectures suitable for text feature extraction) to extract key information that can reflect the intention of voice commands, language style characteristics, reply logic patterns, etc. as target features. For example, extract the keywords, key semantic structures, information types of reply content, language expression rules, etc. in the voice commands as target features.

[0018] The feature database is a pre-built database resource that stores multiple feature data sets. The feature data sets in the feature database can be classified according to different dimensions such as the functional category of voice commands (such as life services, health monitoring, entertainment and leisure, etc.), language expression style (formal, colloquial, etc.), and semantic complexity. The feature data sets in the feature database can also be classified according to dimensions such as emoticons, special characters, URLs, and compressed packages.

[0019] In this embodiment, a feature extraction model may be used to extract target features in a use case.

[0020] Determining a target feature data set corresponding to the target feature based on a matching result between the target feature and the feature in the feature database includes: Matching the target features with the features in the feature database based on a distance measurement method, or matching the target features with the features in the feature database based on a deep learning algorithm to obtain a matching result; A target feature dataset corresponding to the target feature is determined based on the matching result.

[0021] For example, there are three feature data sets in the feature database, the target feature is a text feature, the target feature matches the first feature data set by 90%, the target feature matches the second feature data set by 60%, and the target feature matches the third feature data set by 10%, then the first feature data set is the target feature data set.

[0022] S102: Determine a target rule set corresponding to a target feature data set in a rule base.

[0023] In this embodiment, the rule base is a "warehouse" that stores many rule sets. Each rule set includes many rules, and each rule can be used to convert the original information in the test set to obtain output test information. For example, the original information contains a URL (www.xxxx.com), and the rule can be "read out the text in the original information one by one" or "output-this is a URL." When the rule base is initialized, it contains many rules, such as the two rules given above. If the original information is a URL, the second rule is more in line with the user's intention; if the original information is plain text information, the first rule is more in line with the user's intention. Therefore, each target feature data set has a corresponding target rule set, and the number of rules contained in the target rule set at the time of initialization is the same or different.

[0024] In this embodiment, the number of initialization rules of the target rule set corresponding to the target feature data set is determined according to the type of the target feature data set and the number of features included in the target feature data set.

[0025] Exemplarily, the types of the target feature data set include text type, image type, special symbol type, emoticon type, compressed package type, etc.; the number of features included in the text type data set is a first number, the number of features included in the image type data set is a second number, the number of features included in the special symbol type is a third number, the number of features included in the emoticon type is a fourth number, and the number of features included in the compressed package type is a fifth number. The first number is greater than the second number, the second number is greater than the fourth number, the fourth number is greater than the third number, and the third number is greater than the fifth number.

[0026] Because text-type datasets contain rich features such as grammatical structure, lexical semantics, and text style, and also need to consider the impact of the text's part of speech, sentence structure, rhetoric, etc. on emotional expression, text-type datasets usually require more rules to meet various text-related situations.

[0027] S103: Testing the target rule set based on the use cases in the test set.

[0028] In this embodiment, the use cases in the test set are used to test the effectiveness, rationality and applicability of the target rule set. The use cases in the test set cover various possible input situations and the corresponding expected outputs, which is equivalent to setting different "test questions" for the model, and the target rule set is like the "answer specification". Testing the rule set through use cases is to see whether the model can give the expected "answer" according to these "answer specifications".

[0029] In this embodiment, when the test starts, each test case in the test set is used to test the target rule set to obtain the optimal rule. The target rule set determined in the initial stage is not the most perfect and the most suitable for the actual situation. It contains all possible situations and has problems such as poor applicability in some special scenarios. The process of using all test cases to test is a process of constantly discovering problems and adjusting rules.

[0030] From the above, it can be concluded that the present disclosure can obtain the core features of the use cases in the test set through feature extraction technology, and match them with multiple feature data sets in the feature database, so as to quickly locate the target feature data set that matches the target feature. This process not only greatly improves the efficiency of the testing work, but also ensures the targeted nature of the test and avoids invalid or redundant test operations. At the same time, the present disclosure also makes full use of the resources in the rule base, automatically determines the corresponding target rule set according to the target feature data set, and then tests the use cases in the test set. This rule-based testing method not only makes the testing process more standardized and systematic, but also effectively improves the accuracy and reliability of the test.

[0031] In summary, the present disclosure achieves efficient and accurate testing of test cases through steps such as feature extraction, feature matching, and rule base application.

[0032] In one embodiment of the present disclosure, the rule base includes a plurality of target rule sets; The test methods also include: The arrangement order of each rule in the target rule set is determined according to the attributes and quantity of the target features in the target feature data set, and the arrangement order of the rules in the target rule set corresponding to different target feature data sets is different; A first threshold of a target rule set is determined according to the attributes and quantity of target features in the target feature data set; the first threshold is the number of rules.

[0033] In this embodiment, the attributes of the target feature represent various properties, characteristics or dimensions possessed by the target feature. Different types of target features may have different attributes. For example, for a text-type target feature, its attributes may include semantic attributes (positive, negative or neutral semantics), grammatical structure attributes (declarative sentences, interrogative sentences or exclamatory sentences, etc.), and vocabulary attributes (professional vocabulary or high-frequency vocabulary, etc.); for an image-type target feature, the attributes may be color attributes, geometric shape attributes, and spatial layout attributes.

[0034] The number of target features indicates the specific number of target features contained in the target feature dataset. It intuitively reflects the size of the dataset in terms of the number of features. For example, a target feature dataset contains 10 target features. The number of target features will be related to the relevant settings of the target rule set. For example, a large number of target features means that more complex and more rules are needed for comprehensive testing and specification. A small number of target features means that the rule settings are relatively simple.

[0035] In this embodiment, the feature information contained in different target feature data sets differs in type and subject. For example, in a software testing scenario, one target feature data set may be related to the user interface design of the software, such as button location, color matching, menu layout, etc., while another target feature data set may be related to the data processing function of the software, such as data input format, data calculation rules, data storage method, etc. These different types of features will lead to significant differences in the corresponding target rule sets.

[0036] Even if two target feature datasets both involve software functions, their feature attributes and quantities can be different. For example, for the file transfer function of the software, one target feature dataset mainly focuses on a small number of features related to the transfer speed, such as the average transfer speed, the transfer speed fluctuation range, etc.; the other also contains more features related to transfer security, such as encryption method, authentication method, etc. This difference will affect the focus and complexity of the rules.

[0037] The order of rules in the target rule set corresponding to different target feature data sets is different. For example, in the rules corresponding to the target feature data set of the text type, the priority of the rule for converting the tone of the text content is higher than the priority of image recognition of the text.

[0038] The first threshold is a limit value for the number of rules in the target rule set, determined based on the attributes and quantity of the target features in the target feature data set. It is used to define how many rules the target rule set should contain to be more reasonable and appropriate, so that it can fully cover the test requirements of the corresponding test cases based on their characteristics, and will not make the test too cumbersome due to too many rules or incomplete due to too few rules. For example, by analyzing factors such as the attribute complexity and quantity of the target features, it is determined that the first threshold of the target rule set corresponding to a specific target feature data set is 15 rules. When constructing or adjusting this target rule set, this quantity limit will be used as a reference for operations.

[0039] In this embodiment, the first threshold is determined according to the number of features of the target feature data set: when the number of features of the target feature data set increases, the first threshold is determined according to the first ratio according to the increase in the number of features; When the feature attribute of the target feature data set increases, the first threshold is determined according to the second ratio based on the complexity of the target feature.

[0040] For example, in the test of an image recognition system, the original target feature data set only contains the color and shape features of the image, and the first threshold is 10 rules. Later, texture and spatial relationship features were added. At this time, the first threshold can be determined according to the complexity and importance of the newly added features, at a certain ratio (such as adding 1 rule for every 3-5 new features). For example, for the test of a financial transaction system, the target feature data set contains features such as transaction amount and transaction time. If the attributes of the transaction amount change from only considering the integer amount to considering the decimal amount and exchange rate conversion, this increases the complexity of the features, and rules need to be added to handle these new attribute situations.

[0041] It can be concluded from the above that this embodiment can more flexibly adapt to different test requirements and improve the pertinence and efficiency of the test by determining the arrangement order and the first threshold of the rules in the target rule set according to the attributes and quantity of the target features in the target feature data set. At the same time, this method of dynamically adjusting the order and quantity of rules also enhances the accuracy and reliability of the test.

[0042] In one embodiment of the present disclosure, the testing method further includes: The first threshold is updated based on the number of calls of each rule in the target rule set within the first historical time period.

[0043] In this embodiment, the first historical duration is a specific time interval for counting and analyzing the calling of rules in the target rule set. This time range can be the past 1 minute, 1 hour, 3 hours, etc. In this time interval, the device will record the number of times each rule in the target rule set is called. By statistically analyzing the rule calling situation during this period, the frequency of use of each rule in actual operation can be understood.

[0044] The number of rule calls intuitively shows the degree of participation of the rule in the actual test process. If a rule is frequently called within the first historical period, it means that the rule often plays a role in the current business scenario. The number of rule calls can also help find possible problems with the rule. If a rule is rarely called, there are two situations: one is that the situation targeted by the rule rarely occurs, and the other is that the rule itself may be unreasonable, resulting in it not being effectively triggered.

[0045] The first threshold is the limit of the number of rules in the target rule set. Updating this threshold based on the number of rule calls in the first historical period is a way to dynamically adjust the size of the rule set. If the number of calls to certain rules continues to increase, it means that the business scenario has become more complex and more rules are needed to fully cover various situations. Therefore, it is necessary to increase the first threshold and increase the number of rules in the rule set. Conversely, if the number of rule calls generally decreases, it indicates that some existing rules are redundant or the business scenario is simplified, and the first threshold needs to be lowered to reduce the number of rules.

[0046] It can be concluded from the above that this embodiment can make the target rule set better adapt to the actual test requirements through this update mechanism. A reasonable number of rules can avoid the waste of test resources, such as avoiding excessive testing of rarely used rules, while also ensuring that important rules receive sufficient attention and testing, thereby improving the efficiency and accuracy of the test.

[0047] In one embodiment of the present disclosure, the test case in the test set includes original text and converted text, and the converted text is the text after feature matching and conversion of the original text; Test the target rule set based on the use cases in the test set, including: The original text is input into the target rule set to obtain a first test text, and the rules in the target rule set are updated based on the first test text and the converted text.

[0048] In this embodiment, inputting the original text into the target rule set is equivalent to processing the original text accordingly according to these rules, and the result obtained is the first test text. For example, there are rules about sensitive word filtering, language standardization, etc. When the original text "I am in a very good mood today, and I went to that XX place for a stroll" is input, after processing the sensitive word "XX" according to the rule set (such as replacement, reminder, etc.), the first test text obtained can be "I am in a very good mood today, and I went to that [sensitive word has been processed] place for a stroll." This process is to conduct the initial test and processing of the original text according to the established rules to check whether it meets the requirements of the rules and what kind of output results will be produced.

[0049] After obtaining the first test text, it is compared and analyzed together with the converted text, with the aim of discovering possible problems with the target rule set and then updating and optimizing the rules.

[0050] Because the converted text is feature matched and converted, in theory it reflects a more expected and accurate way of processing the original text to a certain extent. If there are differences between the first test text and the converted text, for example, when processing a certain semantic structure, the first test text does not accurately identify key features and perform appropriate conversions as well as the converted text, it means that the rules related to it in the target rule set are not perfect or have loopholes and need to be adjusted.

[0051] It can be concluded from the above that this embodiment achieves accurate testing of the target rule set by inputting the original text into the target rule set and comparing the converted text. This process can not only effectively verify the accuracy and reliability of the target rule set, but also timely update and optimize the rules based on the comparison results, thereby ensuring that the rule set can continue to adapt to the changing test requirements and improve the flexibility and effectiveness of the test.

[0052] In one embodiment of the present disclosure, updating the rules in the target rule set based on the first test text and the converted text includes: Calculating the similarity between the first test text and the converted text to obtain a first similarity, and calculating the time it takes for the original text to be converted into the first test text to obtain a first time; If the first similarity is less than a preset threshold, and the first time is less than a preset time, updating the rules in the target rule set according to the difference features between the first test text and the converted text; If the first similarity is less than a preset threshold and the first time is greater than a preset time, the rules in the target rule set are deleted; If the first similarity is greater than or equal to the preset threshold, the rules in the target rule set are kept unchanged.

[0053] In this embodiment, by calculating the similarity, it is possible to evaluate whether the conversion effect of the target rule set on the original text is close to the expected converted text. By calculating the conversion time, it is possible to evaluate the conversion efficiency of the target rule set.

[0054] The similarity between the first test text and the converted text in terms of semantics, content structure, key information, etc. is measured through specific similarity calculation methods (such as cosine similarity, edit distance, and other algorithms suitable for text comparison). The similarity directly reflects the fit between the result obtained by the target rule set after processing the original text and the ideal result after feature matching and conversion. For example, if the two texts are highly similar in terms of key sentences, important vocabulary, etc., then the first similarity value will be higher; conversely, if the text content is very different, the similarity value will be lower.

[0055] The time taken to record the time from inputting the original text into the target rule set to generating the first test text. This time indicator reflects the efficiency of the target rule set during actual operation.

[0056] If the first similarity does not meet the preset standard (i.e., less than the preset threshold), it means that the result obtained by the target rule set after processing the original text is significantly different from the ideal result after feature matching and conversion, and the rule set has problems in grasping text features and processing logic; and if the first time is less than the preset time, it means that the processing method of the rule set is relatively simple. In this case, we can carefully analyze the specific differences between the first test text and the converted text, such as whether some key information is omitted, there is a deviation in the understanding of semantics, or the text structure is improperly adjusted, and then modify and improve the corresponding rules in the target rule set in a targeted manner, so that the rule set can subsequently process similar original texts more accurately and narrow the gap with the ideal result (converted text).

[0057] If the first similarity does not meet the preset standard, and the first time exceeds the preset time, it means that the rule set not only has problems in accuracy, but also performs poorly in efficiency. This is because there are too many complex, redundant or unnecessary rules in the rule set, which leads to too long time and poor results when processing text. You can take the action of deleting rules to simplify the target rule set and remove those rules that may not contribute much to the accuracy of the results but slow down the processing speed. It is expected that by reducing the number of rules, the overall operating efficiency of the rule set can be improved. At the same time, it is also possible to indirectly improve the accuracy of the processing results, so that it can focus more on core and effective rules to process the original text.

[0058] If the first similarity reaches or exceeds the preset threshold, it means that the processing result of the target rule set on the original text is closer to the ideal result after feature matching and conversion, indicating that the current rule set performs well in terms of accuracy and can better meet the expected text processing requirements.

[0059] From the above, it can be concluded that this embodiment intelligently updates the target rule set by comprehensively considering the similarity and time efficiency of text conversion. When the conversion effect does not meet the standard but the efficiency is high, the rules are updated in a targeted manner to improve the quality; when both the effect and time do not meet the standard, redundant rules are deleted to improve efficiency; when the conversion effect meets the standard, the rules are kept stable. This dynamic adjustment strategy ensures the efficiency and accuracy of the rule set, and improves the test efficiency and system performance.

[0060] In one embodiment of the present disclosure, the test case in the test set includes original text and fused text, and the fused text is the text after feature matching, conversion and fusion of semantic information of the original text; Test the target rule set based on the use cases in the test set, including: The original text is input into the target rule set to obtain a second test text, and the rules in the target rule set are updated based on the second test text and the fused text.

[0061] In this embodiment, the original text is the most original information content, which represents various possible text input situations in actual application scenarios. The fused text is the result obtained after multiple steps of processing based on the original text. First, feature matching is performed, that is, identifying key elements with specific attributes in the original text; then conversion is performed, changing the form of text presentation according to certain rules, etc.; finally, semantic information is fused, and additional semantic knowledge or related semantic content is incorporated into it, making the text richer and more complete at the semantic level. For example, for the original text "The puppy is playing on the grass", after these processes, the fused text may become "The lively and cute puppy is playing happily on the green grass, surrounded by colorful flowers", which to a certain extent reflects a more complete and more expected text state.

[0062] Inputting the original text into the target rule set is a process of processing the original text accordingly according to the rules set in the rule set. The obtained second test text reflects the output result after the target rule set acts on the original text.

[0063] By comparing the second test text and the fused text, the performance of the target rule set is evaluated and then a decision is made as to whether to update and optimize it. The fused text is a relatively ideal reference result. If there are differences between the second test text and the fused text, such as differences in semantic richness, expression accuracy, style fit, etc., it means that there are imperfections in the rules of the target rule set, and the rules need to be adjusted according to these differences, so that the rule set can better process similar original texts, improve the fit between the processing results and the fused text, and continuously optimize the rule set to meet the diverse test case requirements.

[0064] From the above, it can be concluded that this embodiment constructs a mechanism to dynamically adjust the target rule set by comparing the actual results after the rule set processes the original text and the ideal reference results after specific optimization processing. The purpose is to use the fused text as a reference to find the problems existing in the target rule set in the process of processing the original text, and then through reasonable updating of the rules, continuously improve the processing ability and accuracy of the rule set for different original texts, and ensure the scientific nature of the entire testing process and the adaptability of the rule set to the actual application scenario.

[0065] Corresponding to the test method of the above embodiment, Figure 2 This is a structural block diagram of a test device provided by an embodiment of the present disclosure. For ease of description, only the parts related to the embodiment of the present disclosure are shown. Figure 2 The testing device 20 includes: a feature extraction module 21, a first matching module 22 and a testing module 23.

[0066] The feature extraction module 21 is used to extract features from the test case in the test set to obtain target features, and determine a target feature data set corresponding to the target feature based on the matching result between the target feature and the features in the feature database; the feature database includes multiple feature data sets; A first matching module 22, used to determine a target rule set corresponding to a target feature data set in a rule base; The testing module 23 is used to test the target rule set based on the use cases in the test set.

[0067] In one embodiment of the present disclosure, the rule base includes a plurality of target rule sets; the testing device 20 further includes: a sequence arrangement module; The sequence arrangement module is used to: determine the arrangement order of each rule in the target rule set according to the attributes and quantity of the target features in the target feature data set, and the rule arrangement order in the target rule set corresponding to different target feature data sets is different; A first threshold of a target rule set is determined according to the attributes and quantity of target features in the target feature data set; the first threshold is the number of rules.

[0068] In one embodiment of the present disclosure, the testing module 23 is further used to: The first threshold is updated based on the number of calls of each rule in the target rule set within the first historical time period.

[0069] In one embodiment of the present disclosure, the test case in the test set includes original text and converted text, and the converted text is the text after feature matching and conversion of the original text; The test module 23 is specifically used for: The original text is input into the target rule set to obtain a first test text, and the rules in the target rule set are updated based on the first test text and the converted text.

[0070] In one embodiment of the present disclosure, the testing module 23 is specifically used for: Calculating the similarity between the first test text and the converted text to obtain a first similarity, and calculating the time it takes for the original text to be converted into the first test text to obtain a first time; The rules in the target rule set are updated based on the first similarity and the first time.

[0071] In one embodiment of the present disclosure, the testing module 23 is specifically used for: If the first similarity is less than a preset threshold, and the first time is less than a preset time, updating the rules in the target rule set according to the difference features between the first test text and the converted text; If the first similarity is less than a preset threshold and the first time is greater than a preset time, the rules in the target rule set are deleted; If the first similarity is greater than or equal to the preset threshold, the rules in the target rule set are kept unchanged.

[0072] In one embodiment of the present disclosure, the test case in the test set includes original text and fused text, and the fused text is the text after feature matching, conversion and fusion of semantic information of the original text; The test module 23 is specifically used for: The original text is input into the target rule set to obtain a second test text, and the rules in the target rule set are updated based on the second test text and the fused text.

[0073] See also Figure 3 , Figure 3 A schematic block diagram of a wearable device provided by an embodiment of the present disclosure. Figure 3The wearable device 300 in the embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303 and one or more memories 304. The processors 301, input devices 302, output devices 303 and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to execute the functions of each module in the above-mentioned device embodiments, such as Figure 2 The functions of modules 21 to 23 are shown.

[0074] It should be understood that in the embodiment of the present disclosure, the processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0075] The input device 302 may include a touch panel, a fingerprint collection sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc., and the output device 303 may include a display (LCD, etc.), a speaker, etc.

[0076] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.

[0077] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiments of the present disclosure can execute the implementation methods described in the first and second embodiments of the test method provided in the embodiments of the present disclosure, and can also execute the implementation methods of the wearable device described in the embodiments of the present disclosure, which will not be repeated here.

[0078] In another embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by the processor, all or part of the processes in the above-mentioned embodiment method are implemented, and the computer program can also be completed by instructing the relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0079] The computer-readable storage medium may be an internal storage unit of the wearable device of any of the foregoing embodiments, such as a hard disk or memory of the wearable device. The computer-readable storage medium may also be an external storage device of the wearable device, such as a plug-in hard disk equipped on the wearable device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the wearable device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the wearable device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0080] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0081] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the wearable device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0082] In the several embodiments provided in the present application, it should be understood that the disclosed wearable devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or it can be an electrical, mechanical or other form of connection.

[0083] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure.

[0084] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0085] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A testing method, characterized in that: include: Extracting features from the test cases in the test set to obtain target features, and determining a target feature data set corresponding to the target features based on a matching result between the target features and features in a feature database; The feature database includes a plurality of feature data sets; Determine a target rule set corresponding to the target feature data set in the rule base; The target rule set is tested based on the use cases in the test set.

2. The testing method according to claim 1, characterized in that: The rule base includes a plurality of target rule sets; The test method also includes: The arrangement order of each rule in the target rule set is determined according to the attributes and quantity of the target features in the target feature data set, and the arrangement order of the rules in the target rule set corresponding to different target feature data sets is different; A first threshold of the target rule set is determined according to the attributes and quantity of the target features in the target feature data set; the first threshold is the number of rules.

3. The testing method according to claim 2, characterized in that: Also includes: The first threshold is updated based on the number of calls of each rule in the target rule set within the first historical time period.

4. The testing method according to claim 1, characterized in that: The test cases in the test set include original text and converted text, wherein the converted text is text after feature matching and conversion of the original text; The testing of the target rule set based on the use cases in the test set includes: The original text is input into the target rule set to obtain a first test text, and the rules in the target rule set are updated based on the first test text and the converted text.

5. The testing method according to claim 4, characterized in that: The updating of the rules in the target rule set based on the first test text and the converted text includes: Calculating the similarity between the first test text and the converted text to obtain a first similarity, and calculating the time it takes for the original text to be converted into the first test text to obtain a first time; The rules in the target rule set are updated based on the first similarity and the first time.

6. The testing method according to claim 5, characterized in that: The updating of the rules in the target rule set based on the first similarity and the first time includes: If the first similarity is less than a preset threshold, and the first time is less than a preset time, updating the rules in the target rule set according to the difference features between the first test text and the converted text; If the first similarity is less than a preset threshold and the first time is greater than a preset time, the rules in the target rule set are deleted; If the first similarity is greater than or equal to a preset threshold, the rules in the target rule set are kept unchanged.

7. The testing method according to claim 1, characterized in that: The test cases in the test set include original text and fused text, wherein the fused text is the text after feature matching, conversion and fusion of semantic information of the original text; The testing of the target rule set based on the use cases in the test set includes: The original text is input into the target rule set to obtain a second test text, and the rules in the target rule set are updated based on the second test text and the fused text.

8. A testing device, characterized in that: include: A feature extraction module is used to extract features from the test cases in the test set to obtain target features, and determine a target feature data set corresponding to the target features based on the matching results between the target features and the features in the feature database; The feature database includes a plurality of feature data sets; A first matching module, used to determine a target rule set corresponding to the target feature data set in a rule base; A testing module is used to test the target rule set based on the use cases in the test set.

9. A wearable device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.