CN112542165A - Voice control method of application program and intelligent terminal - Google Patents

Voice control method of application program and intelligent terminal Download PDF

Info

Publication number
CN112542165A
CN112542165A CN201910899961.3A CN201910899961A CN112542165A CN 112542165 A CN112542165 A CN 112542165A CN 201910899961 A CN201910899961 A CN 201910899961A CN 112542165 A CN112542165 A CN 112542165A
Authority
CN
China
Prior art keywords
application
application program
name
target
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910899961.3A
Other languages
Chinese (zh)
Inventor
孙向作
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL Corp
TCL Research America Inc
Original Assignee
TCL Research America Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TCL Research America Inc filed Critical TCL Research America Inc
Priority to CN201910899961.3A priority Critical patent/CN112542165A/en
Publication of CN112542165A publication Critical patent/CN112542165A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue

Landscapes

  • Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Stored Programmes (AREA)

Abstract

The invention is suitable for the technical field of voice control, and provides a voice control method of an application program and an intelligent terminal, wherein the voice control method of the application program and the intelligent terminal can still correctly respond to the control operation included in the voice information input by a user even if the target application program is not pre-deployed in a cloud server by acquiring the voice information, determining a target operation instruction and an application name corresponding to the target application program according to the voice information, determining an installation package name corresponding to the target application program according to the application name, determining a native interface parameter of the target application program according to the installation package name, and calling the native interface to execute the target operation instruction, the user experience is improved.

Description

