Voice broadcast method and device, electronic device, and storage medium

By encoding and synthesising the target information set and identifying serial number continuity subsequences, the existing cumbersome voice broadcasting methods are solved, concise and efficient voice broadcasting is achieved, and user experience is improved.

CN115312025BActive Publication Date: 2025-08-08GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210910027.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2025-08-08
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

The existing voice broadcasting methods are relatively cumbersome and have poor user experience, so it is impossible to effectively analyze the particularity of matters to be broadcasted.

Method used

By encoding the target information set, an encoding sequence is formed, and a subsequence with the same encoding value and serial number continuity is found, the information to be broadcast is synthesized, and the voice broadcast is performed.

Benefits of technology

Simplify voice broadcast information, improve user experience, optimize broadcast time, and ensure that the amount of information is not lost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115312025B_ABST
    Figure CN115312025B_ABST
Patent Text Reader

Abstract

The present invention provides a voice broadcast method and device, an electronic device, and a storage medium. The method comprises: obtaining a target information set, wherein the target information set contains multiple information, and the multiple information contains information to be broadcast; encoding each information in the target information set to obtain a code value corresponding to each information to form a code sequence, wherein each code value in the code sequence corresponds to a sequence number; finding a subsequence from the code sequence with the same code value and continuous sequence number; synthesizing the information to be broadcast contained in the subsequence to obtain synthesized information; and voice broadcasting the synthesized information. The present invention solves the problem that the existing voice broadcast method in the related art is relatively cumbersome and has a poor user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of voice control technology, and in particular to a voice broadcasting method and device, electronic equipment, and storage medium. Background Art

[0002] In related technologies, the way events are played back provides a mediocre user experience. For example, if an alarm is set to go off at a certain time on Monday, Tuesday, Wednesday, Thursday, Friday, or Saturday, the system's voice announcement fails to analyze the specificity of the event being announced. Instead, it mechanically announces the alarm at a certain time on Monday, Tuesday, Wednesday, Thursday, Friday, or Saturday, which is not user-friendly.

[0003] In other words, the existing voice broadcasting method is relatively cumbersome and has the problem of poor user experience. Summary of the Invention

[0004] In view of the above problems, the present invention proposes a voice broadcast method and device, an electronic device, and a storage medium to at least solve the technical problems in the related art that the existing voice broadcast method is relatively cumbersome and has a poor user experience.

[0005] In a first aspect, a voice broadcast method is provided, comprising:

[0006] Acquire a target information set, wherein the target information set contains multiple information, and the multiple information contains information to be broadcast;

[0007] By encoding each information in the target information set, a code value corresponding to each information is obtained to form a code sequence, wherein each code value in the code sequence corresponds to a sequence number;

[0008] Finding subsequences with the same code value and continuous sequence numbers from the code sequence;

[0009] synthesizing the information to be broadcast contained in the subsequence to obtain synthesized information;

[0010] The synthesized information is voice broadcasted.

[0011] Optionally, encoding each information in the target information set to obtain a coding value corresponding to each information to form a coding sequence includes:

[0012] Counting the total number of all information in the target information set;

[0013] sorting each information in the target information set based on the total number to obtain a sorted set, wherein each information in the sorted set corresponds to a sequence number;

[0014] The information corresponding to each sequence number in the sorted set is encoded to obtain the encoding sequence.

[0015] Optionally, encoding the information corresponding to each sequence number in the sorted set to obtain the encoded sequence includes:

[0016] A binary encoding method is used to encode the information to be broadcast in the sorted set into a first encoding value, and to encode the information other than the information to be broadcast in the sorted set into a second encoding value, wherein the first encoding value and the second encoding value are different values.

[0017] Optionally, searching for subsequences with the same code value and continuous sequence numbers from the code sequence includes:

[0018] Comparing each code value in the code sequence with a preset code value in sequence, wherein the preset code value is used to indicate information to be broadcast;

[0019] When it is detected for the first time that the first code value in the code sequence is the same as the preset code value, the sequence number corresponding to the first code value is recorded as the first sequence number, and the comparison between the next code value and the preset code value is continued;

