Audio intelligent matching instruction method, device, electronic device and storage medium
Through the intelligent audio matching command method, the live audio data is automatically identified and processed, which solves the problem of high live broadcast costs, realizes automatic operations, reduces operating costs, and improves live broadcast effects.
Patent Information
- Application Number
- CN202210378777.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-12
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2042-04-12
AI Technical Summary
The high operation and field control costs during the live broadcast put economic pressure on small merchants and experts, and the existing technology is difficult to automatically process audio data to optimize the live broadcast effect.
Through the audio intelligent matching instruction method, the audio data is divided into multiple tokens, matched with the evocation feature in the policy instruction library, calculate the wake-up value and accumulated wake-up value, and execute the corresponding instructions if the threshold is reached to achieve automated operations.
Reduces manual demand, automatically identify and process live audio data, improves the degree of automation of live broadcast effects, and reduces operating costs.
Smart Images

Figure CN114758657B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of online live broadcast technology, and in particular to an audio intelligent matching instruction method, device, electronic device and storage medium. Background Art
[0002] Nowadays, live broadcast rooms such as Douyin, Kuaishou, and Video Number, where influencers bring goods, are extremely popular. It is the hottest industry field now, bringing rich profits not only to live broadcast platforms, but also to merchants and influencers. However, the cost of live broadcasting is also very high. A live broadcast room often needs to be equipped with dedicated operators and field control personnel, which requires more expenses. This cost is not a big deal for big brands, but for small merchants and influencers with small sales, the high cost may lead to losses if the live broadcast effect is not good. Summary of the invention
[0003] The present invention provides an audio intelligent matching instruction method, device, electronic device and storage medium, which can directly identify live audio data, automatically execute instructions in a strategy instruction library, and perform corresponding operations.
[0004] In a first aspect, an embodiment of the present invention provides an audio intelligent matching instruction method, the method comprising:
[0005] Get audio data;
[0006] Divide the audio data into multiple tokens;
[0007] Match the token with the evocation feature in the policy instruction library. If the evocation feature is matched, use the token as the instruction feature and record the feature information of the instruction feature, wherein the feature information includes the cardinality x, the position coefficient y, and the interval coefficient z;
[0008] Calculate the wake-up value s of the instruction feature based on the feature information;
[0009] Calculate the cumulative wake-up value m of the command feature within a preset time length;
[0010] If the accumulated awakening value m is greater than or equal to the awakening threshold k, the execution instruction corresponding to the awakening feature is executed.
[0011] Optionally, dividing the audio data into a plurality of tokens includes:
[0012] Recognize the audio data into text data;
[0013] The text data is segmented to obtain several tokens.
[0014] Optionally, the wake-up value s=x×y×z.
[0015] Optionally, the method further comprises:
[0016] The characteristic information and the wake-up value s are stored in a queue to form a message body.
[0017] Optionally, the feature information further includes a timestamp, and the calculating of the cumulative wake-up value m of the command feature within a preset time length includes:
[0018] Taking the timestamp of the first message body in the queue as the starting point, obtain all message bodies within the preset time length in the queue as the data to be woken up;
[0019] The cumulative awakening value m=n∑s of the message body in the data to be awakened is calculated, wherein n is the number of the message bodies in the data to be awakened.
[0020] Optionally, the method further comprises:
[0021] If the accumulated awakening value m in the to-be-awakened data is greater than or equal to the awakening threshold k, all message bodies in the awakening data in the queue are deleted; otherwise, the first message body in the queue is deleted.
[0022] In a second aspect, an embodiment of the present invention provides an audio intelligent matching instruction device, the device comprising:
[0023] A data acquisition module, which acquires audio data;
[0024] A data segmentation module, which divides the audio data into multiple tokens;
[0025] A data identification module matches the token with the call-up feature in the policy instruction library. If the call-up feature is matched, the token is used as the instruction feature and the feature information of the instruction feature is recorded;
[0026] A data processing module calculates the wake-up value s of the command feature based on the feature information; calculates the cumulative wake-up value m of the command feature within a preset time length;
[0027] The instruction execution module executes the execution instruction corresponding to the awakening feature if the accumulated awakening value m is greater than or equal to the awakening threshold k.
[0028] Optionally, the device further comprises:
[0029] The data storage module stores the characteristic information and the wake-up value in a queue to form a message body.
[0030] In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the program, the method described in any one of the first aspects is implemented.
[0031] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method as described in any one of the first aspects.
[0032] Beneficial Effects
[0033] The present invention provides an audio intelligent matching instruction method, device, electronic device and storage medium. The method first divides the acquired audio data into multiple tokens, matches the token with the awakening feature in the strategy instruction library, and if the awakening feature is matched, the token is used as the instruction feature, and the characteristic information of the instruction feature is recorded; then the awakening value s of the instruction feature is calculated by the characteristic information, and the cumulative awakening value m of the instruction feature within a preset time length is calculated; then the cumulative awakening value m of the instruction feature within the preset time length is calculated; if the accumulated awakening value m is greater than or equal to the awakening threshold k, the execution instruction corresponding to the awakening feature is executed. The present invention can automatically identify the audio data of the live broadcast room, automatically execute the instructions in the strategy instruction library, and perform corresponding operations, reducing the need for manual work.
[0034] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The above and other features, advantages and aspects of the embodiments of the present invention will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements.
[0036] Figure 1 A flow chart of an audio intelligent matching instruction method according to an embodiment of the present invention is shown;
[0037] Figure 2 A schematic diagram showing the structure of an audio intelligent matching instruction device according to an embodiment of the present invention is shown;
[0038] Figure 3 A schematic diagram showing the structure of an audio intelligent matching instruction system according to an embodiment of the present invention is shown;
[0039] Figure 4 A structural diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0040] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0041] It should be noted that the description of the embodiments of the present invention is only for more clearly illustrating the technical solutions of the embodiments of the present invention, and does not constitute a limitation on the technical solutions provided by the embodiments of the present invention.
[0042] Figure 1 A flowchart of an audio intelligent matching instruction method according to an embodiment of the present invention is shown; see Figure 1 , the method comprising:
[0043] S1. Get audio data;
[0044] S2. Divide the audio data into multiple tokens; to facilitate obtaining features matching the policy instruction library from the audio data;
[0045] S3. Match the token with the evocation feature in the policy instruction library. If the evocation feature is matched, the token is used as the instruction feature, and the feature information of the instruction feature is recorded, wherein the feature information includes the cardinality x, the position coefficient y, and the interval coefficient z;
[0046] Among them, the strategy instruction library includes arousal features and execution instructions corresponding to the arousal features one by one. The token is matched with the arousal features in the strategy instruction library, so as to find the token that can arouse the execution instruction from the audio data. For example, if "milk" appears in the audio data, it corresponds to the execution instruction of introducing milk; but considering that the word "milk" may only appear in a sentence in the audio data as ordinary speech, the host does not want to execute the execution instruction corresponding to "milk" when saying this sentence. If the execution instruction is executed every time "milk" is matched, it seems inflexible and not smart enough. In order to improve the flexibility of corresponding execution instructions through voice control in this embodiment, the following method is adopted:
[0047] S4. Calculate the wake-up value s of the command feature based on the feature information;
[0048] S5. Calculate the cumulative wake-up value m of the command feature within a preset time length;
[0049] S6. If the accumulated wake-up value m is greater than or equal to the wake-up threshold k, execute the execution instruction corresponding to the wake-up feature.
[0050] The wake-up value s can be understood as a progress value for executing the execution instruction. Only when the progress reaches saturation will the execution instruction begin to execute, which improves the flexibility of the voice wake-up execution instruction and makes it more intelligent.
[0051] The embodiment of the present invention provides an audio intelligent matching instruction method, which first divides the acquired audio data into multiple tokens, matches the token with the awakening feature in the policy instruction library, and if the awakening feature is matched, the token is used as the instruction feature, and the characteristic information of the instruction feature is recorded; then the awakening value s of the instruction feature is calculated by the characteristic information, and the cumulative awakening value m of the instruction feature within a preset time length is calculated; then the cumulative awakening value m of the instruction feature within the preset time length is calculated; if the accumulated awakening value m is greater than or equal to the awakening threshold k, the execution instruction corresponding to the awakening feature is executed. The present invention can automatically identify the audio data of the live broadcast room, automatically execute the instructions in the policy instruction library, and perform corresponding operations.
[0052] Specifically, as an implementation mode, dividing the audio data into a plurality of tokens includes:
[0053] S21. Identify the audio data as text data; the evocative features in the strategy instruction library are nouns in text, such as "milk" in text form.
[0054] S22. Segment the text data to obtain several tokens. Specifically, the tokens can be obtained based on relevant machine learning algorithms, such as the forward maximum matching method, the reverse maximum matching method and the minimum segmentation method. The tokens finally obtained are characters, words and words, which are matched with the evocative features of the noun form in the strategy instruction library to improve the matching degree and reduce the misjudgment rate.
[0055] As another implementation, the audio may be divided into a plurality of audio segments, and the audio data may be divided into a plurality of tokens, including:
[0056] S2a. The audio data is divided into a plurality of audio segments; the evocation features in the strategy instruction library are also audio segments, and the divided audio segments are then matched with the evocation features in the strategy instruction library.
[0057] Matching the token with the evocation feature in the policy instruction library includes:
[0058] The multiple tokens are traversed through the policy instruction library one by one in sequence, and matched with a number of awakening features in the policy instruction library. If no awakening feature is matched, the next token is matched. If the awakening feature is matched, the token is used as the instruction feature, the feature information of the instruction feature is recorded, and the awakening value of the instruction feature is calculated according to the feature information;
[0059] Specifically, the wake-up value s=x×y×z. The cardinality x is a fixed value, the position coefficient y is affected by whether the instruction feature is in a long sentence or a short sentence, and the interval coefficient z is affected by the distance between the instruction feature and the last appearance of the instruction feature; for example, the cardinality x is 1; if the instruction feature appears in a long sentence, the position coefficient y is 0.5, if it appears in a short sentence, the position coefficient y is 1.0; if the instruction feature is within 2s from the last appearance, the interval coefficient z is 1.0, if it is within 2-4s from the last appearance, the interval coefficient z is 0.5, and if it is more than 4s from the last appearance, the interval coefficient z is 0.0. If the instruction feature appears for the first time, the interval coefficient z is 0.0. Before calculating the wake-up value s of the instruction feature, first determine whether the instruction feature is in a long sentence or a short sentence.
[0060] In this embodiment, when judging, whether to wake up the corresponding execution instruction is determined by calculating the cumulative wake-up value m of the instruction feature appearing in the audio data within a preset time length, and judging whether m is greater than the wake-up threshold k.
[0061] In order to realize the calculation of the above-mentioned cumulative wake-up value m, specifically, the method further includes:
[0062] The characteristic information and the wake-up value s are stored in a queue to form a message body. It is convenient to calculate the cumulative wake-up value of the instruction feature within a fixed time period. Among them, the characteristic information includes a timestamp, a cardinality x, a position coefficient y, and an interval coefficient z. In this embodiment, a plurality of instruction features may appear in the audio data, and each instruction feature corresponds to a different execution instruction in the strategy instruction library. When the characteristic information and the wake-up value s of the instruction feature are stored in the queue, different instruction features are stored in different queues, that is, the same instruction feature is stored in each queue. For example, if two instruction features "milk" and "apple" appear in the audio at the same time, the instruction feature "milk" in the audio data is stored in the first queue no matter how many times it appears, and the instruction feature "apple" in the audio data is stored in another queue no matter how many times it appears. A separate queue runs independently without affecting other queues, and each queue corresponds to an execution instruction.
[0063] Based on the above, the feature information also includes a timestamp, and the calculation of the cumulative wake-up value m of the command feature within a preset time length includes:
[0064] S51. Taking the timestamp of the first message body in the queue as the starting point, all message bodies within the preset time length in the queue are obtained as the data to be awakened; the specific fixed time length is determined according to the actual situation, such as 10s. Among them, the first message body includes the timestamp, cardinality x, position coefficient y, interval coefficient z, and awakening value s corresponding to the instruction feature. Compared with just taking the audio data of a fixed time length from the beginning or randomly intercepting it, it can avoid the part where the instruction feature is not detected in the front from being counted, and avoid affecting the reliability of the accumulated awakening value within the preset time length for the awakening execution instruction; and taking the timestamp of the first message body in the queue as the starting point, there will be no data with undetected instruction features in the front to occupy a limited time, so that the data obtained within the preset time length is more reliable, and then the method of determining whether to wake up the execution instruction by calculating the accumulated awakening value within the fixed length is more reliable.
[0065] S52. Calculate the cumulative awakening value m=n∑s of the message body in the data to be awakened, where n is the number of the message bodies in the data to be awakened. Specifically, in the data to be awakened, the instruction feature appears once, and the cumulative awakening value m is accumulated once. Once the cumulative awakening value m is greater than or equal to the awakening threshold k, the execution instruction is executed and the corresponding operation is automatically performed.
[0066] In this embodiment, the method further includes:
[0067] If the accumulated wake-up value m in the data to be woken up is greater than or equal to the wake-up threshold k, all message bodies in the wake-up data in the queue are deleted; otherwise, the first message body in the queue is deleted. Then, starting from the timestamp of the first message body in the queue, all message bodies within the preset time length in the queue are obtained as the data to be woken up, and the calculation of the accumulated wake-up value m in the next cycle is continued. Among them, if the cumulative wake-up value m in the data to be awakened is greater than or equal to the wake-up threshold k, all message bodies in the wake-up data in the queue are deleted, which can prevent repeated calculation and avoid the execution instruction from being awakened repeatedly; if the cumulative wake-up value m is less than the wake-up threshold k, the requirement of the wake-up execution instruction cannot be met. At this time, if the subsequent message body and the message body in the second half of the wake-up data are sufficient to wake up the execution instruction, if all message bodies in the wake-up data are deleted, it will cause the next cycle to wake up the execution instruction, but the cumulative wake-up value m does not meet the wake-up condition. Therefore, if the cumulative wake-up value m is less than the wake-up threshold k, delete the first message body in the queue. In the next cycle, take the timestamp of the second message body in this cycle as the starting point to obtain all message bodies within a fixed length for calculation, which can effectively prevent the above-mentioned misjudgment and facilitate improving the accuracy of the wake-up execution instruction.
[0068] As another implementation, the method of calculating the cumulative wake-up value m to wake up the execution instruction can also be: starting from the timestamp of the first message body in the queue, start to sequentially traverse the message bodies in the queue, and calculate the cumulative wake-up value m. If the cumulative wake-up value m is greater than or equal to the wake-up threshold k, stop the traversal, and make a judgment based on the timestamp of the first traversed message body and the timestamp of the last message body. If the time interval between the time of the first message body and the last message body is greater than a fixed time length, delete the first message body in the queue and proceed to the next cycle; if the time interval between the time of the first message body and the last message body is greater than a fixed time length, delete all message bodies that have been traversed in the queue and proceed to the next cycle.
[0069] Based on the same inventive concept, an embodiment of the present invention also provides an audio intelligent matching instruction device, which can be used to implement an audio intelligent matching instruction method described in the above embodiment, as described in the following embodiment: Since the principle of solving the problem by this audio intelligent matching instruction device is similar to that of an audio intelligent matching instruction method, the implementation of an audio intelligent matching instruction device can refer to the implementation of an audio intelligent matching instruction method, and the repeated parts will not be repeated. As used below, the terms "unit" or "module" can be a combination of software and / or hardware that implements predetermined functions. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0070] Figure 2 FIG. 1 is a block diagram showing a structure of an audio intelligent matching instruction device according to an embodiment of the present invention. Figure 2 As shown, the device comprises:
[0071] A data acquisition module 10 is used to acquire audio data;
[0072] A data segmentation module 20, which divides the audio data into multiple tokens;
[0073] The data identification module 30 matches the token with the call-up feature in the policy instruction library. If the call-up feature is matched, the token is used as the instruction feature and the feature information of the instruction feature is recorded.
[0074] The data processing module 40 calculates the wake-up value s of the command feature based on the feature information; calculates the cumulative wake-up value m of the command feature within a preset time length;
[0075] The instruction execution module 50 executes an execution instruction corresponding to the awakening feature if the accumulated awakening value m is greater than or equal to the awakening threshold k.
[0076] The embodiment of the present invention provides an audio intelligent matching instruction device, which first obtains audio data through a database acquisition module; then divides the audio data into multiple tokens through a data segmentation module; matches the token with the arousal feature in the policy instruction library through a data identification module, and if the arousal feature is matched, the token is used as the instruction feature, and the characteristic information of the instruction feature is recorded; then, the data processing module calculates the awakening value s of the instruction feature based on the characteristic information; calculates the cumulative awakening value m of the instruction feature within a preset time length, and finally, in the instruction execution module, if the accumulated awakening value m is greater than or equal to the awakening threshold k, the execution instruction corresponding to the awakening feature is executed. Among them, judging whether the accumulated awakening value m is greater than or equal to the awakening threshold k is also performed in the data processing module. The embodiment of the present invention can collect and identify audio data in real time, and intelligently execute the corresponding execution instructions through the analysis of audio data, reducing the need for manual work.
[0077] The device also includes:
[0078] The data storage module 60 stores the characteristic information and the wake-up value in a queue to form a message body.
[0079] In the data processing module 40, the wake-up value s of the instruction feature is calculated based on the feature information; the cumulative wake-up value m of the instruction feature within the preset time length is calculated, specifically, by accessing the data storage module 60, taking the timestamp of the first message body in the queue as the starting point, obtaining all message bodies within the preset time length in the queue as the data to be woken up; and calculating the cumulative wake-up value m=n∑s of the message body in the data to be woken up, where n is the number of the message bodies in the data to be woken up.
[0080] The embodiment of the present invention also provides an audio intelligent matching instruction system, Figure 3 FIG. 4 shows a schematic diagram of the structure of an audio intelligent matching instruction system to which an embodiment of the present invention can be applied, such as Figure 3 As shown, the system comprises:
[0081] Live data collector 001, obtains the audio data;
[0082] A data buffer 002 for buffering the audio data;
[0083] The instruction processor 003 identifies the audio data, matches it with the awakening features in the policy instruction library, identifies the instruction features, and calculates the cumulative awakening value m of the instruction features within a preset time length, and determines whether the cumulative awakening value m is greater than or equal to the awakening threshold k;
[0084] The instruction executor 004 is connected to the instruction processor, and executes the execution instruction corresponding to the awakening feature if the accumulated awakening value m is greater than or equal to the awakening threshold k.
[0085] Specifically, in the instruction processor 003, the audio data is identified as text information, the text information is segmented to obtain tokens, and the tokens are sequentially matched with the awakening features in the policy instruction library. If the match is successful, the corresponding token is defined as an instruction feature, and the characteristic information of the instruction feature is recorded. The characteristic information includes a timestamp, a cardinality x, a position coefficient y, and an interval coefficient z (refer to the above method), and the awakening value s of the instruction feature is calculated based on the characteristic information. Then, the characteristic information and the awakening value s are encapsulated into a message body and put into a queue, the message body in the queue is accessed, and the cumulative awakening value m of all message bodies within a preset time length is calculated, and it is determined whether the cumulative awakening value m is greater than the awakening threshold k.
[0086] In view of the diversity of instruction features in audio data, the instruction processor is equipped with multiple instructions that match the instruction features one by one, identify and process different instruction features, and put them into corresponding queues without interfering with each other. The instruction executor is matched with multiple instruction processors, which are directly connected to the one-to-one corresponding processors to realize the execution operation of executing instructions.
[0087] An embodiment of the present invention further provides a computer electronic device, Figure 4 FIG. 1 shows a schematic diagram of the structure of an electronic device to which an embodiment of the present invention can be applied. Figure 4 As shown, the computer electronic device includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 402 or the program loaded from the storage part 408 to the random access memory (RAM) 403. In the RAM 403, various programs and data required for system operation are also stored. The CPU 401, the ROM 402 and the RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0088] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.
[0089] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a different order from the order marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0090] The units or modules involved in the embodiments of the present invention may be implemented by software or hardware. The units or modules described may also be provided in a processor, for example, may be described as: a processor including a data acquisition module 10, a data segmentation module 20, a data identification module 30, a data processing module 40, and an instruction execution module 50, wherein the names of these modules do not constitute a limitation on the module itself in certain circumstances, for example, the instruction execution module 50 may also be described as "if the accumulated wake-up value m is greater than or equal to the wake-up threshold k, then the instruction execution module 50 executes the execution instruction corresponding to the wake-up feature".
[0091] As another aspect, the present invention further provides a computer-readable storage medium, which may be a computer-readable storage medium included in an audio intelligent matching instruction device described in the above embodiment; or a computer-readable storage medium that exists independently and is not assembled into an electronic device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute an audio intelligent matching instruction method described in the present invention.
[0092] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) to form a technical solution.
Claims
1. An audio intelligent matching instruction method, characterized in that: The method comprises: Get audio data; Divide the audio data into multiple tokens; Match the token with the evocation feature in the policy instruction library. If the evocation feature is matched, use the token as the instruction feature and record the feature information of the instruction feature, wherein the feature information includes cardinality x, position coefficient y, interval coefficient z, and timestamp; wherein the cardinality x is a fixed value, the position coefficient y is affected by whether the instruction feature is in a long sentence or a short sentence, and the interval coefficient z is affected by the distance between the instruction feature and the last occurrence of the instruction feature; Calculating a wake-up value s of the instruction feature based on the feature information; wherein the wake-up value s=x×y×z; The characteristic information and the wake-up value s are stored in a queue to form a message body; Calculating the cumulative awakening value m of the instruction feature within a preset time length, including: taking the timestamp of the first message body in the queue as the starting point, obtaining all message bodies within the preset time length in the queue as data to be awakened; calculating the cumulative awakening value m=n∑s of all message bodies in the data to be awakened, where n is the number of message bodies in the data to be awakened; If the cumulative wake-up value m is greater than or equal to the wake-up threshold k, the execution instruction corresponding to the wake-up feature is executed, and all message bodies in the wake-up data in the queue are deleted; otherwise, the first message body in the queue is deleted, and the timestamp of the first message body in the queue is used as the starting point again, and all message bodies within the preset time length in the queue are obtained as the data to be woken up, and the calculation of the cumulative wake-up value m in the next cycle is continued.
2. The method for intelligent audio matching instructions according to claim 1, characterized in that: The step of dividing the audio data into a plurality of tokens comprises: Recognize the audio data into text data; The text data is segmented to obtain several tokens.
3. An audio intelligent matching instruction device, characterized in that: The device comprises: A data acquisition module, which acquires audio data; A data segmentation module, which divides the audio data into multiple tokens; The data identification module matches the token with the evocation feature in the policy instruction library. If the evocation feature is matched, the token is used as the instruction feature and the feature information of the instruction feature is recorded, wherein the feature information includes a cardinality x, a position coefficient y, an interval coefficient z, and a timestamp; wherein the cardinality x is a fixed value, the position coefficient y is affected by whether the instruction feature is in a long sentence or a short sentence, and the interval coefficient z is affected by the distance between the instruction feature and the last occurrence of the instruction feature; A data processing module calculates a wake-up value s of the instruction feature based on the feature information; wherein the wake-up value s=x×y×z; A data storage module stores the characteristic information and the wake-up value s in a queue to form a message body; The data processing module calculates the cumulative awakening value m of the instruction feature within a preset time length, including: taking the timestamp of the first message body in the queue as the starting point, obtaining all message bodies within the preset time length in the queue as the data to be awakened; calculating the cumulative awakening value m=n∑s of all message bodies in the data to be awakened, where n is the number of message bodies in the data to be awakened; The instruction execution module executes the execution instruction corresponding to the wake-up feature if the cumulative wake-up value m is greater than or equal to the wake-up threshold k, and deletes all message bodies in the wake-up data in the queue; otherwise, deletes the first message body in the queue, and starts again from the timestamp of the first message body in the queue, obtains all message bodies within a preset time length in the queue as the data to be woken up, and continues the calculation of the cumulative wake-up value m in the next cycle.
4. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the method according to claim 1 or 2 is implemented.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to claim 1 or 2 is implemented.
Citation Information
Patent Citations
Live streaming cache processing method and device, equipment and storage medium
CN110248204A
Voice awakening method and device based on decoding network
CN110910885A