Method, device and equipment for dynamically adjusting TTS (text to speech) broadcast
Technical Field
The embodiment of the invention relates to the technical field of information processing, in particular to a method, a device, equipment and a computer readable storage medium for dynamically adjusting TTS (text to text) broadcast.
Background
With the development and popularization of computer technology, intelligent technologies such as human-computer interaction provide convenient and fast services in various aspects of people's life. TTS (text to speech) can realize the conversion from text to voice, and is an important technology for man-machine interaction in artificial intelligence technology. TTS is widely used in various intelligent terminals, such as vehicle-mounted intelligent terminals.
When broadcasting, the existing TTS generally broadcasts directly after receiving new broadcast information, or queues up a plurality of broadcast information when receiving a plurality of broadcast information, and broadcasts according to the sequence, or interrupts the previous broadcast when receiving new broadcast information, and directly enters new voice broadcast. However, in practical applications, the real-time vehicle state and communication condition are not considered in the above processing manners, and the change of the vehicle state and communication condition may cause the broadcast content to be invalid, so that the user receives invalid or wrong information, and the physical examination of the user is poor.
Aiming at the defects of the prior art, how to correctly and effectively adjust TTS broadcast, improve the broadcast effect of the TTS broadcast, improve the use experience of users, and establish a more optimized man-machine interaction flow is a problem which needs to be solved urgently at present.
Disclosure of Invention
The embodiment of the invention provides a method, a device and equipment for dynamically adjusting TTS (text to speech) broadcast and a computer readable storage medium, which can be used for solving the problems in the related technology.
On one hand, the embodiment of the invention provides a method for dynamically adjusting TTS (text to speech) broadcast, which is characterized by comprising the following steps:
step 1, receiving one or more TTS broadcast messages;
step 2, analyzing the broadcast information, and determining a first broadcast parameter, wherein the first broadcast parameter comprises a Time To Live (TTL);
step 3, determining a second broadcast parameter according to the current state of the vehicle, wherein the second broadcast parameter comprises the driving direction of the vehicle;
step 4, determining whether to execute TTS broadcast or not according to the first broadcast parameters and the second broadcast parameters; if yes, executing step 5;
and step 5, executing TTS broadcast.
Preferably, the time-to-live, TTL, is determined according to at least any one of:
-analyzing the broadcast information to directly obtain the time to live TTL, wherein the broadcast information carries the time to live TTL;
-analyzing the broadcast information to obtain the broadcast information type corresponding to the broadcast information, so as to determine the time to live TTL according to the broadcast information type.
Preferably, the determining the TTL according to the broadcast information type includes:
and performing matching query in a TTL query table according to the broadcast information type to obtain the TTL, wherein the TTL query table contains the mapping relation between the broadcast information type and the corresponding TTL.
Preferably, the first broadcast parameter further includes broadcast information content; the second broadcast parameter further includes a vehicle travel route, and/or a current vehicle location.
Preferably, the step 4 further comprises:
if the survival time TTL is not out of date, but the broadcast information content is not matched with the vehicle running direction, the TTS broadcast is not executed;
and/or the presence of a gas in the gas,
if the survival time TTL is not out of date, but the broadcast information content is not matched with the vehicle running direction and is not matched with the vehicle running route, the TTS broadcast is not executed;
and/or the presence of a gas in the gas,
and if the Time To Live (TTL) is not out of date, the broadcast information content is matched with the vehicle running direction, but the distance between the position information of the place in the broadcast information content and the current position of the vehicle exceeds a preset distance, the TTS broadcast is not executed.
Preferably, the step 5 further comprises: when a plurality of broadcast messages exist and the broadcast messages are reminding messages, calculating the weight according to the sending time and the survival time TTL of the broadcast messages, setting the priority level according to the weight, sequencing reminding message queues according to the priority level, and broadcasting in sequence;
when a plurality of broadcast information exist and the broadcast information is instruction feedback type information, grouping the broadcast information according to the relevancy and the sending time of the broadcast information and calculating grouping weight, determining the intra-group information weight of the broadcast information in the group according to the sending time for the broadcast information in the group, and respectively setting the intra-group broadcast priority level of the broadcast information in the group and the packet broadcast priority level of the broadcast information in the group according to the size of the intra-group information weight and the size of the grouping weight; and according to the packet broadcasting priority of the broadcasting information packet, performing packet queue sequencing on the broadcasting information packet, and broadcasting the broadcasting information with the highest broadcasting priority in each packet in sequence.
On the other hand, the embodiment of the present invention provides a device for dynamically adjusting TTS broadcast, where the device includes:
the receiving module is used for receiving one or more TTS broadcast messages;
the first broadcast parameter acquisition module analyzes the broadcast information and determines a first broadcast parameter, wherein the first broadcast parameter comprises the Time To Live (TTL);
the second broadcast parameter acquisition module is used for determining a second broadcast parameter according to the current state of the vehicle, wherein the second broadcast parameter comprises the driving direction of the vehicle;
the judging module is used for determining whether to execute TTS broadcast or not according to the first broadcast parameter and the second broadcast parameter;
and the control module executes or does not execute TTS broadcast according to the judgment result of the judgment module.
Preferably, the time-to-live, TTL, is determined according to at least any one of:
-analyzing the broadcast information to directly obtain the time to live TTL, wherein the broadcast information carries the time to live TTL;
-analyzing the broadcast information to obtain the broadcast information type corresponding to the broadcast information, so as to determine the time to live TTL according to the broadcast information type.
Preferably, determining the TTL to be alive according to the type of the broadcast information includes:
and performing matching query in a TTL query table according to the broadcast information type to obtain the TTL, wherein the TTL query table contains the mapping relation between the broadcast information type and the corresponding TTL.
Preferably, the first and second electrodes are formed of a metal,
the first broadcast parameter further comprises broadcast information content; the second broadcast parameter further includes a vehicle travel route, and/or a current vehicle location.
Preferably, the determination module is further configured to determine whether to perform TTS broadcast based on:
if the survival time TTL is not out of date, but the broadcast information content is not matched with the vehicle running direction, the TTS broadcast is not executed;
and/or the presence of a gas in the gas,
if the survival time TTL is not out of date, but the broadcast information content is not matched with the vehicle running direction and is not matched with the vehicle running route, the TTS broadcast is not executed;
and/or the presence of a gas in the gas,
and if the Time To Live (TTL) is not out of date, the broadcast information content is matched with the vehicle running direction, but the distance between the position information of the place in the broadcast information content and the current position of the vehicle exceeds a preset distance, the TTS broadcast is not executed.
Preferably, the apparatus further comprises a weight calculation module,
the first broadcast parameter acquisition module is further used for sending the determined broadcast information category to the weight calculation module;
when a plurality of broadcast messages exist and the broadcast messages are reminding messages, calculating the weight according to the sending time and the survival time TTL of the broadcast messages, setting the priority level according to the weight, sequencing reminding message queues according to the priority level, and broadcasting in sequence;
when a plurality of broadcast information exist and the broadcast information is instruction feedback type information, grouping the broadcast information according to the relevancy and the sending time of the broadcast information and calculating grouping weight, determining the intra-group information weight of the broadcast information in the group according to the sending time for the broadcast information in the group, and respectively setting the intra-group broadcast priority level of the broadcast information in the group and the packet broadcast priority level of the broadcast information in the group according to the size of the intra-group information weight and the size of the grouping weight; and according to the packet broadcasting priority of the broadcasting information packet, performing packet queue sequencing on the broadcasting information packet, and broadcasting the broadcasting information with the highest broadcasting priority in each packet in sequence.
On the other hand, the embodiment of the invention provides terminal equipment comprising a device for dynamically adjusting TTS broadcast.
In another aspect, an embodiment of the present invention provides a computer device, which includes a processor and a memory, where the memory stores a computer program that is executable on the processor, and the computer program implements the foregoing method when executed by the processor.
In another aspect, the present invention provides a computer-readable storage medium, in which a computer program that can be run on a processor is stored, and when being executed, the computer program implements the foregoing method.
The implementation of the embodiment of the invention can correctly and effectively receive and adjust TTS broadcast, improve the broadcast effect of the TTS broadcast, improve the use experience of users, establish a more optimized man-machine interaction flow and obtain beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for dynamically adjusting TTS broadcast provided in an embodiment of this specification.
Fig. 2 is a schematic specific flow chart of determining whether to execute TTS broadcast in the method for dynamically adjusting TTS broadcast provided in the embodiment of the present description.
Fig. 3 is a structure of a device for dynamically adjusting TTS broadcast according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings. The embodiments and specific features of the embodiments of the present invention are detailed descriptions of technical solutions of the embodiments of the present invention, and are not limited to technical solutions of the present invention, and the technical features of the embodiments and the embodiments of the present invention may be combined with each other without conflict.
Example one
Referring to fig. 1, fig. 1 is a method for dynamically adjusting TTS broadcast according to an embodiment of the present invention, where the method includes, but is not limited to:
step 1, receiving one or more TTS broadcast messages;
step 2, analyzing the broadcast information, and determining a first broadcast parameter, wherein the first broadcast parameter comprises a Time To Live (TTL);
step 3, determining a second broadcast parameter according to the current state of the vehicle, wherein the second broadcast parameter comprises the driving direction of the vehicle;
step 4, determining whether to execute TTS broadcast or not according to the first broadcast parameters and the second broadcast parameters; if yes, executing step 5;
and step 5, executing TTS broadcast.
Specifically, the format of the broadcast information may be as follows:
ID |
Data |
Timestamp |
Reserved1 |
Reserved2 |
the ID field may be a receiver identifier, the Data field may be broadcast information content, the Timestamp field is an information transmission Timestamp, and the Reserved field is a Reserved field.
Specifically, the specific process of determining the first broadcast parameter in step 2 may be determining the time to live TTL according to at least any one of the following:
-analyzing the broadcast information to directly obtain the time to live TTL, wherein the broadcast information carries the time to live TTL;
-analyzing the broadcast information to obtain the broadcast information type corresponding to the broadcast information, so as to determine the time to live TTL according to the broadcast information type.
For example, TTS broadcast information sent by the cloud may carry TTL. Such as setting one of the reserved fields to be a TTL field. The broadcast information is as follows:
ID |
Data |
Timestamp |
TTL |
Reserved |
or the broadcast information can be classified according to the broadcast information content by analyzing TTS broadcast information, such as reminding information or instruction feedback information; the reminding information can be classified into common reminding information and emergency reminding information; and inquiring a TTL inquiry table corresponding to the classified information aiming at different classified information so as to determine the TTL of the broadcast information.
The TTL lookup table is shown in the following table:
table 1: TTL look-up table
Type of information |
Time to live TTL |
Information of emergency reminding type |
10~60s |
General reminder type information |
60~300s |
Instruction feedback type information |
30~180S |
Or, the information type may be carried in the TTS broadcast information, as shown below:
ID |
Data |
Timestamp |
Type |
Reserved |
wherein Type identifies the message Type, e.g., "00" represents emergency alert Type information; "01" represents the general reminding information, and "10" indicates the feedback information.
Or, the TTS broadcast information simultaneously carries the information type and the TTL, as follows:
ID |
Data |
Timestamp |
Type |
TTL |
specifically, whether the broadcast information exceeds TTL is judged, and if the broadcast information exceeds TTL, the broadcast information is deleted.
Further, the first broadcast parameter further comprises broadcast information content; the second broadcast parameter further includes a vehicle travel route, and/or a current vehicle location.
Specifically, referring to fig. 2, determining whether to execute a TTS broadcast further includes, according to the first broadcast parameter and the second broadcast parameter:
if the survival time TTL is not out of date, but the broadcast information content is not matched with the vehicle running direction, the TTS broadcast is not executed;
for example, broadcast information is still in the time of survival, and broadcast information content is: "100 meters ahead, turn right, be close XX", but the vehicle that obtains this moment is traveling at a high speed, and the direction of travel is from south to north, can't turn right, because the broadcast information content does not match with vehicle direction of travel this moment, and this drill news is invalid to this vehicle, then need not to report this drill news, can directly delete this broadcast information.
Or,
if the survival time TTL is not out of date, but the broadcast information content is not matched with the vehicle running direction and is not matched with the vehicle running route, the TTS broadcast is not executed;
for example, broadcast information is still in the time of survival, and broadcast information content is: "200 meters in the place ahead, XX way, there is the traffic accident", but the vehicle direction of travel who acquires this moment is the right turn, and broadcast information content and vehicle direction of travel mismatch this moment, can further judge vehicle driving route, if vehicle driving route is after the right turn around the overpass after to the north straight line arrive XX way, the judgement result is for agreeing with vehicle driving route, need carry out the report to make the user receive this and report information, acquire effective information. If the vehicle driving route deviates from the XX route after right-hand turning, the judgment result is that the vehicle driving route is not accordant with the judgment result, and the broadcasting information does not need to be broadcasted at the moment and can be directly deleted.
Or,
and if the Time To Live (TTL) is not out of date, the broadcast information content is matched with the vehicle running direction, but the distance between the position information of the place in the broadcast information content and the current position of the vehicle exceeds a preset distance, the TTS broadcast is not executed.
For example, broadcast information is still in the time of survival, and broadcast information content is: "the place ahead road is through the gas station", and the vehicle direction of travel matches with this report information content, nevertheless because the vehicle speed of travel is very fast, judges that has missed this gas station position, then need not to report this drill report information, directly deletes this report information.
The combination of the above-mentioned various parameters is only an exemplary example, and for specific judgment conditions, such as whether TTL is out of time, whether the broadcast information content matches the vehicle driving direction is judged, whether the position information corresponding to the vehicle and the position where the vehicle is located exceed a predetermined distance is judged, whether the broadcast information content conforms to the vehicle driving route is judged, different execution priorities can be set for the above conditions based on actual application, and various combination modes are adopted to perform dynamic adjustment of TTS broadcast.
For a plurality of broadcast messages meeting the broadcast execution condition, the priority level of the broadcast messages can be set;
in particular, the amount of the solvent to be used,
when a plurality of broadcast messages exist and the broadcast messages are reminding messages, calculating the weight according to the sending time and the survival time TTL of the broadcast messages, setting the priority level according to the weight, sequencing reminding message queues according to the priority level, and broadcasting in sequence;
when a plurality of broadcast information exist and the broadcast information is instruction feedback type information, grouping the broadcast information according to the relevancy and the sending time of the broadcast information and calculating grouping weight, determining the intra-group information weight of the broadcast information in the group according to the sending time for the broadcast information in the group, and respectively setting the intra-group broadcast priority level of the broadcast information in the group and the packet broadcast priority level of the broadcast information in the group according to the size of the intra-group information weight and the size of the grouping weight; and according to the packet broadcasting priority of the broadcasting information packet, performing packet queue sequencing on the broadcasting information packet, and broadcasting the broadcasting information with the highest broadcasting priority in each packet in sequence.
Example two
Based on the same concept as the method for dynamically adjusting TTS broadcast in the foregoing embodiment, an embodiment of the present invention further provides a device for dynamically adjusting TTS broadcast, and with reference to fig. 3, the device includes but is not limited to:
the receiving module is used for receiving one or more TTS broadcast messages;
the first broadcast parameter acquisition module analyzes the broadcast information and determines a first broadcast parameter, wherein the first broadcast parameter comprises the Time To Live (TTL);
the second broadcast parameter acquisition module is used for determining a second broadcast parameter according to the current state of the vehicle, wherein the second broadcast parameter comprises the driving direction of the vehicle;
the judging module is used for determining whether to execute TTS broadcast or not according to the first broadcast parameter and the second broadcast parameter;
and the control module executes or does not execute TTS broadcast according to the judgment result of the judgment module.
In particular, the time-to-live, TTL, is determined according to at least any one of:
-analyzing the broadcast information to directly obtain the time to live TTL, wherein the broadcast information carries the time to live TTL;
-analyzing the broadcast information to obtain the broadcast information type corresponding to the broadcast information, so as to determine the time to live TTL according to the broadcast information type.
For example, the broadcast information can be classified according to the broadcast information content by analyzing TTS broadcast information, such as reminding information or instruction feedback information; the reminding information can be classified into common reminding information and emergency reminding information; inquiring a TTL inquiry table corresponding to the classified information aiming at different classified information so as to determine the TTL of the broadcast information;
or, the information type can be directly carried in the TTS broadcast information, and a TTL query table corresponding to the classified information is queried for different classified information, so as to determine the TTL of the broadcast information;
or, the TTS broadcast information carries the information type and the TTL at the same time.
Specifically, whether the broadcast information exceeds TTL is judged, and if the broadcast information exceeds TTL, the broadcast information is deleted.
Specifically, the first broadcast parameter further includes broadcast information content; the second broadcast parameter further includes a vehicle travel route, and/or a current vehicle location.
Specifically, the judging module is further used for
Whether to perform TTS broadcasting is determined based on:
if the survival time TTL is not out of date, but the broadcast information content is not matched with the vehicle running direction, the TTS broadcast is not executed;
and/or the presence of a gas in the gas,
if the survival time TTL is not out of date, but the broadcast information content is not matched with the vehicle running direction and is not matched with the vehicle running route, the TTS broadcast is not executed;
and/or the presence of a gas in the gas,
and if the Time To Live (TTL) is not out of date, the broadcast information content is matched with the vehicle running direction, but the distance between the position information of the place in the broadcast information content and the current position of the vehicle exceeds a preset distance, the TTS broadcast is not executed.
The combination of the above-mentioned various parameters is only an exemplary example, and for specific judgment conditions, such as whether TTL is out of time, whether the broadcast information content matches the vehicle driving direction is judged, whether the position information corresponding to the vehicle and the position where the vehicle is located exceed a predetermined distance is judged, whether the broadcast information content conforms to the vehicle driving route is judged, different execution priorities can be set for the above conditions based on actual application, and various combination modes are adopted to perform dynamic adjustment of TTS broadcast.
For a plurality of broadcast messages meeting the broadcast execution condition, the priority level of the broadcast messages can be set;
in particular, the device further comprises a weight calculation module,
the first broadcast parameter acquisition module is further used for sending the determined broadcast information category to the weight calculation module;
when a plurality of broadcast messages exist and the broadcast messages are reminding messages, calculating the weight according to the sending time and the survival time TTL of the broadcast messages, setting the priority level according to the weight, sequencing reminding message queues according to the priority level, and broadcasting in sequence;
when a plurality of broadcast information exist and the broadcast information is instruction feedback type information, grouping the broadcast information according to the relevancy and the sending time of the broadcast information and calculating grouping weight, determining the intra-group information weight of the broadcast information in the group according to the sending time for the broadcast information in the group, and respectively setting the intra-group broadcast priority level of the broadcast information in the group and the packet broadcast priority level of the broadcast information in the group according to the size of the intra-group information weight and the size of the grouping weight; and according to the packet broadcasting priority of the broadcasting information packet, performing packet queue sequencing on the broadcasting information packet, and broadcasting the broadcasting information with the highest broadcasting priority in each packet in sequence.
Based on the same concept as the information push method in the foregoing embodiment, an embodiment of the present invention further provides a terminal device, where the terminal includes the device for dynamically adjusting TTS broadcast in the foregoing second embodiment.
Specifically, the terminal device may be a computer, a tablet computer, a mobile phone, a smart assistant, a vehicle-mounted terminal, and the like.
Based on the same concept as that of the dynamically adjusting TTS broadcast method in the foregoing embodiment, an embodiment of the present invention further provides a computer device, where the computer device includes a processor and a memory, where a computer program capable of running on the processor is stored in the memory, and when the computer program is executed by the processor, the computer device implements the dynamically adjusting TTS broadcast method.
Based on the same concept as the information push method in the foregoing embodiment, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program operable on a processor is stored in the computer-readable storage medium, and when the computer program is executed, the method for dynamically adjusting TTS broadcast is implemented.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, it should be noted that, for those skilled in the art, many modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.