Voice control method of application program and intelligent terminal
Technical Field
The invention belongs to the technical field of voice control, and particularly relates to a voice control method of an application program and an intelligent terminal.
Background
At present, most of intelligent terminals based on an Android system have a voice control application function, and from the perspective of control types, the voice control mainly comprises frequency control, audio control, application control, WYSIWYG interface control, weather forecast and the like. The application is used for controlling a specific operation, such as installation, uninstallation, downloading, opening and the like, for a user through the voice control application program. However, when the application included in the voice information input by the user is not pre-deployed in the cloud server, if the user needs to perform voice control on the application, the intelligent terminal cannot correctly respond to the control operation included in the voice information, which results in poor user experience.
Disclosure of Invention
In view of this, embodiments of the present invention provide a voice control method for an application program and an intelligent terminal, so as to solve the problem that, when the application program is not pre-deployed in a cloud server, the intelligent terminal cannot correctly respond to a control operation included in voice information input by a user, which results in poor user experience.
A first aspect of an embodiment of the present invention provides a method for controlling an application program by using voice, including:
acquiring voice information;
determining a target operation instruction and an application name corresponding to a target application program according to the voice information;
determining the installation package name corresponding to the target application program according to the application name;
and determining the native interface parameters of the target application program according to the installation package name, and calling the native interface to execute the target operation instruction.
A second aspect of an embodiment of the present invention provides a speech control apparatus for an application, including:
the voice information acquisition and conversion unit is used for acquiring voice information;
the target operation instruction and application name determining unit is used for determining a target operation instruction and an application name corresponding to a target application program according to the voice information;
the installation package name searching unit is used for determining the installation package name corresponding to the target application program according to the application name;
and the target operation instruction execution unit is used for determining the native interface parameters of the target application program according to the installation package name and calling the native interface to execute the target operation instruction.
A third aspect of an embodiment of the present invention provides an intelligent terminal, including:
the voice control method comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, wherein the steps of the voice control method of the application program provided by the first aspect of the embodiment of the invention are realized when the processor executes the computer program.
Wherein the computer program comprises:
the voice information acquisition and conversion unit is used for acquiring voice information;
the target operation instruction and application name determining unit is used for determining a target operation instruction and an application name corresponding to a target application program according to the voice information;
the installation package name searching unit is used for determining the installation package name corresponding to the target application program according to the application name;
and the target operation instruction execution unit is used for determining the native interface parameters of the target application program according to the installation package name and calling the native interface to execute the target operation instruction.
A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, which stores a computer program, where the computer program, when executed by a processor, implements the steps of the voice control method for an application program provided in the first aspect of the embodiments of the present invention.
Wherein the computer program comprises:
the voice information acquisition and conversion unit is used for acquiring voice information;
the target operation instruction and application name determining unit is used for determining a target operation instruction and an application name corresponding to a target application program according to the voice information;
the installation package name searching unit is used for determining the installation package name corresponding to the target application program according to the application name;
and the target operation instruction execution unit is used for determining the native interface parameters of the target application program according to the installation package name and calling the native interface to execute the target operation instruction.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: according to the method and the device, the voice information is obtained, the target operation instruction and the application name corresponding to the target application program are determined according to the voice information, the installation package name corresponding to the target application program is determined according to the application name, the native interface parameter of the target application program is determined according to the installation package name, and the native interface is called to execute the target operation instruction.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart of an implementation of a voice control method for an application according to an embodiment of the present invention;
FIG. 2 is a flowchart of an implementation of a method for updating an application query database according to an embodiment of the present invention;
fig. 3 is a flowchart of a specific implementation of a method for obtaining an application name and an installation package name of an application according to an embodiment of the present invention;
fig. 4 is a flowchart of a specific implementation of a method for determining a corresponding application name according to an application shortcut icon according to an embodiment of the present invention;
FIG. 5 is a flowchart of an implementation of another method for updating a query database of an application according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a speech control apparatus for an application according to an embodiment of the present invention;
fig. 7 is a schematic diagram of an intelligent terminal according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples. Referring to fig. 1, fig. 1 shows an implementation flow of a voice control method for an application program according to an embodiment of the present invention, which is detailed as follows:
in step S101, voice information is acquired.
In the embodiment of the invention, the acquired voice information is voice information which is recorded by the intelligent terminal and input by a user, or received voice information which is sent by a third-party terminal such as an earphone.
By way of example and not limitation, when a user does not want to manually search for opening or uninstalling an application in the process of using the intelligent terminal, but wants to open or uninstall an application through voice input, for example, the user says: and the intelligent terminal records the voice 'open WeChat' input by the user and converts the voice into corresponding text information 'open WeChat' through a voice recognition technology.
It is understood that the timing of acquiring the voice information may be real-time, or may be separated by a preset time, and is not limited specifically herein.
In step S102, the target operation instruction and the application name corresponding to the target application program are determined according to the voice information.
In the embodiment of the present invention, the target operation instruction is a control instruction for operating the application program, and includes opening the application program and uninstalling the application program.
The target application is an application currently required to implement voice control.
The application name is the name of a particular application, such as QQ, WeChat, Payment, etc.
It should be noted that, the target operation instruction and the application name corresponding to the target application program are determined according to the voice information, and the voice information can be identified through the voice identification model; the classification of the keyword in the text information may also be determined to be a verb or a noun according to the text information converted from the voice information to determine the target operation instruction and the application name corresponding to the target application program, where how to determine the target operation instruction and the application name corresponding to the target application program according to the voice information is not particularly limited.
In a possible implementation manner, step S102 is specifically:
and inputting the voice information or the text information converted according to the voice information into a trained voice recognition model for analysis so as to obtain a target operation instruction and an application name corresponding to a target application program.
In the embodiment of the present invention, the speech recognition model is a speech recognition control model capable of distinguishing the operation instruction and the application name from the speech information or text information input therein, that is, the speech recognition model can correctly distinguish verbs and nouns.
After the speech information is acquired, the speech input value is directly analyzed in the speech recognition model to recognize verbs and nouns that may be included in the speech information, and the recognized verbs and/or nouns are output by the speech recognition model.
It should be further noted that the speech recognition model is obtained after training based on multiple sets of training samples, where the training samples are speech segments and correct results (i.e. parts of speech of each word) corresponding to the speech segments, for example, a speech segment is "open WeChat", and the correct results are "open" as a verb and "WeChat" as a noun.
It is understood that the speech segments in the training sample can be speech segments of different accents, so that the speech recognition model can parse the speech information input by the user of different accents.
By way of example and not limitation, the voice recognition model can be stored in a local database of the intelligent terminal, and the target operation instruction and the application name corresponding to the target application program can be rapidly acquired.
In another possible implementation manner, step S102 specifically includes:
step S1021, the voice information is converted into text information.
In the embodiment of the invention, the text information is obtained by carrying out recognition processing on the voice information to be converted through a voice recognition technology.
For example, the user says: and the intelligent terminal records the voice 'open WeChat' input by the user and converts the voice into corresponding text information 'open WeChat' through a voice recognition technology.
Step S1022, a verb keyword and a noun keyword are extracted from the text information.
In embodiments of the present invention, verb keywords are words used to represent actions or states, such as open, uninstall, install, and the like.
Noun keywords are words used to represent people, things, places, or abstractions, such as QQ, WeChat, Paibao, and so on.
It can be understood that when a user wants to open a specific application in the intelligent terminal by voice, a verb and a name, such as "open WeChat", are necessarily included, where "open" is a verb keyword and "WeChat" is a noun keyword.
By way of example and not limitation, verb keywords and noun keywords are extracted from text information, and the text information can be analyzed by adopting a semantic analysis method, so that more accurate verb keywords and noun keywords are obtained, and the extraction accuracy is improved.
As an example and not by way of limitation, the verb keyword and the noun keyword are extracted from the text message, the text message may be word segmented to obtain a plurality of words, for example, the text message "open WeChat" may be word segmented to obtain two words, i.e., "open" and "WeChat", and then classified according to the part of speech of the plurality of words, and the verb keyword and the noun keyword are determined from the classified words.
And step S1023, determining the target operation instruction according to the verb key words.
In the embodiment of the present invention, only the preset operation instruction can be executed, such as the above-mentioned opening application and uninstalling application, and in order to determine the target operation instruction, the extracted verb key is compared and matched with the preset operation instruction to determine the target operation instruction.
In one possible implementation, the extracted verb key is "open", which may be matched with a predetermined operation instruction, and then the target operation instruction may be determined to be "open".
In another possible implementation manner, the extracted verb keyword is "download", and it does not match the preset operation instruction, so that the target operation instruction cannot be determined, and the intelligent terminal terminates the subsequent steps and re-executes step S101.
Step S1024, determining the application name corresponding to the target application program according to the noun keyword.
In the embodiment of the invention, after the noun keyword is extracted, the noun keyword is matched with the preset noun keyword, and the application name of the target application program is determined according to the matched noun keyword, namely the matched name keyword is the application name of the target application program.
It should be noted that the preset noun keyword includes, but is not limited to, an application name of an application currently installed in the intelligent terminal, and an application name of an application that needs voice control and is selected by a user in advance.
In step S103, the installation package name corresponding to the target application program is determined according to the application name.
In the embodiment of the present invention, the correspondence between the application name of the application program and the installation package name of the application program may be preset, so that the installation name corresponding to the application name may be determined according to the application name of the application program. In this embodiment, the correspondence between the application name of the application program and the installation package name of the application program may be stored in a data table, or may be stored in a database, or of course, may also be stored in other storage forms, which is not illustrated herein.
In one implementation, a correspondence between an application name of an application and an installation package name of the application may be stored in an application query database. In this manner, the corresponding relationship between the application name and the installation package name is stored in the application query database that is pre-established, that is, the application query database is a database for storing the corresponding relationship between the application name and the installation package name of the application program that is pre-established. After the application name of a certain application program is known, the installation package name corresponding to the application program can be found by inquiring the database from the application according to the corresponding relation between the application name and the installation package name. Similarly, the corresponding application name can also be found through the installation package name, so that the application program corresponding to the application name is determined. In a possible implementation manner, the application query database is a local database arranged in the intelligent terminal, so that when a user needs to perform voice control on an application program of the intelligent terminal, the intelligent terminal can quickly search the corresponding installation package name from the local application query database to realize the voice control on a target application program.
In another possible implementation manner, after the application query database is updated, the application query database may be uploaded to a remote database of a server for storage, so that the intelligent terminal may invoke the application query database from the server, where the server includes but is not limited to a cloud server.
In another possible implementation manner, the application query database is a remote database of the server, and the intelligent terminal may invoke the application query database to search for the corresponding installation package name by initiating a request to the server.
By way of example and not limitation, the intelligent terminal can only perform voice control on the installed application program, and since the application query database stores the application name of the currently installed application program of the intelligent terminal and the installation package name having a corresponding relationship with the application name, the installation package name corresponding to the target application program can be searched from the application query database according to the determined application name.
It should be understood that, when the intelligent terminal cannot find the installation package name corresponding to the target application program from the application query data, it is indicated that the target application program is not installed in the intelligent terminal, and at this time, a reminding message may be sent to remind the user that the target application program is not installed.
In one possible implementation manner, the noun keyword is matched with an application name in the application query database to determine an application name corresponding to the target application program, that is, when the noun keyword is matched with the application name in the application query database, the application name is determined as the application name corresponding to the target application program. After the application name is determined, the installation package name corresponding to the target application program can be found according to the corresponding relation.
In step S104, determining a native interface parameter of the target application according to the installation package name, and calling the native interface to execute the target operation instruction.
As an example, the Android system provides an interface function for opening or uninstalling an application, which requires a parameter, i.e., a native interface parameter, which is the installation package name of the application. When an application program needs to be opened, the application program can be opened by calling the interface and introducing the installation package name of the application program to be opened. The offload application interface is also similar.
It should be noted that the opening and uninstalling of the application program is only used as an example for illustration, and other methods for controlling the application program are similar to the opening and uninstalling of the application program and are not illustrated here.
Optionally, referring to fig. 2, fig. 2 shows a specific implementation flow of a method for updating an application query database according to an embodiment of the present invention, which is detailed as follows:
in step S201, an application name and an installation package name of the target application program are acquired.
In the embodiment of the invention, the intelligent terminal obtains the application name and the installation package name of the target application program after the system is started, or when the preset time comes, or when the intelligent terminal monitors that the application program is installed. The embodiment of the present invention does not specifically limit the specific time for obtaining the application name and the installation name of the target application program.
In a possible implementation manner, when monitoring that an application program is installed on an intelligent terminal, the intelligent terminal calls a package management server to analyze a file of the application program, obtains an application name and an installation package name of the application program, and correspondingly stores the application name and the installation name into an application query database to obtain an updated application query database.
It should be noted that the executing subject in steps S201 to S203 may also be a server, where the server obtains the application name and the installation package name of the target application from the intelligent terminal, or receives the application name and the installation package name of the target application sent by the intelligent terminal, and establishes a corresponding relationship between the application name and the installation package name, and then stores the corresponding relationship in an application query database so as to call the application query database to search for the installation package name.
It is understood that, when the execution subject of steps S201 to S203 is a server, the execution subject of steps S301 to S304 and steps S401 to S403 is also a server accordingly.
Optionally, referring to fig. 3, fig. 3 shows a specific implementation flow of a method for obtaining an application name and an installation package name of an application program according to an embodiment of the present invention, which is detailed as follows:
in step S301, an application shortcut icon of an application program in the intelligent terminal is obtained, and an application name corresponding to the application program is determined according to the application shortcut icon of the application program.
In the embodiment of the invention, the application shortcut icon is a shortcut icon which is displayed on the desktop of the intelligent terminal and can quickly access the application program, and the application shortcut icon comprises a logo and an application name of the application program.
Specifically, after the application program is installed on the intelligent terminal, the installed application program is displayed on the desktop of the intelligent terminal in the form of an application icon through the Home application program.
It should be noted that, in the Android system, the Home application is a Launcher application by default, which is started by an activity management service, and both the activity management service and the package management service are started by a system service system server component at startup, the system server component starts the package management service, which is responsible for installing the application of the system, after the application in the system is installed, the system server component starts the Launcher by the activity management service, and the Launcher displays the application already installed in the system on the desktop in the form of a shortcut icon by the package management service at startup.
It should be noted that the name of the application (i.e., the application name) cannot be obtained by directly parsing the application file, and since the application shortcut icon includes the application name, when the application name needs to be obtained, the application name corresponding to the application shortcut icon may be extracted by performing image recognition processing on the application shortcut icon.
The image recognition process may be a character segmentation-based image recognition process or a deep neural network model-based image recognition process, and a specific method of performing the image recognition process is not limited herein.
Optionally, referring to fig. 4, fig. 4 shows a specific implementation flow of a method for determining a corresponding application name according to an application shortcut icon according to an embodiment of the present invention, which is detailed as follows:
in step S401, graying is performed on the application shortcut icon to obtain a grayed first application icon.
In the embodiment of the invention, because the shortcut icon is applied to the color image, when the character is segmented, if the color information is reserved, the difference of the color information will generate adverse effect on the result of the image identification processing, and unnecessary interference is caused. And processing a color image wastes system resources and reduces system efficiency, so the application shortcut icon which is the color image is converted into a grayscale image containing only brightness information but not color information before character segmentation is performed.
By way of example and not limitation, the graying processing is performed by using a weighted average method according to the embodiment of the present invention, and different weights W are first assigned to R, G, B color components of the shortcut iconR、WG、WBAnd then taking R, G, B a weighted average g of the color components, wherein the weighted average g is according to the formula
Figure BDA0002211507340000111
And (4) calculating.
It should be noted that the weight WR、WG、WBAn initial value, which may be zero, may be set in advance and adjusted during the image recognition process.
In step S402, according to a preset grayscale threshold, performing binarization processing on the grayscale value of the first application icon to obtain a second application icon.
In the embodiment of the present invention, the gray values of all the pixels of the first application icon are compared with the preset gray threshold, if the gray value of the pixel of the first application icon is smaller than the preset gray threshold, the gray value corresponding to the pixel is modified to 0, and if the gray value of the pixel of the first application icon is greater than or equal to the preset gray threshold, the gray value corresponding to the pixel is modified to 255.
It should be noted that the preset grayscale threshold is a preset numerical value, and can be adjusted again according to actual conditions in the process of processing the image.
It should be further noted that, in the embodiment of the present invention, the first application icon obtained after the graying is subjected to the binarization processing, and the gray value (0-255) of each pixel point in the first application icon is set as the minimum gray value of 0 or the maximum gray value of 255, so that an image with continuous gray changes is converted into a black-and-white image, that is, the second application icon, which has only black (gray value of 0) or white (gray value of 255), so as to achieve the purpose of separating the target of interest from the background of the image in the image, and the edge contour of the image after the binarization processing is particularly clear, so as to achieve the effects of highlighting the target and fading the background.
In the embodiment of the invention, the background and the target in the image have higher contrast than a gray-scale image by carrying out binarization processing on the first application icon, and the data volume of the image is further reduced, so that the efficiency of image processing is improved, the edge contour, the size and the position of the interested target can be effectively highlighted, and a foundation is laid for the realization and the processing of a further voice control application program.
In step S403, the second application icon is subjected to character segmentation based on a two-dimensional projection character segmentation method, so as to obtain characters included in the second application icon.
In the embodiment of the present invention, in the second application icon, the pixel point with the grayscale value of 255 corresponds to a white point, i.e., an image background, and the pixel point with the grayscale value of 0 corresponds to a black point, which represents a character. If a certain row or a certain column is the background, the projection of the row or the column is necessarily white, and because there are intervals between characters, the projection of the intervals between the characters is also white, and according to the rule, the characters in the application shortcut icon can be separated from each other.
Specifically, the character segmentation is to segment a plurality of characters in the application shortcut icon into a plurality of single character images, so as to remove background information of character edges as much as possible and obtain a minimum character image accurately including a single character edge.
Specifically, step S403 includes:
step S4031, performing horizontal projection on the second application icon, and determining the number of rows of characters in the second application icon.
In the embodiment of the present invention, the number of rows of characters is the total number of rows of pixels in the second application icon containing characters, for example, the total number of rows of pixels in the second application icon is 255 rows, and the total number of rows of pixels containing characters is 20 rows, which means that the total number of rows of pixels containing no characters is 235 rows.
It should be noted that, the number of the character lines in the second application icon is determined, and specifically, the determination is performed through a comparison result between a sum of gray-level values of pixels in each line of the second application icon and a preset threshold, where the preset threshold is a threshold used for determining whether a certain line is a character region, and when the sum of gray-level values of pixels in a certain line is greater than the preset threshold, the character region of the line is determined; and when the sum of the pixel gray values of a certain row is less than or equal to a preset threshold, determining the row background area, and counting the row number determined as the character area, namely the row number of the characters in the second application icon.
In a possible implementation manner, the specific implementation steps of step S4031 are as follows:
1) horizontally projecting the second application icon, and counting the sum of pixel gray values of each line;
2) comparing the sum of the counted pixel gray values of each line with a first preset threshold value respectively; the first preset threshold is a preset threshold for judging whether a certain line is a character area;
3) if a row with the sum of pixel gray levels larger than the first preset threshold exists, setting the row as a character area;
4) and counting the total number of the lines set as the character area, wherein the total number is the number of the character lines of the second application icon.
Step S4032, perform vertical projection on the determined number of rows of characters, and acquire each character in each row and start-stop coordinates of the character.
In an embodiment of the present invention, the start-stop coordinates of the character include start coordinates and end coordinates of the character, one for each character. In a possible implementation manner, the specific implementation steps of step S4032 are as follows:
1) performing vertical projection on the determined number of the character lines, and counting the sum of pixel gray values of each column;
2) comparing the sum of the counted pixel gray values of each column with a second preset threshold value respectively; the second preset threshold is a preset threshold for judging whether a certain column is a character area or not;
3) if the row with the sum of the pixel gray levels larger than the second preset threshold exists, setting the row as a character area;
4) if the starting position of the character area is zero, the column is the starting position of the character area, and the recorded coordinates of the column are the starting coordinates of the character;
5) if the starting position of the character area is not zero, the column is still in the character area, the step 3) is continuously executed until the judged current column is not set as the character area, and the coordinate of the previous column of the current column is recorded as the ending coordinate of the character;
6) each character is recorded with its corresponding start and end coordinates.
Step S4033, determine the characters included in the second application icon according to the start-stop coordinates.
In the embodiment of the invention, each start-stop coordinate corresponds to one character, and after the start-stop coordinates of a plurality of characters of each line of characters are obtained, the characters of the line are obtained.
In step S404, an application name corresponding to the application shortcut icon is determined according to the character.
In the embodiment of the invention, after the characters contained in the second application icon are determined, the sequence of each character is also determined according to the start-stop coordinates of each character, so that the text content corresponding to the application shortcut icon can be obtained, and the application name of the target application program can be determined according to the text content.
For example, the second application icon includes characters "micro" and "letter", and the start and stop coordinates of the character "micro" are [ [390,73], [447,73] ], where [390,73] is the start coordinate of the character "micro", and [447,73] is the end coordinate of the character "micro"; the start and stop coordinates of the character "letter" are [ [467,73], [474,73] ], wherein [467,73] is the start coordinate of the character "letter" and [474,73] is the end coordinate of the character "letter", obviously, the precedence order of the two can be directly determined according to the start and stop coordinates of the character "micro" and the start and stop coordinates of the character "letter": the 'micro' is in front of the 'letter' and is behind the 'letter', so that the text content corresponding to the application shortcut icon can be determined to be 'micro letter', namely the application name of the target application program.
It is understood that, for each application installed in the intelligent terminal, the application name thereof may be obtained through the above method.
In step S302, an application file of an application program in the intelligent terminal is searched, and a corresponding installation package name is determined according to the application file of the application program.
In the implementation of the invention, the PackageManagerService is responsible for scanning a specific directory in the intelligent terminal and finding out an application program file taking apk as a suffix from the directory, wherein the application program file comprises a class file obtained by compiling source codes, a resource file and a configuration file, and the configuration file comprises an installation package name of an application program, authority of the application program, interface setting and the like, so that the installation package name of the application program installed in the intelligent terminal can be obtained by analyzing the application program file.
By way of example and not limitation, xml of the configuration file is analyzed to obtain installation package names of all installed or currently installed applications in the intelligent terminal.
In step S303, a corresponding relationship is established between the application name and the installation package name corresponding to the application program.
In the embodiment of the invention, after the application name and the installation package name of the application program are obtained, the corresponding relation is established between the application name and the installation package name corresponding to the application program, so that the corresponding installation package name can be found through the application name of the application program.
It should be noted that the target application is an application in the intelligent terminal, and after the application name corresponding to the application and the installation package name are associated with each other, the installation package name of the target application can be found according to the application name of the target application.
In step S202, a corresponding relationship between the application name and the installation package name is established.
In the embodiment of the invention, after the application name and the installation package name of the target application program are determined, the one-to-one correspondence relationship between the application name and the installation package name is established, so that the installation package name corresponding to the application name can be found through the application name.
In step S203, the corresponding relationship is stored in the application query database, so as to obtain an updated application query database.
In the embodiment of the invention, the corresponding relation between the application name and the installation name of the target application program is stored in the application query database, so that the application query database can be called to search the installation package which has the corresponding relation with the application name of the target application program when the voice control of the application program is needed, and the voice control of the target application program is realized.
Optionally, referring to fig. 5, fig. 5 shows a specific implementation flow of another method for updating an application query database according to an embodiment of the present invention, which is detailed as follows:
in step S501, if the target application is uninstalled, the package management server is called to analyze the file of the target application, and an application name and an installation package name of the target application are obtained.
In the embodiment of the present invention, reference may be made to the above for specific implementation steps of invoking the package management server to analyze the file of the application program and acquiring the application name and the installation package name of the application program, which are not described herein again.
It should be noted that the target application referred to herein is an application in the intelligent terminal.
In step S502, the application name and the installation name are deleted from the application query database, so as to obtain an updated application query database.
In the embodiment of the invention, the application name and the installation package name are deleted from the application query database, which also means that the corresponding relation between the application name and the installation package name does not exist any more, so that when a user wants to perform voice control on a target application program corresponding to the application name, the user can be quickly reminded that the target application program does not exist, the response efficiency of the intelligent terminal is improved, and the user experience is better.
In the embodiment of the invention, the voice information is obtained, the target operation instruction and the application name corresponding to the target application program are determined according to the voice information, the installation package name corresponding to the target application program is determined according to the application name, the native interface parameter of the target application program is determined according to the installation package name, and the native interface is called to execute the target operation instruction.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be controlled by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 6 is a schematic diagram of a speech control apparatus for an application according to an embodiment of the present invention, which corresponds to the speech control method for an application according to the foregoing embodiment, and only shows portions related to the embodiment of the present invention for convenience of description.
Referring to fig. 6, the apparatus includes:
a voice information acquisition and conversion unit 61 for acquiring voice information;
the target operation instruction and application name determining unit is used for determining a target operation instruction and an application name corresponding to a target application program according to the voice information;
an installation package name searching unit 63, configured to determine, according to the application name, an installation package name corresponding to the target application program;
and the target operation instruction execution unit 74 is configured to determine, according to the installation package name, a native interface parameter of the target application program, and call the native interface to execute the target operation instruction.
Specifically, the device further comprises:
an application name and installation package name acquisition unit, configured to acquire an application name and an installation package name of the target application program;
and the corresponding relation establishing unit is used for establishing the corresponding relation between the application name and the installation package name and storing the established corresponding relation between the application name and the installation package name into an application query database.
Specifically, the application name and installation package name obtaining unit includes:
the application name determining subunit is used for acquiring the application shortcut icons in the system and determining corresponding application names according to the application shortcut icons;
and the installation package name determining subunit is used for searching the application program files in the system and determining the corresponding installation package name according to the application program files.
Specifically, the application name determining subunit is configured to:
graying the application shortcut icon to obtain a grayed first application icon;
according to a preset gray threshold value, carrying out binarization processing on the gray value of the first application icon to obtain a second application icon;
performing character segmentation on the second application icon based on a two-dimensional projection character segmentation method to obtain characters contained in the second application icon;
and determining the application name corresponding to the application shortcut icon according to the characters.
Specifically, the application name determining subunit is further configured to:
horizontally projecting the second application icon, and determining the number of character lines in the second application icon;
performing vertical projection on the determined number of the character lines to obtain each character in each line and start-stop coordinates of the character;
and determining the application name of the application shortcut icon according to each character and the corresponding start-stop coordinate.
Optionally, the target operation instruction and application name determining unit is specifically configured to:
and inputting the text information into a trained voice recognition model for analysis so as to obtain a target operation instruction and an application name corresponding to a target application program.
Optionally, the target operation instruction and application name determining unit is specifically configured to:
extracting verb keywords and noun keywords from the text information;
determining the target operation instruction according to the verb keyword;
and determining the application name corresponding to the target application program according to the noun keyword.
Optionally, the apparatus further comprises:
the package management server calling unit is used for calling a package management server to analyze the file of the target application program if the target application program is unloaded, and acquiring the application name and the installation package name of the target application program;
and the data deleting unit is used for deleting the application name and the installation name from the application query database to obtain an updated application query database.
Fig. 7 is a schematic diagram of an intelligent terminal according to an embodiment of the present invention. As shown in fig. 7, the intelligent terminal 7 of this embodiment includes: a processor 70, a memory 71 and a computer program 72 stored in said memory 71 and executable on said processor 70. The processor 70, when executing the computer program 72, implements the steps in the various alarm setting method embodiments described above, such as the steps 101 to 104 shown in fig. 1. Alternatively, the processor 70, when executing the computer program 72, implements the functions of the units in the system embodiments, such as the functions of the modules 61 to 64 shown in fig. 6.
The intelligent terminal 7 may include, but is not limited to, a processor 70 and a memory 71. It will be appreciated by those skilled in the art that fig. 7 is merely an example of the intelligent terminal 7 and does not constitute a limitation of the intelligent terminal 7 and may include more or less components than those shown, or some components may be combined, or different components, for example the terminal may also include input output devices, network access devices, buses, etc.
The Processor 70 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 71 may be an internal storage unit of the intelligent terminal 7, such as a hard disk or a memory of the intelligent terminal 7. The memory 71 may also be an external storage device of the intelligent terminal 7, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are equipped on the intelligent terminal 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the smart terminal 7. The memory 71 is used for storing the computer program and other programs and data required by the terminal. The memory 71 may also be used to temporarily store data that has been output or is to be output.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A method for voice control of an application, comprising:
acquiring voice information;
determining a target operation instruction and an application name corresponding to a target application program according to the voice information;
determining the installation package name corresponding to the target application program according to the application name;
and determining the native interface parameters of the target application program according to the installation package name, and calling the native interface to execute the target operation instruction.
2. The method for controlling the application program according to claim 1, wherein the step of determining the installation package name corresponding to the target application program according to the application name comprises:
and searching an installation package name corresponding to the application name from a pre-established application query database according to the application name.
3. The voice control method for an application program according to claim 2, wherein the manner of establishing the correspondence between the application name and the installation package name in the application query database includes:
acquiring an application shortcut icon of an application program in the intelligent terminal, and determining an application name corresponding to the application program according to the application shortcut icon of the application program;
searching an application program file of an application program in the intelligent terminal, and determining an installation package name corresponding to the application program according to the application program file of the application program;
establishing a corresponding relation between an application name corresponding to the application program and an installation package name;
the target application program is an application program in the intelligent terminal.
4. The method for controlling the application program according to claim 3, wherein the step of determining the application name corresponding to the application program according to the application shortcut icon of the application program comprises:
graying the application shortcut icon to obtain a grayed first application icon;
according to a preset gray threshold value, carrying out binarization processing on the gray value of the first application icon to obtain a second application icon;
performing character segmentation on the second application icon based on a two-dimensional projection character segmentation method to obtain characters contained in the second application icon;
and determining the application name corresponding to the application shortcut icon according to the characters, namely determining the application name corresponding to the application program.
5. The speech control method for an application program according to claim 4, wherein the step of character-dividing the second application icon based on a two-dimensional projection character-dividing method comprises:
horizontally projecting the second application icon, and determining the number of character lines in the second application icon;
performing vertical projection on the determined number of the character lines to obtain each character in each line and start-stop coordinates of the character;
and determining characters contained in the second application icon according to the start-stop coordinates.
6. The method for controlling the application program according to claim 1, wherein the step of determining the target operation command and the application name corresponding to the target application program according to the voice information comprises:
and inputting the voice information or the text information converted according to the voice information into a trained voice recognition model for analysis so as to obtain a target operation instruction and an application name corresponding to a target application program.
7. The method for controlling the application program according to claim 1, wherein the step of determining the target operation command and the application name corresponding to the target application program according to the voice information comprises:
converting the voice information into text information;
extracting verb keywords and noun keywords from the text information;
determining the target operation instruction according to the verb keyword;
and determining the application name corresponding to the target application program according to the noun keyword.
8. The speech control method for an application program according to any one of claims 1 to 7, further comprising:
if the target application program is unloaded, calling a package management server to analyze the file of the target application program, and acquiring an application name and an installation package name of the target application program;
and deleting the application name and the installation name from the application query database to obtain an updated application query database.
9. An intelligent terminal comprising a memory, a processor and a computer program stored in said memory and executable on said processor, characterized in that said processor implements the steps of the speech control method of an application according to any of claims 1 to 8 when executing said computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of a method for speech control of an application program according to any one of claims 1 to 8.
CN201910899961.3A 2019-09-23 2019-09-23 Voice control method of application program and intelligent terminal Pending CN112542165A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910899961.3A CN112542165A (en) 2019-09-23 2019-09-23 Voice control method of application program and intelligent terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910899961.3A CN112542165A (en) 2019-09-23 2019-09-23 Voice control method of application program and intelligent terminal

