Broadcasting test method and device, wearable equipment and storage medium
By building a report test model and adjusting the model according to the test results, the problem of insufficient comprehensive and accurate broadcast test in the existing technology is solved, and higher test accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202510322862.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-03-19
AI Technical Summary
The existing technology lacks effective evaluation of broadcast quality in broadcast testing, resulting in insufficient comprehensive and accurate testing.
By building a broadcast test model, enter multiple test information to determine the target broadcast information, and adjust the model to improve the accuracy and reliability of the broadcast test according to the type and number of error information.
Data-driven testing is realized, which enhances the comprehensiveness and systematicity of the test, can promptly detect and correct model errors, improve the accuracy and reliability of the model, and ensure the stability and consistency of the broadcast test.
Smart Images

Figure CN119851696A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the field of data testing, and more specifically, relates to a broadcast testing method and device, a wearable device, and a storage medium. Background Art
[0002] With the rapid development of information technology, voice broadcast systems have been widely used in many fields. In the smart home environment, devices such as smart speakers can broadcast news information, weather conditions, reminders, etc., providing users with an intelligent home interactive experience; in mobile Internet applications, various reading software and learning software have also introduced voice broadcast functions, allowing users to obtain information even when they cannot read the screen content, such as assisted reading applications for the blind.
[0003] In order to ensure the quality and reliability of voice broadcast, testing is essential. Traditional testing methods mainly focus on functional testing, that is, checking whether the system can normally start voice broadcast, whether it can accurately recognize input text information and other basic functions. This testing method can find some obvious defects to a certain extent, but it is insufficient for testing the broadcast quality.
[0004] Therefore, an accurate and reliable broadcast testing method is urgently needed. Summary of the invention
[0005] The purpose of the present disclosure is to provide a broadcast test method and apparatus, a wearable device, and a storage medium to improve the accuracy and reliability of the broadcast test.
[0006] A first aspect of an embodiment of the present disclosure provides a broadcast test method, including: Build a broadcast test model; Inputting a plurality of test information into a broadcast test model to determine a plurality of target broadcast information, wherein the plurality of test information is information in a test set, and the test set includes the plurality of test information and broadcast information corresponding to each of the test information; In response to the number of error messages in the multiple target broadcast information being greater than a first preset value, and the type of the error messages being a form error, adjusting the broadcast test model based on a first method; and executing the step of inputting the multiple test information into the broadcast test model and determining the multiple target broadcast information until the number of error messages in the multiple target broadcast information is less than or equal to the first preset value; In response to the number of error messages in the multiple target broadcast information being greater than a first preset value, and the type of the error messages being semantic errors, adjusting the broadcast test model based on a second method; and executing the step of inputting the multiple test information into the broadcast test model and determining the multiple target broadcast information until the number of error messages in the multiple target broadcast information is less than or equal to the first preset value; The first method and the second method have different processing methods.
[0007] A second aspect of the embodiments of the present disclosure provides a broadcast test device, including: Model building module, used to build a broadcast test model; A model testing module, used for inputting a plurality of test information into a broadcast test model, and determining a plurality of target broadcast information, wherein the plurality of test information is information in a test set, and the test set includes the plurality of test information and broadcast information corresponding to each of the test information; A model adjustment module, configured to adjust the broadcast test model based on a first method in response to the number of error information in the multiple target broadcast information being greater than a first preset value and the type of the error information being a form error; and to execute the step of inputting the multiple test information into the broadcast test model and determining the multiple target broadcast information until the number of error information in the multiple target broadcast information is less than or equal to the first preset value; In response to the number of error messages in the multiple target broadcast information being greater than a first preset value, and the type of the error messages being semantic errors, adjusting the broadcast test model based on a second method; and executing the step of inputting the multiple test information into the broadcast test model and determining the multiple target broadcast information until the number of error messages in the multiple target broadcast information is less than or equal to the first preset value; The first method and the second method have different processing methods.
[0008] According to a third aspect of an embodiment of the present disclosure, a wearable device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the steps of the above-mentioned broadcast test method when executing the computer program.
[0009] According to a fourth aspect of the embodiments 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 broadcast test method are implemented.
[0010] The beneficial effects of the broadcast test method and device, wearable device, and storage medium provided by the embodiments of the present disclosure are: The present disclosure implements data-driven testing by inputting multiple test information into the model and determining the corresponding target broadcast information, making the test more comprehensive and systematic. The test set contains multiple test information and corresponding broadcast information, and can cover more test scenarios. In the present disclosure, when there are errors in the broadcast information generated by the model, they can be discovered and corrected in a timely manner, which is conducive to the continuous optimization and improvement of the model and improves the accuracy and reliability of the model. The present disclosure ensures the stability and consistency of the model by repeatedly executing the steps of inputting test information into the model and checking the target broadcast information until there is no error information. The iterative testing process helps to gradually eliminate potential problems in the model, improve the broadcast quality of the model, and enhance the accuracy and reliability of the broadcast test. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] 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.
[0012] Figure 1 A flowchart of a broadcast test method provided by an embodiment of the present disclosure; Figure 2 A structural block diagram of a broadcast test device provided in an 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
[0013] 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.
[0014] 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.
[0015] Please refer to Figure 1 , Figure 1 A flowchart of a broadcast test method provided in an embodiment of the present disclosure, the method comprising: S101: Construct a broadcast test model.
[0016] In this embodiment, the process of constructing the broadcast test model may include: Determine the model's infrastructure; Build language processing modules; Build a speech output module; The broadcast test model is determined based on the basic architecture, language processing module and speech output module.
[0017] In this embodiment, the goal of the broadcast test is to test and adjust a model that broadcasts the received content in accordance with the actual tone. The basic architecture of the broadcast test model can be based on the Transformer architecture, or it can be a recurrent neural network and its variants, etc. The language processing module can be based on a combination of a multi-head attention mechanism and a feedforward neural network. The feedforward neural network performs further nonlinear transformation on the features processed by the attention mechanism, enhancing the model's ability to express complex semantics, so that it can learn deeper language structures and semantic relationships, such as understanding the modification relationship in the sentence, the subject-verb-object structure, and other language features that affect the broadcast content.
[0018] The multi-head attention mechanism can capture the relationship between words in the text from multiple perspectives in parallel and extract semantic features. For example, when processing the sentence "Today's weather is suitable for going out for fun", different heads may focus on different aspects of semantic information, such as the correlation between "weather" and "fun", the overall sentiment tendency of the sentence, etc.
[0019] The multi-head attention mechanism can also process the impact of multiple influencing factors on the broadcast information in parallel. Each attention mechanism in the multi-head attention mechanism focuses on the relevance of different influencing factors to the broadcast information and finally outputs a broadcast information.
[0020] The voice output module can convert the received text information or processed voice-related data into sound signals and play them out through the corresponding sound-generating device, thereby achieving the effect of voice output and completing the "speaking" link in the entire voice interaction process. The voice output module can broadcast according to the broadcast information output by the voice processing module. The voice output module can convert text into corresponding voice waveform data through pre-set voice synthesis rules or based on a trained voice synthesis model.
[0021] S102: Input multiple test information into a broadcast test model to determine multiple target broadcast information, where the multiple test information is information in a test set, and the test set includes multiple test information and broadcast information corresponding to each test information.
[0022] In this embodiment, the test information is a set of input text content specially prepared for testing the broadcast test model, which is carefully selected and organized to cover various possible text situations, language expressions, and application scenarios, so as to comprehensively examine the broadcast capability of the model. The test information may include text information, image information, website information, compressed package information, and other types of information.
[0023] The test set is a collection consisting of a large amount of test information and the corresponding correct broadcast information. It is the basis of the entire test process. By comparing the target broadcast information output by the model with the correct broadcast information pre-set in the test set, it can be determined whether the model has errors and what adjustments need to be made.
[0024] For example, the test set can be presented in the form of a table, as shown in Table 1: Table 1 Test set
[0025] It should be noted that the content in brackets in the table does not belong to the broadcast content, but is a limitation on the tone of the broadcast. That is, the broadcast information in the test set not only includes the text of the broadcast, but also the corresponding tone. The broadcast information in the test set can be in the form of a voice. For better display and understanding, it is reflected in Table 1 in the form of text.
[0026] Similarly, the "picture type" in the test information is not the text "picture type", but the test information is a picture. In this case, the corresponding broadcast information output is "the other party sent a picture". That is, the text in double quotes in Table 1 is the actual input text and the actual output text.
[0027] The target broadcast information refers to the broadcast information output after the test information is input into the broadcast test model.
[0028] S103: In response to the number of error messages in the multiple target broadcast information being greater than a first preset value, and the type of the error messages being a form error, adjusting the broadcast test model based on a first method; and executing the step of inputting the multiple test information into the broadcast test model and determining the multiple target broadcast information until the number of error messages in the multiple target broadcast information is less than or equal to the first preset value; In response to the number of error messages in the multiple target broadcast information being greater than a first preset value, and the type of the error messages being semantic errors, adjusting the broadcast test model based on a second method; and executing the step of inputting the multiple test information into the broadcast test model and determining the multiple target broadcast information until the number of error messages in the multiple target broadcast information is less than or equal to the first preset value; The first method and the second method have different processing methods.
[0029] In this embodiment, error information refers to the content corresponding to the non-compliance and inconsistency between the target broadcast information and the corresponding correct broadcast information in the test set. There may be various types of error information, such as semantic understanding errors leading to content deviation, the tone of the broadcast not meeting expectations, and quality problems such as noise in speech synthesis. The first preset value may be a value related to the ratio of the number of target broadcast information. For example, the first preset value may be a preset ratio of the number of target broadcast information. Specifically, the preset ratio may be 0.5%. The preset ratio may be set according to the usage scenario or the tester's preference.
[0030] Whether there is erroneous information in the multiple target broadcast information can be calculated by calculating the matching degree between the target broadcast information and the corresponding correct broadcast information in the test set.
[0031] In this embodiment, in response to the similarity between the target broadcast information and the broadcast information in the test set being less than or equal to a first similarity threshold, the target broadcast information is defined as error information.
[0032] The similarity can be calculated by respectively extracting Mel frequency cepstral coefficients of the target broadcast information and the broadcast information and calculating the cosine similarity. The first similarity threshold can be determined through experiments.
[0033] For example, the correct broadcast information corresponding to "tomorrow is a holiday" in the test set is broadcast in a cheerful tone, while the target broadcast information output by the model is broadcast "tomorrow is a holiday" in a flat, emotionless tone. The semantic requirement here is an error message; or the model outputs "I want to go to the supermarket to buy apples and bananas" as "I want to go to the store to buy apples and bananas", which is an error message with missing words. Or the model outputs "www.xxxxxx.com" as "w, w, w, dot, xxxxx", that is, broadcasting the URL links in order, which is a formal error.
[0034] In this embodiment, the model may be adjusted according to different error types, and the broadcast test model may be adjusted by adjusting the broadcast feature library or activation function of the broadcast test model.
[0035] In this embodiment, the first method may be to process and express the error message based on regular expressions, and the second method may be to adjust the broadcast feature library according to the semantic features in the error message. This is because the essential differences in the types of error messages are taken into account. For example, formal errors mainly involve information that does not meet the requirements in terms of presentation, such as format errors, character errors, punctuation errors, etc., which have certain regularity and patterns. Regular expressions have powerful pattern matching and text processing capabilities, and can effectively identify and process such errors with obvious pattern characteristics. Therefore, by processing the error message based on regular expressions, formal errors can be found, corrected and standardized in a targeted manner, thereby adjusting the broadcast feature library to improve the accuracy of the broadcast test model in terms of form.
[0036] Semantic errors refer to deviations in the understanding of the meaning and content of information. The problem lies in the understanding and expression of the semantics of the information. Unlike formal errors, they do not have obvious external patterns, but require in-depth analysis of the connotation of the information. Therefore, it is necessary to determine the semantic features in the error information, such as analyzing the semantic relationship of words in the error information, the logical structure of sentences, etc., and adjust the broadcast feature library from the semantic level to improve the understanding and processing capabilities of the broadcast test model for semantics.
[0037] From the above, it can be concluded that the present disclosure implements data-driven testing by inputting multiple test information into the model and determining the corresponding target broadcast information, making the test more comprehensive and systematic. The test set contains multiple test information and corresponding broadcast information, which can cover more test scenarios. In the present disclosure, when there are errors in the broadcast information generated by the model, they can be discovered and corrected in a timely manner, which is conducive to the continuous optimization and improvement of the model and improves the accuracy and reliability of the model. The present disclosure ensures the stability and consistency of the model by repeatedly executing the steps of inputting test information into the model and checking the target broadcast information until there is no error information. The iterative testing process helps to gradually eliminate potential problems in the model, improve the broadcast quality of the model, and improve the accuracy and reliability of the broadcast test.
[0038] In one embodiment of the present disclosure, the broadcast test model includes a broadcast feature library; Adjust the broadcast test model based on the first method, including: Process the error information based on regular expressions, and adjust the broadcast feature library based on the processed error information; Adjusting the broadcast test model based on the second method includes: Determine the semantic features in the error message and adjust the report feature library based on the semantic features.
[0039] In this embodiment, the broadcast feature library is a collection of various feature information related to the broadcast in the broadcast test model. These feature information can cover multiple aspects, such as the broadcast tone rules corresponding to different language expressions, the appropriate speech speed and volume settings in different scenarios, the semantic understanding points associated with various vocabulary or sentence structures, etc. They provide a basis and reference for the model to generate accurate and reasonable broadcast content, and help the model make appropriate broadcast decisions when facing different input information.
[0040] Alternatively, it is a library that stores various types of information and their corresponding broadcast formats.
[0041] In this embodiment, the error information can be input into the first neural network model to obtain the error type of the error information. The first neural network model is obtained through a data set consisting of a certain number of error information and its corresponding error type. The certain number refers to a number sufficient for training and testing the first neural network model, which can be determined based on experience or the number of data in the data set when solving related problems in this field.
[0042] For example, when the test information is a URL, the corresponding broadcast format should be "the other party sent a URL", or when the test information is a compressed package, the corresponding broadcast format should be "the other party sent a compressed package".
[0043] The error type may be a text error or a non-text error, for example, an error in the expression of an emoticon.
[0044] For example, the emoticon [smile] means smile, friendly, etc., but incorrectly expressed as sad, heartbroken, etc.
[0045] Regular expressions describe the features of text by defining specific pattern rules. To process error messages based on regular expressions is to use a pre-set regular expression pattern that meets the requirements for correcting the corresponding error form to identify the text part of the error message that meets the pattern, and then replace and correct it according to the rules to make it correct and standardized so that it can be better processed by the model and used to adjust the report feature library.
[0046] For example, if the punctuation is used improperly, such as multiple consecutive commas in a sentence (such as "Today, I went to the park to play"), you can use the regular expression: / ,{2,} / to match two or more consecutive commas, and then replace them with a single comma to make the sentence punctuation more standardized, turning it into "Today, I went to the park to play."
[0047] Or express the website URL and the compressed package through regular expressions. For example, the basic website URL format is protocol: / / domain name / path. Specifically, https: / / www.example.com / path / to / page.html. A simple regular expression to match such a website URL can be: ^(https?: / / )?([a-zA-Z0-9.-]+)(:\d+)?( / [a-zA-Z0-9_. / ?%&=]*)?$.
[0048] ^(https?: / / )? : ^ means to match the start of the string, https? means http or https, : / / is the fixed part after the protocol, and? means that the previous https: / / is optional because some website URLs may not write the protocol part and the browser will default to using http or https.
[0049] ([a-zA-Z0-9.-]+) : This is a capture group used to match the domain name part. It can contain letters, numbers, dots, and hyphens, and + means it appears at least once. For example, www.example.com.
[0050] (:\d+)? : This part is optional and is used to match the port number. : is the prefix of the port number, and \d+ means to match one or more digits. For example, :8080.
[0051] ( / [a-zA-Z0-9_. / ?%&=]*)?$ : / is the start part of the path, [a-zA-Z0-9_. / ?%&=]* means the path can contain letters, numbers, underscores, dots, slashes, question marks, percent signs, ampersands, and equal signs, * means it can appear zero or more times, and $ means to match the end of the string.
[0052] The error-prone expression forms of the model can be expressed through similar regular expressions respectively, and the expressed expressions and the corresponding correct expression forms are stored in the broadcast feature library.
[0053] When the error type is a semantic error, the semantic features in the error message can be extracted and the corresponding correct semantics are stored in the broadcast feature library.
[0054] Semantic features can refer to the keywords representing semantics in the text. For example, for a sentence: "Have you eaten today?" The semantic features in this sentence can be "ma" and "?", that is, the features representing tone and semantics. If the output of the broadcast test model is the very plain "Have you eaten today.", it belongs to a semantic expression error. At this time, "ma", "?", and the expressions representing interrogation and rising tone can be added to the broadcast feature library.
[0055] From the above, it can be concluded that this embodiment can handle different types of broadcast errors in a more targeted manner by distinguishing between formal errors and semantic errors. Formal errors mainly focus on the surface features of the text, such as punctuation, format, etc., while semantic errors go deep into the meaning level of the text, such as tone, contextual understanding, etc., which improves the efficiency and accuracy of the model in handling errors. The present disclosure uses regular expressions to identify and correct error messages, and has a high degree of flexibility, and can customize corresponding regular expression patterns according to different error types. Through adjustments based on error information, the broadcast feature library of the present disclosure can continuously absorb new feature information, including correct broadcast forms, semantic features, etc., thereby continuously improving the broadcast capability and adaptability of the model, and improving the accuracy and reliability of the broadcast test.
[0056] In one embodiment of the present disclosure, determining semantic features in error information and adjusting a report feature library based on the semantic features includes: In response to the semantic error being an error in the semantic expression of the text, extracting semantic features of the text, and adding the semantic features to a broadcast feature library; In response to the semantic error being a non-text semantic expression error, initial semantics and correct semantics of the non-text are acquired, and the initial semantics and correct semantics are added to the announcement feature library.
[0057] In this embodiment, a text semantic expression error may be a mismatch in tone. For example, in the sentence “I am particularly happy today!”, there are “especially”, “happy” and “!”, which indicate a strong tone and express excitement, while the output of the broadcast test model is a bland or even sad “I am particularly happy today.” In this case, it is determined to be a semantic expression error.
[0058] Errors in text semantic expression refer to problems in the meaning conveyed by the text itself. This is mainly due to factors such as the text's word choice, grammatical structure, and logical relationships, which cause the semantics expressed to not conform to normal language expression rules or to be inconsistent with the intended meaning.
[0059] Semantic features in test information can be extracted based on word vector methods. Semantic features are not limited to text, but can also be vector expressions corresponding to text that represents semantics. The same or similar semantics can be stored as the same vector in the report feature library. When the same or similar semantic features appear again in the test information, the correct semantics in the report feature library can be directly called for reporting.
[0060] When the semantic error is a non-text semantic expression error, the initial semantics and correct semantics of the non-text can be extracted. Taking emoticons as an example, the initial semantics of an emoticon package refers to the meaning defined by the designer when designing the emoticon package. For example, the emoticon package [smile] means [smile], but due to the public's understanding and certain characteristics of the emoticon package, when the public uses the emoticon package, the meaning may be [I surrender] or [Speechless], which is far from the initial meaning of the emoticon package. At this time, the correct meaning of the emoticon package is different from the initial meaning.
[0061] In this embodiment, it is also possible to: in response to the semantic error being a non-text semantic expression error, obtain the initial semantics and correct semantics of the non-text, and obtain the semantic features of the previous and next texts of the non-text, and add the initial semantics, correct semantics and semantic features to the broadcast feature library.
[0062] When the correct meaning of an emoticon package is different from the initial meaning, it can be judged based on the semantics of the text before and after the emoticon package. For example, "I had a lot of fun today, thank you [smile]" and "You went too far today [smile]". The [smile] in the two messages means "thank you" and "speechless" respectively. The meaning of the emoticon package in the first sentence is the same as the initial meaning, while the meaning of the emoticon package in the second sentence is different from the initial meaning. The semantic features in the first sentence can be "very", "happy" and "thank you", and the semantic features in the second sentence can be "excessive". "Excessive" and "speechless" can be stored in the broadcast feature library. It should be noted that "excessive" is the semantic feature in the sentence, "speechless" is the meaning of the emoticon package, and the storage form of "excessive" in the broadcast feature library can be vector or text.
[0063] When the word "excessive" appears again in the sentence, the report test model can directly express the [smile] emoticon package as "speechless" based on the information stored in the report feature library. In the continuous training and extraction process, more semantic features and their corresponding expression meanings can be stored in the report feature library.
[0064] From the above, it can be concluded that the present disclosure can enhance the model's ability to understand text semantics by extracting semantic features from text and adding them to the broadcast feature library, which helps the model to more accurately capture key information such as emotions and tone in the text, thereby improving the accuracy and naturalness of the broadcast. The present disclosure obtains the initial semantics and correct semantics of non-text and associates them with the semantic features of the previous and next texts, thereby improving the model's ability to understand and recognize non-text information, helping the model to make more appropriate broadcast decisions in a complex and changing communication environment, and improving the accuracy and reliability of the broadcast test.
[0065] In one embodiment of the present disclosure, a plurality of test information is input into a broadcast test model to determine a plurality of target broadcast information, including: Multiple test information are input into the language processing module, and the multiple test information are processed based on the multi-head attention mechanism to obtain multiple broadcast information.
[0066] Based on the multi-head attention mechanism, multiple test information is processed to obtain multiple broadcast information; The language processing module is a module in the broadcast test model; the language processing module is built based on the multi-head attention mechanism.
[0067] In this embodiment, the test information is a set of input text contents specially prepared for testing the broadcast test model. They are carefully selected and organized, covering various possible language expressions, different application scenarios and rich semantic situations, etc., with the purpose of comprehensively examining the broadcasting ability of the model.
[0068] The language processing module is responsible for processing the input text information at the language level. Its core construction foundation is the multi-head attention mechanism. Through the powerful feature capture and semantic understanding capabilities of the multi-head attention mechanism, it can deeply analyze the input text and explore the relationship between elements in different positions.
[0069] The multi-head attention mechanism comprehensively considers information at different positions by calculating multiple "heads" in parallel. It can capture important features such as semantic relationships and long-distance dependencies in text sequences from multiple angles at the same time.
[0070] Take the sentence "I like to read on sunny afternoons" as an example. One "head" may focus on the grammatical structure relationship between words in the sentence, judging the subject, predicate, object and other components; another "head" may focus more on analyzing the semantic association between words, such as the connection between "sunny" and "afternoon" and "reading" in a pleasant atmosphere; and another "head" may pay attention to the overall emotional tendency of the text, which is positive and pleasant. By working in parallel with multiple "heads" like this, all aspects of the sentence can be mined to help the language processing module better understand the text.
[0071] From the above, it can be concluded that by introducing the multi-head attention mechanism, the language processing module of the present disclosure can analyze the input text information more deeply, not only considering the direct connection between the elements in the text, but also capturing complex semantic relationships and long-distance dependencies by calculating multiple "heads" in parallel, thereby improving the model's overall understanding of the text. The parallel computing characteristics of the multi-head attention mechanism help to improve the processing speed of the model. By processing the information of multiple "heads" at the same time, the model can complete complex text analysis tasks in a shorter time, thereby improving the overall performance and improving the accuracy and reliability of the broadcast test.
[0072] In one embodiment of the present disclosure, multiple test information is processed based on a multi-head attention mechanism to obtain multiple broadcast information, including: Extract features from the test information to obtain multiple types of broadcast features; Based on the multi-head attention mechanism, user features and multiple types of broadcast features are processed to obtain multiple first broadcast information; The announcement information is determined based on the plurality of first announcement information.
[0073] In one embodiment of the present disclosure, the multiple types of broadcast features include content features, scene features, and sender features; Based on the multi-head attention mechanism, user features and multiple types of broadcast features are processed to obtain multiple first broadcast information, including: The content features are processed based on the multi-head attention mechanism to obtain content broadcast information; Based on the multi-head attention mechanism, user features and content features are processed to obtain user broadcast information; Based on the multi-head attention mechanism, the scene features and content features are processed to obtain the scene broadcast information; Based on the multi-head attention mechanism, the sender's features and content features are processed to obtain the sender's broadcast information; Content broadcast information, user broadcast information, scene broadcast information and sender broadcast information are all first broadcast information.
[0074] In this embodiment, the multiple types of broadcast features may include: content features, scene features, and sender features.
[0075] The content feature may be a text tone feature in the test content. The content feature may be extracted based on methods such as keyword extraction and sentiment word analysis. The first broadcast information may be obtained based on the meaning expressed by the actual text information. The first broadcast information may be a tone information obtained based on the content feature, i.e., content broadcast information.
[0076] The scene features can be the application scene features of the user. The scene features can be extracted based on the scene keywords. The sender's tone can be inferred based on the scene features and content features appearing in the text, that is, the scene broadcast information. For example, for a sentence "Meeting in the office at 3 pm", the corresponding tone should be serious and dignified. Different scenes can have corresponding different tones.
[0077] For example, for the sentence "I'm in the amusement park", when the scene features and content features are not considered, the output may be a relatively bland tone, but combined with the scene, it can be expressed as a happy and upbeat tone, which is more in line with the actual tone of the sender.
[0078] The sender feature may be the relationship or intimacy between the sender and the receiver. For example, if the receiver's note to the sender is "mom", it can be determined that they are relatives. When the content features include "eating" and "cooling down", the tone can be defined as "concern". When the receiver's note to the sender is "boss", it can be determined that they are a superior relationship. If the content features include "file" and "report", the tone can be defined as "serious". Based on the sender's features, a first broadcast message can be obtained. The first broadcast message can be a tone message, that is, the sender's broadcast message.
[0079] User characteristics can be the user's status. When the user is busy, the content characteristics include "as soon as possible" and "right away", and the reporting tone should be concise, clear, efficient and direct. When the user is relaxing, the content characteristics include "eating" and "happy", and the reporting tone can be relaxed, pleasant and friendly, that is, the user is reporting information.
[0080] User features are not obtained from test information and do not belong to multiple categories of features. In the test environment of this application, user features can be set in advance. In the application environment, for example, in smart glasses, the user's status can be judged by monitoring the user's behavior, habits, etc.
[0081] Similarly, the above-mentioned sender characteristics are also set in advance, but not directly. Instead, the sender characteristics are indirectly set by setting notes, etc., and then the sender characteristics are determined by the above-mentioned feature extraction, etc.
[0082] In this embodiment, the multi-head attention mechanism can judge and output the tone of user features, content features, scene features and sender features respectively, and the output result is multiple first broadcast information.
[0083] It should be noted that, in this embodiment, the content feature not only determines the first broadcast information (tone) corresponding to itself, but also participates in the determination process of the first broadcast information of the other three features.
[0084] It can be concluded from the above that the present disclosure extracts multiple types of broadcast features from the test information through feature extraction, such as content features, scene features, and sender features, which together constitute the basis for generating broadcast information. By considering user features and sender features, the method of this embodiment can generate more personalized broadcast information that conforms to user identities and relationships. The application of the multi-head attention mechanism enables the model to process multiple features in parallel, improving processing speed and efficiency.
[0085] In one embodiment of the present disclosure, determining the broadcast information based on the plurality of first broadcast information includes: Determine the weight of content broadcast information; Determine multiple correlations between user features, scenario features, sender features and content features respectively; Determine the weight of the user broadcast information, the weight of the scene broadcast information and the weight of the sender broadcast information based on multiple correlations; The plurality of first broadcast information are weightedly calculated to obtain the broadcast information.
[0086] In this embodiment, considering that content features are an important factor affecting tone, other factors can be understood as a supplement and correction to content features. The weight of content broadcast information can be defined as , the weight of user broadcast information is defined as , the weight of the scene broadcast information is defined as , the weight of the sender's broadcast information is defined as .
[0087] In this embodiment, the weight of the content broadcast information is set to the first weight; The sum of the weight of the user broadcast information, the weight of the scene broadcast information and the weight of the sender broadcast information is set as the second weight; The sum of the first weight and the second weight is 1.
[0088] In this embodiment, the first weight is , the first weight can be determined based on experiments.
[0089] The weight of the user broadcast information, the weight of the scene broadcast information and the weight of the sender broadcast information can be allocated by calculating the correlation between the user characteristics, the scene characteristics and the sender characteristics and the content characteristics.
[0090] The correlation can be calculated based on the degree of feature matching or based on the Euclidean distance method, for example, the content features include: "amusement park", "office", "cinema", "home", "mom", "sports", and multiple scenes appear at this time. The correlation between the scene features and the content features is relatively high, and the correlation between the user features and the sender features and the content is relatively low.
[0091] Taking the calculation of the correlation between scene features and content features as an example, the scene features are converted into vectors , converting content features into vectors , calculate the distance according to the Euclidean distance calculation formula. If the dimensions (i.e. the number of elements) of the two vectors are different, you can make them the same dimension by padding the data, and then use the Euclidean distance formula to calculate. You can add elements to the vector with fewer dimensions, and the added element values can be padded with default values or mean values.
[0092] The calculated Euclidean distance value may be used as a criterion for judging the degree of association, and the degree of association may be obtained by presetting a mapping table between the Euclidean distance value and the degree of association.
[0093] The correlation between user features, scene features, sender features and content features can be defined as , , , then the weight corresponding to the user feature is , the weight corresponding to the scene feature is , the weight corresponding to the sender feature is .
[0094] For example, the calculated correlation between user features and content features is 0.2, the correlation between scene features and content features is 0.8, the correlation between sender features and content features is 0.2, and the first weight is defined as 0.4. At this time, the total weight of user features, scene features, and sender features can be 0.6.
[0095] The weight corresponding to the user feature is 0.1, the weight corresponding to the scene feature is 0.4, the weight corresponding to the sender feature is 0.1, and the weight corresponding to the content feature is 0.4 (that is, ).
[0096] The user broadcast information, scene broadcast information, sender broadcast information and content broadcast information may be weighted and summed according to the calculated weights to obtain the final target broadcast information.
[0097] From the above, it can be concluded that the present disclosure determines the weight of content broadcast information and allocates weights of user broadcast information, scene broadcast information and sender broadcast information based on the correlation between other features and content features, so as to more accurately reflect the tone and intention in the input text, make the broadcast information more in line with the actual context, and reduce the possibility of misunderstanding and ambiguity. The present disclosure considers the correlation between user features, scene features and sender features and content features, and the method can generate more personalized broadcast information that conforms to user identities and relationships. The weight allocation mechanism of the present disclosure enables the model to pay more attention to key information when processing multiple broadcast information, thereby improving processing efficiency and accuracy, and enhancing the accuracy and reliability of broadcast testing.
[0098] Corresponding to the broadcast test method in the above embodiment, Figure 2 This is a structural block diagram of a broadcast 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 broadcast testing device 20 includes: a model building module 21, a model testing module 22 and a model adjustment module 23.
[0099] Among them, the model building module 21 is used to build a broadcast test model; A model testing module 22, used for inputting a plurality of test information into a broadcast test model, and determining a plurality of target broadcast information, wherein the plurality of test information is information in a test set, and the test set includes the plurality of test information and broadcast information corresponding to each of the test information; The model adjustment module 23 is used to adjust the broadcast test model based on the first method in response to the number of error information in the multiple target broadcast information being greater than the first preset value and the type of the error information being a form error; and execute the step of inputting the multiple test information into the broadcast test model and determining the multiple target broadcast information until the number of error information in the multiple target broadcast information is less than or equal to the first preset value; In response to the number of error messages in the multiple target broadcast information being greater than a first preset value, and the type of the error messages being semantic errors, adjusting the broadcast test model based on a second method; and executing the step of inputting the multiple test information into the broadcast test model and determining the multiple target broadcast information until the number of error messages in the multiple target broadcast information is less than or equal to the first preset value; The first method and the second method have different processing methods.
[0100] In one embodiment of the present disclosure, the broadcast test model includes a broadcast feature library; The model adjustment module 23 is specifically used to process the error information based on the regular expression, and adjust the broadcast feature library based on the processed error information; The model adjustment module 23 is further specifically used to determine the semantic features in the error information and adjust the report feature library based on the semantic features.
[0101] In one embodiment of the present disclosure, the model adjustment module 23 is further configured to extract semantic features of the text in response to the semantic error being a text semantic expression error, and add the semantic features to the broadcast feature library; In response to the semantic error being a non-text semantic expression error, initial semantics and correct semantics of the non-text are acquired, and the initial semantics and correct semantics are added to the announcement feature library.
[0102] In one embodiment of the present disclosure, the model testing module 22 is specifically used to input multiple test information into the language processing module, process the multiple test information based on the multi-head attention mechanism, and obtain multiple broadcast information; Based on the multi-head attention mechanism, multiple test information is processed to obtain multiple broadcast information; The language processing module is a module in the broadcast test model; the language processing module is built based on the multi-head attention mechanism.
[0103] In one embodiment of the present disclosure, the model testing module 22 is further used to extract features from the test information to obtain multiple types of broadcast features; Based on the multi-head attention mechanism, user features and multiple types of broadcast features are processed to obtain multiple first broadcast information; The announcement information is determined based on the plurality of first announcement information.
[0104] In one embodiment of the present disclosure, the multiple types of broadcast features include content features, scene features, and sender features; The model testing module 22 is further used to process content features based on a multi-head attention mechanism to obtain content broadcast information; Based on the multi-head attention mechanism, user features and content features are processed to obtain user broadcast information; Based on the multi-head attention mechanism, the scene features and content features are processed to obtain the scene broadcast information; Based on the multi-head attention mechanism, the sender's features and content features are processed to obtain the sender's broadcast information; Content broadcast information, user broadcast information, scene broadcast information and sender broadcast information are all first broadcast information.
[0105] In one embodiment of the present disclosure, the model testing module 22 is further used to determine the weight of the content broadcast information; Determine multiple correlations between user features, scenario features, sender features and content features respectively; Determine the weight of the user broadcast information, the weight of the scene broadcast information and the weight of the sender broadcast information based on multiple correlations; The plurality of first broadcast information are weightedly calculated to obtain the broadcast information.
[0106] See also Figure 3 , Figure 3 A schematic block diagram of a wearable device provided by an embodiment of the present disclosure. Figure 3 The 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 / unit in the above-mentioned device embodiments, such as Figure 2 The functions of modules 21 to 23 are shown.
[0107] 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.
[0108] 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.
[0109] 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.
[0110] 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 broadcast 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.
[0111] 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.
[0112] 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.
[0113] 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.
[0114] 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.
[0115] 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.
[0116] 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.
[0117] 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.
[0118] 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 broadcast test method, characterized in that: include: Build a broadcast test model; Inputting a plurality of test information into the broadcast test model to determine a plurality of target broadcast information, wherein the plurality of test information is information in a test set, and the test set includes a plurality of test information and broadcast information corresponding to each of the test information; In response to the number of error messages in the plurality of target broadcast messages being greater than a first preset value, and the type of the error messages being a form error, adjusting the broadcast test model based on a first manner; and, executing the step of inputting a plurality of test information into the broadcast test model to determine a plurality of target broadcast information until the number of error information in the plurality of target broadcast information is less than or equal to the first preset value; In response to the number of error messages in the plurality of target broadcast messages being greater than a first preset value, and the type of the error messages being semantic errors, adjusting the broadcast test model based on a second manner; and, executing the step of inputting a plurality of test information into the broadcast test model to determine a plurality of target broadcast information until the number of error information in the plurality of target broadcast information is less than or equal to the first preset value; The first method and the second method are processed in different ways.
2. The broadcast test method according to claim 1, characterized in that: The broadcast test model includes a broadcast feature library; The adjusting the broadcast test model based on the first method includes: Processing the error information based on a regular expression, and adjusting the broadcast feature library based on the processed error information; The adjusting the broadcast test model based on the second method includes: Determine semantic features in the error information, and adjust the report feature library based on the semantic features.
3. The broadcast test method according to claim 2, characterized in that: The determining of the semantic features in the error information and adjusting the report feature library based on the semantic features includes: In response to the semantic error being a text semantic expression error, extracting semantic features of the text, and adding the semantic features to the broadcast feature library; In response to the semantic error being a non-text semantic expression error, initial semantics and correct semantics of the non-text are acquired, and the initial semantics and the correct semantics are added to the announcement feature library.
4. The broadcast test method according to claim 1, characterized in that: The step of inputting a plurality of test information into the broadcast test model and determining a plurality of target broadcast information comprises: Input multiple test information into the language processing module, process the multiple test information based on the multi-head attention mechanism, and obtain multiple broadcast information; Processing the plurality of test information based on the multi-head attention mechanism to obtain the plurality of broadcast information; The language processing module is a module in the broadcast test model; the language processing module is constructed based on a multi-head attention mechanism.
5. The broadcast test method according to claim 4, characterized in that: The multiple test information is processed based on the multi-head attention mechanism to obtain multiple broadcast information, including: Extracting features from the test information to obtain multiple types of broadcast features; Processing the user features and the multiple types of broadcast features based on the multi-head attention mechanism to obtain multiple first broadcast information; The announcement information is determined based on the plurality of first announcement information.
6. The broadcast test method according to claim 5, characterized in that: The multiple types of broadcast features include content features, scene features and sender features; The processing of the user features and the multiple types of broadcast features based on the multi-head attention mechanism to obtain multiple first broadcast information includes: Processing the content features based on the multi-head attention mechanism to obtain content broadcast information; Processing the user features and the content features based on the multi-head attention mechanism to obtain user broadcast information; Processing the scene features and the content features based on the multi-head attention mechanism to obtain scene broadcast information; Processing the sender features and the content features based on the multi-head attention mechanism to obtain the sender broadcast information; The content broadcast information, the user broadcast information, the scene broadcast information and the sender broadcast information are all the first broadcast information.
7. The broadcast test method according to claim 6, characterized in that: The determining the broadcast information based on the plurality of first broadcast information comprises: Determining the weight of the content broadcast information; respectively determining a plurality of correlation degrees between the user feature, the scene feature, the sender feature and the content feature; Determine the weight of the user broadcast information, the weight of the scene broadcast information, and the weight of the sender broadcast information based on the multiple association degrees; The plurality of first broadcast information are weightedly calculated to obtain the broadcast information.
8. A broadcast test device, characterized in that: Model building module, used to build a broadcast test model; A model testing module, used for inputting a plurality of test information into the broadcast test model to determine a plurality of target broadcast information, wherein the plurality of test information is information in a test set, and the test set includes a plurality of test information and broadcast information corresponding to each of the test information; A model adjustment module, configured to adjust the broadcast test model based on a first method in response to the number of error messages in the plurality of target broadcast messages being greater than a first preset value and the type of the error messages being a form error; and, executing the step of inputting a plurality of test information into the broadcast test model to determine a plurality of target broadcast information until the number of error information in the plurality of target broadcast information is less than or equal to the first preset value; In response to the number of error messages in the plurality of target broadcast messages being greater than a first preset value, and the type of the error messages being semantic errors, adjusting the broadcast test model based on a second manner; and, executing the step of inputting a plurality of test information into the broadcast test model to determine a plurality of target broadcast information until the number of error information in the plurality of target broadcast information is less than or equal to the first preset value; The first method and the second method are processed in different ways.
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.
Citation Information
Patent Citations
Assessing the subjective quality of TTS systems which accounts for variations between synthesised and original speech
GB2423903A
Interactive test method, device and system
US20200143151A1
Methods And Systems For Pushing Audiovisual Playlist Based On Text-Attentional Convolutional Neural Network
US20210350800A1
Method for automatically detecting meaning and measuring the clearness of text
WO2015113578A1
Speech broadcasting method and device, and storage medium
WO2023029259A1