[0020] Until it is detected that the second code value in the code sequence is different from the preset code value, the sequence number corresponding to the third code value before the second code value is recorded as the last sequence number;

[0021] A first sequence consisting of the first code value, the code value between the first sequence number and the last sequence number, and the third code value is used as the subsequence.

[0022] Optionally, there are multiple subsequences, and after detecting that the second code value in the code sequence is different from the preset code value, the method further includes:

[0023] Continuing to compare a fourth code value whose sequence number is subsequent to the second code value in the code sequence with the preset code value;

[0024] If the fourth code value is the same as the preset code value, the sequence number corresponding to the fourth code value is recorded as the second first sequence number;

[0025] Until it is detected that the fifth code value in the code sequence is different from the preset code value, the sequence number corresponding to the sixth code value before the fifth code value is recorded as the second last sequence number;

[0026] The fourth code value, the code value between the second first sequence number and the second last sequence number, and the sixth code value are combined into a second sequence to identify multiple subsequences in the code sequence.

[0027] Optionally, the subsequence includes a plurality of information to be broadcast, and synthesizing the information to be broadcast included in the subsequence to obtain synthesized information includes:

[0028] Analyze the semantic features of each information to be broadcast;

[0029] According to the semantic features of each piece of information to be broadcast and the continuity of the sequence number, the plurality of pieces of information to be broadcast are semantically combined to obtain the synthesized information.

[0030] Optionally, there are multiple subsequences, and after synthesizing the information to be broadcast contained in the subsequences to obtain the synthesized information, the method further includes:

[0031] Sort and combine multiple pieces of synthetic information corresponding to the multiple subsequences to obtain combined information;

[0032] The combined information is voice broadcasted.

[0033] In a second aspect, a voice broadcasting device is provided, comprising:

[0034] An acquisition module, configured to acquire a target information set, wherein the target information set includes a plurality of information, and the plurality of information includes information to be broadcast;

[0035] an encoding module, configured to encode each information in the target information set to obtain a code value corresponding to each information, so as to form a code sequence, wherein each code value in the code sequence corresponds to a sequence number;

[0036] A search module, configured to search the coding sequence for subsequences having the same coding value and continuous sequence numbers;

[0037] a synthesis module, configured to synthesize the information to be broadcast contained in the subsequence to obtain synthesized information;

[0038] The first broadcasting module is used to perform voice broadcasting on the synthesized information.

[0039] Optionally, the encoding module includes:

[0040] A statistical unit, configured to count the total number of all information in the target information set;

[0041] a sorting unit, configured to sort each information in the target information set based on the total number to obtain a sorted set, wherein each information in the sorted set corresponds to a sequence number;

[0042] The encoding unit is used to encode the information corresponding to each sequence number in the sorted set to obtain the encoding sequence.

[0043] Optionally, the encoding unit is used to: use a binary encoding method to encode the information to be broadcast in the sorted set into a first coding value, and encode the information other than the information to be broadcast in the multiple information in the sorted set into a second coding value, wherein the first coding value and the second coding value are different numerical values.

[0044] Optionally, the search module includes:

[0045] a first comparing unit, configured to sequentially compare each code value in the code sequence with a preset code value, wherein the preset code value is used to indicate information to be broadcast;

[0046] a first recording unit configured to, when it is first detected that a first code value in the code sequence is identical to the preset code value, record the sequence number corresponding to the first code value as the first sequence number, and proceed to compare the next code value with the preset code value;

[0047] a second recording unit, configured to record, until it is detected that the second code value in the code sequence is different from the preset code value, the sequence number corresponding to the third code value preceding the second code value as the last sequence number;

[0048] The first determining unit is configured to use a first sequence consisting of the first coding value, the coding value between the first sequence number and the last sequence number, and the third coding value as the subsequence.

[0049] Optionally, there are multiple subsequences, and after detecting that the second coding value in the coding sequence is different from the preset coding value, the apparatus further includes:

[0050] a second comparing unit, configured to continue comparing a fourth code value whose sequence number is subsequent to the second code value in the code sequence with the preset code value;

[0051] a third recording unit, configured to, when the fourth coding value is the same as the preset coding value, record the sequence number corresponding to the fourth coding value as the second first sequence number;

[0052] a fourth recording unit, configured to record, until it is detected that the fifth code value in the code sequence is different from the preset code value, the sequence number corresponding to the sixth code value preceding the fifth code value as the second last sequence number;

[0053] The second determining unit is configured to form a second sequence by combining the fourth coding value, the coding value between the second first sequence number and the second last sequence number, and the sixth coding value to identify a plurality of subsequences in the coding sequence.

[0054] Optionally, the subsequence includes a plurality of information to be broadcast, and the synthesis module includes:

[0055] An analysis unit, used for analyzing the semantic features of each information to be broadcast;

[0056] The combining unit is configured to semantically combine the plurality of information to be broadcast according to the semantic features and sequence number continuity of each information to be broadcast, so as to obtain the synthesized information.

[0057] Optionally, there are multiple subsequences, and after synthesizing the information to be broadcast contained in the subsequences to obtain the synthesized information, the apparatus further includes:

[0058] A combination module, used for sorting and combining multiple synthetic information corresponding to multiple subsequences to obtain combined information;

[0059] The second broadcasting module is used to perform voice broadcasting on the combined information.

[0060] In a third aspect, an electronic device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in the above method embodiment.

[0061] In a fourth aspect, a storage medium is further provided, wherein a computer program is stored in the storage medium, wherein the computer program is configured to execute the steps in the above-mentioned device embodiment when running.

[0062] The voice broadcast method provided by the embodiment of the present invention first obtains a target information set containing information to be broadcast; then, encodes each information in the target information set to obtain a coding sequence, and each coding value in the coding sequence corresponds to a serial number; then, finds a subsequence with the same coding value and serial number continuity from the coding sequence; synthesizes the information to be broadcast contained in the subsequence to obtain synthesized information, analyzes the data continuity in the information to be broadcast, and synthesizes the information to be broadcast; finally, voice broadcasts the synthesized information, simplifies the information to be broadcast, and voice broadcasts the simplified information, thereby solving the problem that the existing voice broadcast method in the related technology is relatively cumbersome, and achieving the effect of improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments of the present invention.

[0064] Figure 1 This is a flow chart of a voice broadcasting method provided according to an embodiment of the present invention;

[0065] Figure 2 This is a flow chart of a voice broadcast optimization solution provided according to an embodiment of the present invention;

[0066] Figure 3 This is a specific flow chart of a voice broadcast example provided according to an embodiment of the present invention;

[0067] Figure 4 This is a flow chart of a voice broadcast solution provided according to a specific embodiment of the present invention;

[0068] Figure 5 This is a structural block diagram of a voice broadcasting device provided according to an embodiment of the present invention;

[0069] Figure 6 is a structural diagram of an electronic device provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0070] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0071] It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that such terms are interchangeable where appropriate, such that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein. Furthermore, the term "including" and its variations are to be interpreted as open-ended terms meaning "including but not limited to."

[0072] To address the technical problems existing in the related art, a voice broadcast method is provided in this embodiment. The technical solution of the present invention and how it solves the above-mentioned technical problems are described in detail below using specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0073] The present invention provides a voice broadcast method and device, an electronic device, and a storage medium. The method provided in the embodiments of the present invention can be applied to any required electronic device, for example, it can be an electronic device such as a server or a terminal. No specific limitation is made here. For the convenience of description, it is referred to as an electronic device in the following.

[0074] Figure 1 : is a flow chart of a voice broadcast method provided according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0075] Step S102: obtaining a target information set, wherein the target information set contains multiple information, and the multiple information contains information to be broadcast;

[0076] The information to be reported in this embodiment may be matters to be reported or data to be reported, and the target information set may be a set of matters to be reported or data to be reported;

[0077] Step S104: Encoding each information in the target information set to obtain a code value corresponding to each information to form a code sequence, wherein each code value in the code sequence corresponds to a sequence number;

[0078] Step S106, searching the encoding sequence for subsequences with the same encoding value and continuous sequence numbers;

[0079] Step S108, synthesizing the information to be broadcast contained in the subsequence to obtain synthesized information;

[0080] Step S110: Voice broadcast the synthesized information.

[0081] In an optional embodiment of the present case, Figure 2 This is a flow chart of an optimization solution for voice broadcasting according to an embodiment of the present invention. Figure 2 As shown, the system data is acquired and then information is extracted from the system data. The extracted information is processed to analyze its data characteristics. Then, based on the data characteristics, the data structure is synthesized to simplify the complex system data, obtaining a synthesis result. The synthesis result is output and voice broadcasted. Within a specific scenario, sequential playback is upgraded to continuous sequence recognition, providing a more intuitive experience and saving time without losing information. This achieves the beneficial effect of intelligent broadcasting of system data.

[0082] The voice broadcast method provided by the embodiment of the present invention first obtains a target information set containing information to be broadcast; then, encodes each information in the target information set to obtain a coding sequence, and each coding value in the coding sequence corresponds to a serial number; then, finds a subsequence with the same coding value and serial number continuity from the coding sequence; synthesizes the information to be broadcast contained in the subsequence to obtain synthesized information, analyzes the data continuity in the information to be broadcast, and synthesizes the information to be broadcast; finally, voice broadcasts the synthesized information, simplifies the information to be broadcast, and voice broadcasts the simplified information, thereby solving the problem that the existing voice broadcast method in the related technology is relatively cumbersome, and achieving the effect of improving user experience.

[0083] A possible implementation method is provided in an embodiment of the present invention, and the above-mentioned step S104 includes: counting the total number of all information in the target information set; sorting each information in the target information set based on the total number to obtain a sorted set, wherein each information in the sorted set corresponds to a serial number; encoding the information corresponding to each serial number in the sorted set to obtain a coding sequence.

[0084] Taking a mobile phone alarm as an example, there are seven days in a week. When setting an alarm for Monday through Wednesday, three of the seven days are to-be-announced, and four are to-be-announced. The system algorithm first counts the total number of system data, which is seven. Then, based on the total number, each alarm is assigned a sequence number to sort the alarms. Each sorted alarm is then encoded to produce the aforementioned code sequence. Furthermore, a binary encoding scheme is employed to encode the to-be-announced information in the sorted set as a first code value, and the information in the sorted set other than the to-be-announced information as a second code value, where the first and second code values are different values.

[0085] According to the above embodiment, a binary coding strategy is adopted to encode each sorted alarm clock, that is, the alarm clock is set on Monday, Tuesday and Wednesday, which is the information to be broadcast, and is encoded using the code value 1 (that is, the above-mentioned first code value). There is no alarm clock on Thursday, Friday, Saturday and Sunday, and no broadcast is required, and the code value 0 (that is, the above-mentioned second code value) is used for encoding. The resulting sorted and encoded code sequence is [1,1,1,0,0,0,0], where the sequence numbers are [1,2,3,4,5,6,7].

[0086] This enables data value processing of reported matters, and allows for a more intuitive analysis of the data characteristics and particularities of system data.

[0087] In specific implementation, the above step S108 includes: comparing each code value in the code sequence with the preset code value in turn, wherein the preset code value is used to indicate the information to be broadcast; when it is first detected that the first code value in the code sequence is the same as the preset code value, the sequence number corresponding to the first code value is recorded as the first sequence number, and the comparison between the next code value and the preset code value is continued; until it is detected that the second code value in the code sequence is different from the preset code value, the sequence number corresponding to the third code value before the second code value is recorded as the last sequence number; the first sequence consisting of the first code value, the code value between the first sequence number and the last sequence number, and the third code value is used as a subsequence.

[0088] Still taking the mobile phone alarm clock as an example, Figure 3 This is a specific flow chart of a voice broadcast example provided according to an embodiment of the present invention. Figure 3 As shown, there are seven days in a week. When setting an alarm from Monday to Wednesday, the system algorithm first counts the total number of system data to form a coded sequence after sorting and encoding, namely [1,1,1,0,0,0,0], where the sequence numbers are [1,2,3,4,5,6,7]; then, by analyzing the data characteristics of the system data, the elements of the first three items in the coded sequence are 1, that is, 1,2,3 are found to be consecutive 1s; then, the corresponding alarms for Monday, Tuesday, and Wednesday are synthesized to obtain Monday to Wednesday, thereby finding the subsequence to be broadcast from the coded sequence. If the existing voice broadcast method is used to broadcast the system data, when the system algorithm queries the alarm, it will broadcast that there is an alarm at a certain time on Monday, Tuesday, and Wednesday, which has a poor user experience. However, through the embodiment of the present invention, when the system algorithm queries the alarm, it will broadcast that there is an alarm at a certain time on Monday to Wednesday, which simplifies the information of the voice broadcast.

[0089] Furthermore, there are multiple subsequences. After detecting that the second coding value in the coding sequence is different from the preset coding value, continue to compare the fourth coding value whose sequence number follows the second coding value in the coding sequence with the preset coding value; if the fourth coding value is the same as the preset coding value, then record the sequence number corresponding to the fourth coding value as the second first sequence number; until detecting that the fifth coding value in the coding sequence is different from the preset coding value, then record the sequence number corresponding to the sixth coding value before the fifth coding value as the second last sequence number; the fourth coding value, the coding values between the second first sequence number and the second last sequence number, and the sixth coding value form a second sequence to identify multiple subsequences in the coding sequence.

[0090] In this embodiment, the beneficial effects of the embodiment of the present invention will be clearly reflected, especially when applied in similar scenarios and processing more big data. For example, when 70 numbers are selected from 100 numbers for broadcast, the subsequences found are [1-30][40-45][60-74][75-96]. That is, multiple subsequences are found through the above method, so that the method of broadcasting multiple subsequences is simplified, and the experience and broadcasting time of this solution will be well optimized.

[0091] Furthermore, the subsequence includes a plurality of information to be broadcasted, and by analyzing the semantic features of each information to be broadcasted and according to the semantic features of each information to be broadcasted and the continuity of the sequence numbers, the plurality of information to be broadcasted are semantically combined to obtain the synthesized information.

[0092] Taking the example of selecting 30 numbers from 100 numbers for broadcast, according to the traditional broadcasting method, the system will broadcast 30 times, broadcasting the 30 numbers in sequence. Through the embodiment of the present invention, if it is analyzed that there is a sequence of continuous numbers in the 30 numbers, that is, [1-30], the 30 numbers can be broadcasted by broadcasting once, and the output broadcast result is optimized while ensuring that the amount of information is completed.

[0093] Optionally, there are multiple subsequences, and multiple pieces of synthetic information corresponding to the multiple subsequences are sorted and combined to obtain combined information; and the combined information is voice broadcasted.

[0094] Taking the example of selecting 70 numbers from 100 numbers for broadcast, if analysis shows that there are multiple sequences of consecutive numbers among the 70 numbers, namely [1-30][40-45][60-74][75-96], the 70 numbers can be broadcasted four times, and the output broadcast can be optimized while ensuring that the amount of information is complete.

[0095] The embodiment of the present invention optimizes the output results while ensuring the integrity of the information by analyzing data features; and optimizes the broadcast system by using the formulated rules. Taking mobile phones as an example, consecutive dates are assembled into a more concise language for broadcast without losing information, which has a good effect on user experience. In other scenarios with large data volumes, the time benefits brought are also obvious.

[0096] The solution provided by the embodiment of the present invention is further described below with reference to a specific embodiment:

[0097] Figure 4 : is a flow chart of a voice broadcast solution according to a specific embodiment of the present invention. Figure 4As shown in the figure, the system will announce a total of 15 people, of which 8 are selected. If the announcement is made in the traditional way, it will be announced one by one from No. 1, No. 2, No. 3, No. 8, etc. After optimization according to this system, it will be announced in the order of No. 1 to No. 3, No. 8 to No. 10, No. 14 to No. 15, etc.

[0098] The specific implementation process is as follows:

[0099] First, we count the total number of data points to 15 and create an initial data set of size 15. The selected data points are set to 1, resulting in a data set consisting of 0s and 1s. We then label each data point with a sequence number from 1 to 15, marking the first sequence number with 1, to obtain the aforementioned coded sequence. We then examine the data points after this sequence until they are unselected (i.e., information that does not need to be broadcasted). The sequence numbers from the first sequence number to this point are recorded, which are 1 to 3. We then use the same method to examine subsequent data points, ultimately obtaining the data points [1-3] [8-10] [14-15]. Finally, we synthesize these data points and broadcast them.

[0100] This is just a simple example. The larger the total amount of data and the more data is selected continuously, the more obvious the improvement in experience and time brought by the output optimized by this system will be, and it will not cause the loss of output information. Specific continuous rules can be set according to specific scenarios.

[0101] Through the above-mentioned implementation steps, the embodiments of the present invention can achieve significant improvements in the experience and time of receiving system broadcasts. Within a specific scenario, it can be upgraded from sequential playback to continuous sequential recognition, bringing a more intuitive experience and time saving without losing information.

[0102] Based on the voice broadcast method provided in each of the above embodiments, based on the same inventive concept, a voice broadcast device is also provided in this embodiment, which is used to implement the above embodiments and preferred embodiments, and the details already described will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and contemplated.

[0103] Figure 5 is a structural block diagram of a voice broadcasting device provided according to an embodiment of the present invention. Figure 5 As shown, the device includes:

[0104] An acquisition module 50 is used to acquire a target information set, wherein the target information set contains multiple information, and the multiple information contains information to be broadcast;

[0105] The encoding module 52 is connected to the acquisition module 50 and is used to encode each information in the target information set to obtain a code value corresponding to each information to form a code sequence, wherein each code value in the code sequence corresponds to a sequence number;

[0106] A search module 54, connected to the encoding module 52, is used to search for subsequences with the same encoding value and continuous sequence numbers from the encoding sequence;

[0107] A synthesis module 56, connected to the search module 54, is used to synthesize the information to be broadcast contained in the subsequence to obtain synthesized information;

[0108] The first broadcasting module 58 is connected to the synthesis module 56 and is used to perform voice broadcasting on the synthesized information.

[0109] Optionally, the encoding module 52 includes:

[0110] A statistical unit, used to count the total number of all information in the target information set;

[0111] a sorting unit, configured to sort each information in the target information set based on the total quantity to obtain a sorted set, wherein each information in the sorted set corresponds to a sequence number;

[0112] The encoding unit is used to encode the information corresponding to each sequence number in the sorted set to obtain a coding sequence.

[0113] Optionally, the encoding unit is used to: use a binary encoding method to encode the information to be broadcast in the sorted set into a first coding value, and encode the information other than the information to be broadcast in the multiple information in the sorted set into a second coding value, wherein the first coding value and the second coding value are different values.

[0114] Optionally, the search module 54 includes:

[0115] A first comparison unit is configured to sequentially compare each code value in the code sequence with a preset code value, wherein the preset code value is used to indicate information to be broadcast;

[0116] A first recording unit is configured to record the sequence number corresponding to the first code value as the first sequence number when it is first detected that the first code value in the code sequence is the same as the preset code value, and to proceed with the comparison between the next code value and the preset code value;

[0117] A second recording unit is configured to record the sequence number corresponding to the third code value preceding the second code value as the last sequence number until it is detected that the second code value in the code sequence is different from the preset code value;

[0118] The first determining unit is configured to use a first sequence consisting of the first coding value, the coding value between the first sequence number and the last sequence number, and the third coding value as a subsequence.

[0119] Optionally, there are multiple subsequences, and after detecting that the second coding value in the coding sequence is different from the preset coding value, the apparatus further includes:

[0120] a second comparing unit, configured to continue comparing a fourth code value whose sequence number follows the second code value in the code sequence with the preset code value;

[0121] a third recording unit, configured to record, when the fourth coding value is the same as the preset coding value, the sequence number corresponding to the fourth coding value as the second first sequence number;

[0122] a fourth recording unit, configured to record the sequence number corresponding to the sixth code value preceding the fifth code value as the second last sequence number until it is detected that the fifth code value in the code sequence is different from the preset code value;

[0123] The second determining unit is configured to combine the fourth code value, the code value between the second first sequence number and the second last sequence number, and the sixth code value into a second sequence to identify a plurality of subsequences in the code sequence.

[0124] Optionally, the subsequence includes multiple pieces of information to be broadcast, and the synthesis module 56 includes:

[0125] An analysis unit, used for analyzing the semantic features of each information to be broadcast;

[0126] The combining unit is used to semantically combine multiple pieces of information to be broadcast according to the semantic features of each piece of information to be broadcast and the continuity of the sequence numbers to obtain synthesized information.

[0127] Optionally, there are multiple subsequences, and after synthesizing the information to be broadcast contained in the subsequences to obtain the synthesized information, the apparatus further includes:

[0128] A combination module, used for sorting and combining multiple synthetic information corresponding to multiple subsequences to obtain combined information;

[0129] The second broadcasting module is used for voice broadcasting of the combined information.

[0130] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0131] An embodiment of the present invention further provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0132] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0133] S1, obtaining a target information set, wherein the target information set contains multiple information, and the multiple information contains information to be broadcast;

[0134] S2, encoding each information in the target information set to obtain a code value corresponding to each information to form a code sequence, wherein each code value in the code sequence corresponds to a sequence number;

[0135] S3, searching for subsequences with the same code value and continuous sequence numbers from the code sequence;

[0136] S4, synthesizing the information to be broadcast contained in the subsequence to obtain synthesized information;

[0137] S5, voice broadcasting the synthesized information.

[0138] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0139] Based on the above Figure 1 The method shown and Figure 5 In order to achieve the above-mentioned purpose, the embodiment of the present invention further provides an electronic device, such as Figure 6 As shown, the system includes a memory 52 and a processor 51, wherein the memory 52 and the processor 51 are both arranged on a bus 53. The memory 52 stores a computer program, and the processor 51 executes the computer program to realize Figure 1 The voice broadcast method shown.

[0140] Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a memory (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various implementation scenarios of the present invention.

[0141] Optionally, the device may also be connected to a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a Wi-Fi module, and the like. The user interface may include a display, an input unit such as a keyboard, and the like. Optional user interfaces may also include a USB interface, a card reader interface, and the like. Optionally, the network interface may include a standard wired interface, a wireless interface (such as a Bluetooth interface, a Wi-Fi interface), and the like.

[0142] Those skilled in the art will understand that the structure of an electronic device provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different component arrangements.

[0143] Optionally, specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0144] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, centralized on a single computing device, or distributed across a network of multiple computing devices. Alternatively, they can be implemented using program code executable by a computing device, which can then be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0145] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A voice broadcast method, characterized in that: The method comprises: Acquire a target information set, wherein the target information set contains multiple information, and the multiple information contains information to be broadcast; By encoding each information in the target information set, a code value corresponding to each information is obtained to form a code sequence, wherein each code value in the code sequence corresponds to a sequence number; Finding subsequences with the same code value and continuous sequence numbers from the code sequence; synthesizing the information to be broadcast contained in the subsequence to obtain synthesized information; Performing voice broadcasting on the synthesized information; The encoding of each information in the target information set to obtain a code value corresponding to each information to form a code sequence includes: counting the total number of all information in the target information set; sorting each information in the target information set based on the total number to obtain a sorted set, wherein each information in the sorted set corresponds to a sequence number; and encoding the information corresponding to each sequence number in the sorted set to obtain the code sequence. Among them, the method of finding a subsequence with the same coding value and serial number continuity from the coding sequence includes: comparing each coding value in the coding sequence with a preset coding value in turn, wherein the preset coding value is used to indicate the information to be broadcast; when it is first detected that the first coding value in the coding sequence is the same as the preset coding value, the serial number corresponding to the first coding value is recorded as the first serial number, and the comparison between the next coding value and the preset coding value is continued; until it is detected that the second coding value in the coding sequence is different from the preset coding value, the serial number corresponding to the third coding value before the second coding value is recorded as the last serial number; and the first sequence consisting of the first coding value, the coding value between the first serial number and the last serial number, and the third coding value is used as the subsequence.

2. The method according to claim 1, characterized in that The encoding of the information corresponding to each sequence number in the sorted set to obtain the encoding sequence includes: A binary encoding method is used to encode the information to be broadcast in the sorted set into a first encoding value, and to encode the information in the sorted set other than the information to be broadcast into a second encoding value, wherein the first encoding value and the second encoding value are different values.

3. The method according to claim 1, characterized in that There are multiple subsequences, and after detecting that a second code value in the code sequence is different from the preset code value, the method further includes: Continuing to compare a fourth code value whose sequence number is subsequent to the second code value in the code sequence with the preset code value; If the fourth code value is the same as the preset code value, the sequence number corresponding to the fourth code value is recorded as the second first sequence number; Until it is detected that the fifth code value in the code sequence is different from the preset code value, the sequence number corresponding to the sixth code value before the fifth code value is recorded as the second last sequence number; The fourth code value, the code value between the second first sequence number and the second last sequence number, and the sixth code value are combined into a second sequence to identify multiple subsequences in the code sequence.

4. The method according to claim 1, wherein The subsequence includes a plurality of information to be broadcasted, and synthesizing the information to be broadcasted included in the subsequence to obtain synthesized information includes: Analyze the semantic features of each information to be broadcast; According to the semantic features of each piece of information to be broadcast and the continuity of the sequence number, the plurality of pieces of information to be broadcast are semantically combined to obtain the synthesized information.

5. The method according to claim 4, characterized in that There are multiple subsequences, and after synthesizing the information to be broadcast contained in the subsequences to obtain the synthesized information, the method further includes: Sort and combine multiple pieces of synthetic information corresponding to the multiple subsequences to obtain combined information; The combined information is voice broadcasted.

6. A voice broadcasting device, characterized in that: The device comprises: An acquisition module, configured to acquire a target information set, wherein the target information set includes a plurality of information, and the plurality of information includes information to be broadcast; an encoding module, configured to encode each information in the target information set to obtain a code value corresponding to each information, so as to form a code sequence, wherein each code value in the code sequence corresponds to a sequence number; A search module, configured to search the coding sequence for subsequences having the same coding value and continuous sequence numbers; a synthesis module, configured to synthesize the information to be broadcast contained in the subsequence to obtain synthesized information; A first broadcasting module, configured to perform voice broadcasting of the synthesized information; The encoding of each information in the target information set to obtain a code value corresponding to each information to form a code sequence includes: counting the total number of all information in the target information set; sorting each information in the target information set based on the total number to obtain a sorted set, wherein each information in the sorted set corresponds to a sequence number; and encoding the information corresponding to each sequence number in the sorted set to obtain the code sequence. Among them, the method of finding a subsequence with the same coding value and serial number continuity from the coding sequence includes: comparing each coding value in the coding sequence with a preset coding value in turn, wherein the preset coding value is used to indicate the information to be broadcast; when it is first detected that the first coding value in the coding sequence is the same as the preset coding value, the serial number corresponding to the first coding value is recorded as the first serial number, and the comparison between the next coding value and the preset coding value is continued; until it is detected that the second coding value in the coding sequence is different from the preset coding value, the serial number corresponding to the third coding value before the second coding value is recorded as the last serial number; and the first sequence consisting of the first coding value, the coding value between the first serial number and the last serial number, and the third coding value is used as the subsequence.

7. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A storage medium having a computer program stored thereon, 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 5 are implemented.

Citation Information

Patent Citations

  • Method and device for broadcasting message through voice and medium

    CN113012679A

  • Voice broadcasting method and device, electronic equipment and storage medium

    CN113449141A