Publications (1)

Publication Number Publication Date
CN112542165A true CN112542165A (en) 2021-03-23

Family

ID=75012847

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910899961.3A Pending CN112542165A (en) 2019-09-23 2019-09-23 Voice control method of application program and intelligent terminal

Country Status (1)

Country Link
CN (1) CN112542165A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076077A (en) * 2021-03-29 2021-07-06 北京梧桐车联科技有限责任公司 Method, device and equipment for installing vehicle-mounted program

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853296A (en) * 2010-05-28 2010-10-06 华为终端有限公司 Method and device for managing application program
CN102184378A (en) * 2011-04-27 2011-09-14 茂名职业技术学院 Method for cutting portable data file (PDF) 417 standard two-dimensional bar code image
CN104035842A (en) * 2014-06-30 2014-09-10 上海斐讯数据通信技术有限公司 Method for deleting and recovering built-in application program
CN104090752A (en) * 2014-06-10 2014-10-08 南靖万利达科技有限公司 Method for promoting customization of shortcut icon on desktop of android system
CN104503779A (en) * 2014-12-09 2015-04-08 北京奇虎科技有限公司 Application program operation method and device
CN104899049A (en) * 2014-03-04 2015-09-09 北京金山安全软件有限公司 File deletion method and device
CN106201427A (en) * 2016-07-15 2016-12-07 东莞酷派软件技术有限公司 A kind of application program launching method and terminal unit
CN107766701A (en) * 2016-08-19 2018-03-06 北京京东尚科信息技术有限公司 Electronic equipment, dynamic library file guard method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853296A (en) * 2010-05-28 2010-10-06 华为终端有限公司 Method and device for managing application program
CN102184378A (en) * 2011-04-27 2011-09-14 茂名职业技术学院 Method for cutting portable data file (PDF) 417 standard two-dimensional bar code image
CN104899049A (en) * 2014-03-04 2015-09-09 北京金山安全软件有限公司 File deletion method and device
CN104090752A (en) * 2014-06-10 2014-10-08 南靖万利达科技有限公司 Method for promoting customization of shortcut icon on desktop of android system
CN104035842A (en) * 2014-06-30 2014-09-10 上海斐讯数据通信技术有限公司 Method for deleting and recovering built-in application program
CN104503779A (en) * 2014-12-09 2015-04-08 北京奇虎科技有限公司 Application program operation method and device
CN106201427A (en) * 2016-07-15 2016-12-07 东莞酷派软件技术有限公司 A kind of application program launching method and terminal unit
CN107766701A (en) * 2016-08-19 2018-03-06 北京京东尚科信息技术有限公司 Electronic equipment, dynamic library file guard method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076077A (en) * 2021-03-29 2021-07-06 北京梧桐车联科技有限责任公司 Method, device and equipment for installing vehicle-mounted program

