Voice processing method, device, storage medium and electronic equipment

文档序号:1467503 发布日期:2020-02-21 浏览:22次 中文

阅读说明:本技术 语音处理方法、装置、存储介质及电子设备 (Voice processing method, device, storage medium and electronic equipment ) 是由 陈岩 于 2018-08-08 设计创作,主要内容包括:本申请公开了一种语音处理方法、装置、存储介质及电子设备。该方法包括:获取用户的语音信息,所述语音信息包括第一关键词;根据电子设备的显示屏的显示状态获取预设关键词集合,所述显示状态包括锁定状态和解锁状态,所述预设关键词集合包括至少一个第二关键词;判断所述预设关键词集合中是否包括与所述第一关键词相同的第二关键词;若所述预设关键词集合中包括与所述第一关键词相同的第二关键词,则执行与所述第一关键词对应的操作指令。当电子设备中的预设关键词集合中的第二关键词与第一关键词相同时,使电子设备准确的在对应的显示状态下执行操作,并提高电子设备的唤醒率。(The application discloses a voice processing method, a voice processing device, a storage medium and electronic equipment. The method comprises the following steps: acquiring voice information of a user, wherein the voice information comprises a first keyword; acquiring a preset keyword set according to a display state of a display screen of the electronic equipment, wherein the display state comprises a locking state and an unlocking state, and the preset keyword set comprises at least one second keyword; judging whether a second keyword which is the same as the first keyword is included in the preset keyword set or not; and if the preset keyword set comprises a second keyword which is the same as the first keyword, executing an operation instruction corresponding to the first keyword. When a second keyword in a preset keyword set in the electronic equipment is the same as the first keyword, the electronic equipment can accurately execute operation in a corresponding display state, and the awakening rate of the electronic equipment is improved.)

1. A method of speech processing, comprising:

acquiring voice information of a user, wherein the voice information comprises a first keyword;

acquiring a preset keyword set according to a display state of a display screen of the electronic equipment, wherein the display state comprises a locking state and an unlocking state, and the preset keyword set comprises at least one second keyword;

judging whether a second keyword which is the same as the first keyword is included in the preset keyword set or not;

and if the preset keyword set comprises a second keyword which is the same as the first keyword, executing an operation instruction corresponding to the first keyword.

2. The voice processing method according to claim 1, wherein the step of obtaining the preset keyword set according to the display state of the display screen of the electronic device comprises:

if the display state of the display screen is a locking state, acquiring a first preset keyword set;

if the display state of the display screen is the unlocking state, determining the currently running foreground application;

and acquiring a second preset keyword set according to the foreground application and a preset corresponding relation, wherein the preset corresponding relation comprises a corresponding relation between the application and the preset keyword set.

3. The speech processing method according to claim 2, wherein the step of obtaining a second preset keyword set according to the foreground application and a preset correspondence comprises:

determining an application interface currently displayed by the foreground application;

and acquiring a second preset keyword set according to the foreground application, the application interface and a preset corresponding relation, wherein the preset corresponding relation comprises the corresponding relation among the application, the application interface and the preset keyword set.

4. The speech processing method according to claim 2, wherein the step of obtaining a second preset keyword set according to the foreground application and a preset correspondence comprises:

acquiring the current geographical position information of the electronic equipment;

and acquiring a second preset keyword set according to the foreground application, the geographic position information and a preset corresponding relation, wherein the preset corresponding relation comprises the corresponding relation among the application, the geographic position information and the preset keyword set.

5. The speech processing method according to any one of claims 1 to 4, wherein the first keyword comprises a first sub-keyword and a second sub-keyword;

the step of judging whether the preset keyword set comprises a second keyword which is the same as the first keyword comprises the following steps:

judging whether the preset keyword set comprises a third sub keyword which is the same as the first sub keyword and a fourth sub keyword which corresponds to the second sub keyword or not;

if the preset keyword set comprises a second keyword which is the same as the first keyword, executing an operation instruction corresponding to the first keyword, wherein the step comprises the following steps:

and if the keyword set comprises a third sub keyword which is the same as the first sub keyword and a fourth sub keyword which corresponds to the second sub keyword, executing an operation instruction corresponding to the first keyword.

6. The speech processing method according to any one of claims 1 to 4, wherein the step of obtaining the speech information of the user is preceded by the steps of:

acquiring training voice information of a user;

and training the training voice information to obtain a preset voice recognition model.

7. The speech processing method according to claim 6, wherein before the step of obtaining the preset keyword set according to the display state of the display screen of the electronic device, the method further comprises:

extracting voiceprint features of the user from the voice information;

matching the voiceprint features with the preset voice recognition model;

and when the voiceprint features are successfully matched with the preset voice recognition model, acquiring a preset keyword set according to the display state of a display screen of the electronic equipment.

8. A speech processing apparatus, comprising:

the first acquisition module is used for acquiring voice information of a user, wherein the voice information comprises a first keyword;

the second acquisition module is used for acquiring a preset keyword set according to a display state of a display screen of the electronic equipment, wherein the display state comprises a locking state and an unlocking state, and the preset keyword set comprises at least one second keyword;

the judging module is used for judging whether a second keyword which is the same as the first keyword is included in the preset keyword set or not;

and the execution module is used for executing an operation instruction corresponding to the first keyword if the preset keyword set comprises a second keyword which is the same as the first keyword.

9. A storage medium having stored therein a computer program which, when run on a computer, causes the computer to execute the speech processing method according to any one of claims 1 to 7.

10. An electronic device, characterized in that the electronic device comprises a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to execute the speech processing method according to any one of claims 1 to 7 by calling the computer program stored in the memory.

11. An electronic device, comprising a processor and a microphone electrically connected to the processor, wherein:

the microphone is used for acquiring voice information of a user, and the voice information comprises a first keyword;

the processor is configured to:

acquiring a preset keyword set according to a display state of a display screen of the electronic equipment, wherein the display state comprises a locking state and an unlocking state, and the preset keyword set comprises at least one second keyword;

judging whether a second keyword which is the same as the first keyword is included in the preset keyword set or not;

and if the preset keyword set comprises a second keyword which is the same as the first keyword, executing an operation instruction corresponding to the first keyword.

Technical Field

The present application relates to the field of speech recognition technologies, and in particular, to a speech processing method and apparatus, a storage medium, and an electronic device.

Background

With the rapid development of electronic technology, electronic devices such as smart phones have increasingly rich functions. For example, the voice processing function may support the user to operate the electronic device by voice. The voice processing function enables a better voice interaction experience for the user.

Currently, when receiving voice information of a user, electronic equipment often needs to include a fixed wakeup word in the voice information, and the electronic equipment can perform corresponding operations. That is, the electronic device needs to perform voice interaction according to the fixed wake-up word at any time, which results in a decrease in the wake-up rate of the electronic device.

Disclosure of Invention

The embodiment of the application provides a voice processing method, a voice processing device, a storage medium and an electronic device, which can improve the awakening rate of the electronic device.

An embodiment of the present application provides a speech processing method, including:

acquiring voice information of a user, wherein the voice information comprises a first keyword;

acquiring a preset keyword set according to a display state of a display screen of the electronic equipment, wherein the display state comprises a locking state and an unlocking state, and the preset keyword set comprises at least one second keyword;

judging whether a second keyword which is the same as the first keyword is included in the preset keyword set or not;

and if the preset keyword set comprises a second keyword which is the same as the first keyword, executing an operation instruction corresponding to the first keyword.

An embodiment of the present application further provides a speech processing apparatus, including:

the first acquisition module is used for acquiring voice information of a user, wherein the voice information comprises a first keyword;

the second acquisition module is used for acquiring a preset keyword set according to a display state of a display screen of the electronic equipment, wherein the display state comprises a locking state and an unlocking state, and the preset keyword set comprises at least one second keyword;

the judging module is used for judging whether a second keyword which is the same as the first keyword is included in the preset keyword set or not;

and the execution module is used for executing an operation instruction corresponding to the first keyword if the preset keyword set comprises a second keyword which is the same as the first keyword.

An embodiment of the present application further provides a storage medium, where a computer program is stored in the storage medium, and when the computer program runs on a computer, the computer is caused to execute the above-mentioned voice processing method.

The embodiment of the application also provides an electronic device, which comprises a processor and a memory, wherein a computer program is stored in the memory, and the processor is used for executing the voice processing method by calling the computer program stored in the memory.

An embodiment of the present application further provides an electronic device, including a processor and a microphone electrically connected to the processor, wherein:

the microphone is used for acquiring voice information of a user, and the voice information comprises a first keyword;

the processor is configured to:

acquiring a preset keyword set according to a display state of a display screen of the electronic equipment, wherein the display state comprises a locking state and an unlocking state, and the preset keyword set comprises at least one second keyword;

judging whether a second keyword which is the same as the first keyword is included in the preset keyword set or not;

and if the preset keyword set comprises a second keyword which is the same as the first keyword, executing an operation instruction corresponding to the first keyword.

The voice processing method provided by the embodiment of the application comprises the following steps: acquiring voice information of a user; acquiring a preset keyword set according to the display state of a display screen of the electronic equipment, wherein the preset keyword set comprises at least one second keyword; judging whether a second keyword which is the same as the first keyword is included in the preset keyword set or not; and if the preset keyword set comprises a second keyword which is the same as the first keyword, executing an operation instruction corresponding to the first keyword. In the voice processing method, the electronic equipment acquires the preset keyword set according to the display state of the display screen, so that the electronic equipment supports the acquisition of the corresponding preset keyword set in different display states of the display screen. Then, the electronic equipment internally judges whether a second keyword which is the same as the first keyword is included in the preset keyword set. The preset keyword set corresponds to different display states of a display screen of the electronic equipment, and if the first keyword is the same as the second keyword in the preset keyword set, the electronic equipment can carry out voice processing in the corresponding display state. The voice processing method improves the wake-up rate of the electronic device.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly introduced below. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.

Fig. 1 is a schematic diagram of voice control of an electronic device by a user.

Fig. 2 is a flowchart illustrating a speech processing method according to an embodiment of the present application.

Fig. 3 is another schematic flow chart of a speech processing method according to an embodiment of the present application.

Fig. 4 is a schematic flowchart of a speech processing method according to an embodiment of the present application.

Fig. 5 is a further flowchart of the speech processing method according to the embodiment of the present application.

Fig. 6 is a schematic structural diagram of a speech processing apparatus according to an embodiment of the present application.

Fig. 7 is another schematic structural diagram of a speech processing apparatus according to an embodiment of the present application.

Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.

Fig. 9 is another schematic structural diagram of an electronic device according to an embodiment of the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without inventive step, are within the scope of the present application.

The terms "first," "second," "third," and the like in the description and in the claims of the present application and in the above-described drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the objects so described are interchangeable under appropriate circumstances. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, or apparatus, electronic device, system comprising a list of steps is not necessarily limited to those steps or modules explicitly listed, and may include steps or modules not explicitly listed, and may include other steps or modules inherent to such process, method, apparatus, electronic device, or system.

Referring to fig. 1, fig. 1 is a schematic diagram illustrating a user performing voice control on an electronic device.

Wherein, the user outputs a section of voice, and the electronic equipment collects the voice information of the user. The electronic device then compares the collected speech information to speech recognition models stored in the electronic device. When the voice information is matched with the voice recognition model, the electronic equipment recognizes the control instruction from the voice information. And then, the electronic equipment executes the operation corresponding to the control instruction, such as screen lightening, application opening, application quitting, screen locking and the like, so that the voice control of the user on the electronic equipment is realized.

The embodiment of the application provides a voice processing method which can be applied to electronic equipment. The electronic device may be a smart phone, a tablet computer, a game device, an AR (Augmented Reality) device, an automobile, a data storage device, an audio playing device, a video playing device, a notebook, a desktop computer, or the like.

As shown in fig. 2, the speech processing method may include the following steps:

and 110, acquiring voice information of the user, wherein the voice information comprises a first keyword.

After the electronic equipment starts the voice processing function, the electronic equipment acquires the voice information of the user. For example, a microphone may be provided in the electronic device, and the electronic device collects voice information of the user through the microphone.

The voice information comprises a first keyword. The server executes an operation instruction on the electronic equipment by the first keyword in the voice information of the user. For example, the voice message may include operation instructions such as "i want to light the screen", "please turn on WeChat", "i want to quit Taobao", and so on. The first keyword is "light screen", "open WeChat", "quit Taobao", etc. The voice message may include the first keyword and may also be the first keyword.

And 120, acquiring a preset keyword set according to a display state of a display screen of the electronic equipment, wherein the display state comprises a locking state and an unlocking state, and the preset keyword set comprises at least one second keyword.

First, the display state of the display screen of the electronic device is determined, wherein the display state comprises a locking state and an unlocking state. The locking state comprises a screen extinguishing state and a screen locking state. In the locked state, the electronic device can be opened only by verifying the authentication information of the user, and then the operation can be performed on the electronic device. The authentication information includes: password information entered by the user, fingerprint characteristics of the user, facial characteristics of the user, voice print characteristics of the user, and the like.

When the screen is in the screen-off state, the display screen of the electronic equipment does not display any interface of the electronic equipment, namely the backlight is normally turned off to extinguish the screen, so that the power is saved. For example, when the electronic device has determined that the display state of the electronic device is in the screen-off state, the server acquires a corresponding first preset keyword set in the screen-off state. After a user sends out voice information of opening a main interface of the electronic equipment, whether a second keyword which is the same as the main interface of the electronic equipment is included in the first preset keyword set or not is judged, wherein the second keyword is 'opening the main interface of the electronic equipment'.

In the screen locking state, the electronic device is lighted on the screen and displays the screen locking interface, but the electronic device cannot perform any operation, and the screen locking can be opened only after the authentication information of the user is verified and passed. The authentication information includes: password information entered by the user, fingerprint characteristics of the user, facial characteristics of the user, voice print characteristics of the user, and the like. For example, the user lights up the screen, but the electronic apparatus cannot operate in the lock screen state. When the server determines that the electronic equipment is in the screen locking state, the electronic equipment obtains a first preset keyword stored inside the electronic equipment. And then, the user sends voice information of 'unlocking and locking screen', and judges whether a first preset keyword comprises a second keyword which is the same as the 'unlocking and locking screen', wherein the second keyword is 'unlocking and locking screen'.

In the unlocked state, the screen of the electronic device is not locked and can be normally used, for example, after the electronic device is unlocked, a call can be made, a short message can be sent, an application can be opened, and the like. And if the electronic equipment is unlocked without any operation, the electronic equipment acquires a third preset keyword set stored in the electronic equipment, and then operates the electronic equipment. For example, in the unlocked state, the electronic apparatus does not perform any operation, and the user transmits a voice message of "opening a phonebook". The method comprises the steps of obtaining a third preset keyword set stored in the electronic equipment, and judging whether the third preset keyword set comprises a second keyword which is the same as 'opening a telephone book' or not, wherein the second keyword is 'opening the telephone book'.

And 130, judging whether a second keyword which is the same as the first keyword is included in the preset keyword set or not.

The first keyword is included in the voice information of the user. And judging whether the preset keyword set comprises a second keyword which is the same as the first keyword or not. For example, the user utters the voice message "i want to take a picture", then the first keyword is "take a picture". And the server identifies that the electronic equipment opens the application of the XX camera, and then loads a corresponding preset keyword set in the electronic equipment according to the application. And judging whether a second keyword 'photographing' identical to the first keyword 'photographing' is included in the preset keyword set.

140, if the preset keyword set includes a second keyword that is the same as the first keyword, executing an operation instruction corresponding to the first keyword.

And if the first keyword is the same as a second keyword in the preset keyword set, executing an operation instruction corresponding to the first keyword. For example, the user utters the voice message "i want to take a picture", then the first keyword is "take a picture". And the server identifies that the electronic equipment opens the application of the XX camera, and then loads a corresponding preset keyword set in the electronic equipment according to the application. And judging whether a second keyword which is the same as the first keyword and is shot is included in the preset keyword set. If the preset keyword set has the keyword of 'taking a picture', the keyword is the second keyword. The electronic equipment executes the 'photographing' operation instruction, and photographing is performed in the XX camera.

It should be noted that the voice message may be a first keyword issued by the user, or may include the first keyword. But all the steps need to complete the operation instruction according to the first keyword.

In some embodiments, as shown in fig. 3, before acquiring the voice information of the user in step 110, the method further includes the following steps:

151, acquiring training voice information of a user;

152, training the training voice information to obtain a preset voice recognition model;

the method comprises the steps of obtaining training voice information of a user, wherein the voice information comprises a plurality of keywords. And training the voice information to obtain a preset voice recognition model. The voice information may be only keywords. When a user sends voice information, the voice information of the user is identified, and a first keyword in the voice information is obtained. For example, the user sends the voice information "i want to take a picture" and "open XX video". Then "i want to take a picture" and "open XX video" can be trained to get the preset speech recognition model.

The preset voice recognition model can not only recognize key words in the voice information, but also recognize voiceprint characteristics of the user, such as tone, speed, speaking smell and the like. For example, if the user has a bright voice and utters the voice information of "i want to take a picture", the user's bright voice is trained and the voice information of "i want to take a picture" is trained to obtain the preset voice recognition model.

And 110, acquiring voice information of a user, wherein the voice information comprises a first keyword, and the first keyword comprises a first sub-keyword and a second sub-keyword.

For example, if the user utters a voice message "enter the panoramic model for taking a picture", the first keyword is "enter the panoramic model for taking a picture". In the two operation instructions generated by the first keyword, one is to enter the panoramic model, and the other is to take a picture. So the first keyword is said to comprise a first sub-keyword of "enter panoramic model" and a second sub-keyword of "take a picture".

For example, the user sends a voice message of "open lock screen and take picture", then the first keyword is "open lock screen and take picture". It can be seen that the first keyword has two operation instructions, one is "open lock screen", and the other is "take picture". So the first keyword includes the first sub-keyword "open lock screen" and the second sub-keyword "take a picture".

In some embodiments, as shown in fig. 3, before the step 120 of obtaining the preset keyword set, the method further includes the following steps:

161, extracting voiceprint features of the user from the voice information, and matching the voiceprint features with a preset voice recognition model;

162, when the voiceprint features are successfully matched with the preset voice recognition model, acquiring a preset keyword set according to the display state of a display screen of the electronic equipment;

extracting voiceprint features of a user, the voiceprint features comprising: intonation uttered by the user, the user's voice's mood, the user's pace of speech, and the like. When the voiceprint features can be matched with the preset voice recognition model, a preset keyword set can be obtained. For example, the user utters a voice message "take a picture", and the server detects that the user's voice is a bright tone. Bright voice tones of the user are stored in the preset voice recognition model, and then the voice tones sent by the user are the same as the voice tones stored in the preset voice recognition model, so that the preset keyword set can be directly obtained.

If the voiceprint features are not matched with the preset voice recognition model, the preset keyword set cannot be obtained. For example, a friend of the user utters voice information of "take a picture", but the friend of the user has a deep tone. And the server does not detect the deep tone in a preset voice recognition model. Even if "take a picture" is spoken and the keyword of "take a picture" is included in the preset speech recognition model, the electronic apparatus cannot be caused to perform an operation. In summary, the preset keyword set may be obtained only when the voiceprint feature matches the voiceprint feature stored in the preset speech recognition model. If only the voice information is matched and the voiceprint characteristics are not matched, the preset keyword set cannot be acquired. This greatly enhances the security of the electronic device, thereby protecting the user's private information, and the like.

And when the voiceprint features are successfully matched with the preset voice recognition model, acquiring a preset keyword set according to the display state of a display screen of the electronic equipment. First, the display state of the display screen of the electronic device is determined, wherein the display state comprises a locking state and an unlocking state. The locking state comprises a screen extinguishing state and a screen locking state. In the locked state, the electronic device can be opened only by verifying the authentication information of the user, and then the operation can be performed on the electronic device. The authentication information includes: password information entered by the user, fingerprint characteristics of the user, facial characteristics of the user, voice print characteristics of the user, and the like.

When the screen is in the screen-off state, the display screen of the electronic equipment does not display any interface of the electronic equipment, namely the backlight is normally turned off to extinguish the screen, so that the power is saved. For example, when the electronic device has determined that the display state of the electronic device is in the screen-off state, the server acquires a corresponding first preset keyword set in the screen-off state. After a user sends out voice information of opening a main interface of the electronic equipment, whether a second keyword which is the same as the main interface of the electronic equipment is included in the first preset keyword set or not is judged, wherein the second keyword is 'opening the main interface of the electronic equipment'.

In the screen locking state, the electronic device is lighted on the screen and displays the screen locking interface, but the electronic device cannot perform any operation, and the screen locking can be opened only after the authentication information of the user is verified and passed. The authentication information includes: password information entered by the user, fingerprint characteristics of the user, facial characteristics of the user, voice print characteristics of the user, and the like. For example, the user lights up the screen, but the electronic apparatus cannot operate in the lock screen state. When the server determines that the electronic equipment is in the screen locking state, the electronic equipment obtains a first preset keyword stored inside the electronic equipment. And then, the user sends voice information of 'unlocking and locking screen', and judges whether a first preset keyword comprises a second keyword which is the same as the 'unlocking and locking screen', wherein the second keyword is 'unlocking and locking screen'.

In the unlocked state, the screen of the electronic device is not locked and can be normally used, for example, after the electronic device is unlocked, a call can be made, a short message can be sent, an application can be opened, and the like. And if the electronic equipment is unlocked without any operation, the electronic equipment acquires a third preset keyword set stored in the electronic equipment, and then operates the electronic equipment. For example, in the unlocked state, the electronic apparatus does not perform any operation, and the user transmits a voice message of "opening a phonebook". The method comprises the steps of obtaining a third preset keyword set stored in the electronic equipment, and judging whether the third preset keyword set comprises a second keyword which is the same as 'opening a telephone book' or not, wherein the second keyword is 'opening the telephone book'.

In some embodiments, as shown in fig. 3, step 120 of obtaining a preset keyword set, where the preset keyword set includes at least one second keyword, includes the following steps:

121, if the display state of the display screen is a locked state, acquiring a first preset keyword set;

122, if the display state of the display screen is the unlocking state, determining the currently running foreground application;

and 123, acquiring a second preset keyword set according to the foreground application and a preset corresponding relation, wherein the preset corresponding relation comprises a corresponding relation between the application and the preset keyword set.

First, the display state of the display screen of the electronic device is determined, wherein the display state comprises a locking state and an unlocking state. The locking state comprises a screen extinguishing state and a screen locking state. In the locked state, the electronic device can be opened only by verifying the authentication information of the user, and then the operation can be performed on the electronic device. The authentication information includes: password information entered by the user, fingerprint characteristics of the user, facial characteristics of the user, voice print characteristics of the user, and the like.

When the screen is in the screen-off state, the display screen of the electronic equipment does not display any interface of the electronic equipment, namely the backlight is normally turned off to extinguish the screen, so that the power is saved. For example, when the electronic device has determined that the display state of the electronic device is in the screen-off state, the server acquires a corresponding first preset keyword set in the screen-off state. After a user sends out voice information of opening a main interface of the electronic equipment, whether a second keyword which is the same as the main interface of the electronic equipment is included in the first preset keyword set or not is judged, wherein the second keyword is 'opening the main interface of the electronic equipment'.

In the screen locking state, the electronic device is lighted on the screen and displays the screen locking interface, but the electronic device cannot perform any operation, and the screen locking can be opened only after the authentication information of the user is verified and passed. The authentication information includes: password information entered by the user, fingerprint characteristics of the user, facial characteristics of the user, voice print characteristics of the user, and the like. For example, the user lights up the screen, but the electronic apparatus cannot operate in the lock screen state. When the server determines that the electronic equipment is in the screen locking state, the electronic equipment obtains a first preset keyword stored inside the electronic equipment. And then, the user sends voice information of 'unlocking and locking screen', and judges whether a first preset keyword comprises a second keyword which is the same as the 'unlocking and locking screen', wherein the second keyword is 'unlocking and locking screen'.

In the unlocked state, the user has opened an application in the electronic device. The server determines the currently running foreground application, and then obtains a second preset keyword set according to the foreground application and the preset corresponding relation. For example, foreground applications of an electronic device include: XX camera, XX map, XX video, etc., each application corresponds to a fixed second set of preset keywords. And when the XX camera is detected to be opened by the electronic equipment, loading a corresponding second preset keyword set from the inside of the electronic equipment so as to execute the operation instruction in the XX camera application. Or when the XX map is opened by the electronic equipment, loading a corresponding second preset keyword set from the inside of the electronic equipment to execute an operation instruction in the XX map application, and the like.

For example, the preset correspondence may be a correspondence shown in table 1:

TABLE 1

Applications 1 Preset keyword set 1
Application 2 Preset keyword set 2
…… ……

As shown in table 1, the correspondence between the application and the preset keyword set can be clearly understood.

In some embodiments, as shown in fig. 4, 123, obtaining a second preset keyword set according to the foreground application and the preset correspondence includes the following steps:

1231, determining the currently displayed application interface of the foreground application;

1232, obtaining a second preset keyword set according to the foreground application, the application interface and a preset corresponding relationship, where the preset corresponding relationship includes a corresponding relationship between the application, the application interface and a preset keyword set.

In the electronic equipment, not only a main interface but also interfaces such as personal information exist when the application is opened. For example, social software includes: a text entry interface, an address book interface, a video call interface, and the like. Then the input text interface corresponds to a preset keyword set, the address list corresponds to a preset keyword set, and the like. As another example, XX shopping software includes: a payment interface, a browsing interface, a shopping cart interface, and the like. The payment interface corresponds to a preset keyword set, the browsing interface corresponds to a preset keyword set, and the like. The preset corresponding relationship may be a corresponding relationship shown in table 2:

TABLE 2

Figure BDA0001758882200000101

In some embodiments, as shown in fig. 5, 123, obtaining a second preset keyword set according to the foreground application and the preset correspondence includes the following steps:

1233, acquiring the current geographical location information of the electronic device;

1234, a second preset keyword set is obtained according to the foreground application, the geographic position information, and a preset corresponding relationship, where the preset corresponding relationship includes a corresponding relationship between the application, the geographic position information, and the preset keyword set.

When an application on an electronic device is opened, the current geographic location information of the electronic device can be acquired. The geographical location may be identified by a GPS (global positioning System) location. For example, the server identifying the geographic location where the electronic device is currently located includes: libraries, offices, supermarkets, etc. And the library corresponds to a preset keyword set, the office corresponds to a preset keyword set, and the like. The preset corresponding relationship may be the corresponding relationship shown in table 3:

TABLE 3

Figure BDA0001758882200000111

In some embodiments, as shown in fig. 3, the step 130 of determining whether a second keyword identical to the first keyword is included in the preset keyword set includes the following steps:

131, judging whether the preset keyword set includes a third sub-keyword identical to the first sub-keyword and a fourth sub-keyword corresponding to the second sub-keyword.

And after the server acquires the preset keyword set, comparing the first sub-keyword and the second sub-keyword in the voice message with the preset keyword set so as to execute the next step according to the comparison result.

For example, the user sends a voice message "enter panoramic mode for taking a picture", then the first sub-keyword is "enter panoramic mode", and the second sub-keyword is "take a picture". And judging whether a third sub-keyword exists in the preset keyword set as 'entering into a panoramic mode' or not and a fourth sub-keyword exists in the preset keyword set as 'taking a picture'. Here, the first sub-keyword may also be "take a picture", and the second sub-keyword may be "enter panoramic mode". And the third sub-keyword is 'take a picture', and the fourth sub-keyword is 'enter into a panoramic mode'.

In some embodiments, as shown in fig. 3, in step 140, if the preset keyword set includes a second keyword that is the same as the first keyword, executing the operation instruction corresponding to the first keyword includes the following steps:

141, if the preset keyword set includes a third sub-keyword identical to the first sub-keyword and a fourth sub-keyword corresponding to the second sub-keyword, executing an operation instruction corresponding to the first keyword.

According to the determination method in step 131, if the preset keyword set includes a third sub-keyword identical to the first sub-keyword and a fourth sub-keyword corresponding to the second sub-keyword, executing an operation instruction corresponding to the first keyword.

For example, the user sends a voice message "enter panoramic mode for taking a picture", then the first sub-keyword is "enter panoramic mode", and the second sub-keyword is "take a picture". And judging whether a third sub-keyword exists in the preset keyword set as 'entering into a panoramic mode' or not and a fourth sub-keyword exists in the preset keyword set as 'taking a picture'. Here, the first sub-keyword may also be "take a picture", and the second sub-keyword may be "enter panoramic mode". And the third sub-keyword is 'take a picture', and the fourth sub-keyword is 'enter into a panoramic mode'. It can be seen that the first sub-keyword "enter the panoramic mode" is the same as the third sub-keyword "enter the panoramic mode", and the second sub-keyword "take a picture" is the same as the fourth sub-keyword "take a picture". Or the first sub-keyword 'photographing' is the same as the third sub-keyword 'photographing', and the second sub-keyword 'entering the panoramic mode' is the same as the fourth sub-keyword 'entering the panoramic mode'. The server executes the operation instruction of entering the panoramic model for photographing.

24页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:语音识别文本的标点预测方法、系统、终端及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!