Similar Documents

Publication Publication Date Title
US11854570B2 (en) Electronic device providing response to voice input, and method and computer readable medium thereof
CN107544271A (en) Terminal control method, device and computer-readable recording medium
CN110290280B (en) Terminal state identification method and device and storage medium
CN109086276B (en) Data translation method, device, terminal and storage medium
CN108460346B (en) Fingerprint identification method and device
US11507856B2 (en) Method and apparatus for updating application
CN110992937B (en) Language off-line identification method, terminal and readable storage medium
CN112331213A (en) Intelligent household equipment control method and device, electronic equipment and storage medium
CN111724781A (en) Audio data storage method and device, terminal and storage medium
CN107832060B (en) Application program interface processing method and device
CN108597499B (en) Voice processing method and voice processing device
CN112542165A (en) Voice control method of application program and intelligent terminal
CN112068947A (en) Application program entering method and device, terminal equipment and computer readable medium
CN112034981A (en) Display terminal control method, display terminal, and computer-readable storage medium
CN112667790A (en) Intelligent question and answer method, device, equipment and storage medium
CN108304104B (en) Data acquisition method and equipment, storage medium and terminal thereof
CN115858776B (en) Variant text classification recognition method, system, storage medium and electronic equipment
CN113220949B (en) Construction method and device of private data identification system
CN106302821B (en) Data request method and equipment thereof
CN114303352B (en) Push content processing method and device, electronic equipment and storage medium
CN113849415A (en) Control testing method and device, storage medium and electronic equipment
CN114463585A (en) Violation flag identification method and system for content community
CN109040774B (en) Program information extraction method, terminal equipment, server and storage medium
AU2013206622B2 (en) Download management method and device based on Android browser
CN111625636A (en) Man-machine conversation refusal identification method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination