Application implementation method and device, storage medium and electronic equipment
By collecting and recognizing the voice signals of target users and automatically converting them into program code, the problem of special groups being unable to write program code independently has been solved, and efficient program code generation has been achieved.
Patent Information
- Application Number
- CN202210738966.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-25
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2042-06-25
AI Technical Summary
In existing technologies, writing program code requires a high level of expertise from the writers, making it impossible for special groups such as the elderly, children, and people with disabilities to write program code independently. Furthermore, the manual writing process is cumbersome, complex, and inefficient.
By collecting the voice signals of the target user, voice type recognition is performed to determine the keyword recognition pattern, and the voice signal is used to recognize keywords based on the pattern, and finally the keywords are converted into program code.
It lowers the professional requirements and operational difficulty of writing program code, enabling special groups of people to write program code independently and improving writing efficiency.
Smart Images

Figure CN115116434B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of application implementation, and more particularly to an application implementation method, apparatus, storage medium, and electronic device. Background Technology
[0002] With the rapid development of Internet technology, more and more people prefer to use various applications (APPs) on mobile devices such as smartphones and tablets to enrich their daily work and life. In order to improve user experience, a large number of applications have been developed on the market to meet people's various needs.
[0003] When developing mobile applications, the high level of expertise required for coding makes it difficult for certain groups (such as the elderly, children, and people with disabilities) to write code independently. In addition, since programmers usually write code manually using code editing tools, and completing an application typically requires writing a massive amount of code, the process is extremely tedious and complex, resulting in low coding efficiency. Summary of the Invention
[0004] This application provides an application implementation method, apparatus, storage medium, and electronic device to alleviate the technical problem of low efficiency in current program code writing.
[0005] To address the aforementioned technical problems, this application provides the following technical solution:
[0006] This application provides an application implementation method, including:
[0007] Collect the voice signal of the target user;
[0008] The speech signal is subjected to speech type recognition to obtain the speech type corresponding to the speech signal;
[0009] Determine the keyword recognition pattern based on the speech type;
[0010] Based on the keyword recognition pattern, the speech signal is subjected to keyword recognition to obtain the keywords of the speech signal;
[0011] The keywords are processed by program code conversion to obtain the program code of the application corresponding to the voice signal.
[0012] The step of performing speech type recognition on the speech signal to obtain the speech type corresponding to the speech signal includes:
[0013] The speech signal is input into the speech type recognition module to identify the speech type corresponding to the speech signal; wherein, the speech type includes spoken language type and written language type.
[0014] The speech type recognition module includes a speech type recognition network. The step of inputting the speech signal into the speech type recognition module to identify the speech type corresponding to the speech signal includes:
[0015] The speech signal is input into the speech type recognition network to extract speech features from the speech signal and determine the speech type corresponding to the speech features.
[0016] The speech type corresponding to the speech feature is taken as the speech type corresponding to the speech signal.
[0017] The speech type recognition module further includes a speech type recognition library. The step of inputting the speech signal into the speech type recognition module to identify the speech type corresponding to the speech signal further includes:
[0018] The speech signal is input into a speech type recognition library to determine the speech type corresponding to the speech signal through the mapping relationship between speech information and speech types stored in the speech type recognition library; wherein, the speech information includes semantic information and tone information.
[0019] The step of determining the keyword recognition pattern based on the speech type includes:
[0020] When the speech type is the spoken language type, the spoken language keyword recognition pattern is used as the keyword recognition pattern;
[0021] When the speech type is the written language type, the written language keyword recognition pattern is used as the keyword recognition pattern.
[0022] The step of performing keyword recognition on the speech signal based on the keyword recognition pattern to obtain the keywords of the speech signal includes:
[0023] When the keyword recognition mode is the spoken keyword recognition mode, the voice signal is input into the spoken keyword mapping library so as to query the keywords of the voice signal through the spoken keyword mapping library;
[0024] When the keyword recognition mode is the written language keyword recognition mode, the speech signal is input into the written language keyword mapping library to query the keywords of the speech signal through the written language keyword mapping library.
[0025] The step of performing keyword recognition on the speech signal based on the keyword recognition pattern to obtain the keywords of the speech signal further includes:
[0026] If the number of keywords in the speech signal is less than a threshold, semantic association processing is performed based on the identified keywords to obtain associated keywords that are related to the identified keywords; wherein, the identified keywords are the keywords of the identified speech signal.
[0027] The step of performing program code conversion processing on the keywords to obtain the program code of the application corresponding to the voice signal includes:
[0028] Convert the identified keywords and associated keywords into code functional semantic feature identifiers;
[0029] The semantic feature identifier of the code function is decoded to obtain the program code of the application corresponding to the voice signal.
[0030] The step of performing program code conversion processing on the keywords to obtain the program code of the application corresponding to the voice signal further includes:
[0031] If the identified keyword or the associated keyword meets the parameter acquisition conditions, generate a parameter acquisition voice command;
[0032] Receive the parameter voice signal sent by the target user based on the parameter acquisition voice command;
[0033] The parameter keywords of the parameter speech signal are identified, and the parameter keywords, the identified keywords and the associated keywords are converted into program code to obtain the program code of the application corresponding to the speech signal.
[0034] The step of performing program code conversion processing on the keywords to obtain the program code of the application corresponding to the voice signal further includes:
[0035] When a code is received to modify the voice signal, the application program code corresponding to the voice signal is modified according to the code to modify the voice signal.
[0036] This application embodiment also provides an application implementation apparatus, including:
[0037] The acquisition module is used to acquire the voice signals of the target user;
[0038] A speech type recognition module is used to perform speech type recognition on the speech signal to obtain the speech type corresponding to the speech signal;
[0039] The determination module is used to determine the keyword recognition pattern based on the speech type;
[0040] A keyword recognition module is used to perform keyword recognition on the speech signal based on the keyword recognition pattern to obtain the keywords of the speech signal;
[0041] The conversion module is used to perform program code conversion processing on the keywords to obtain the program code of the application corresponding to the voice signal.
[0042] This application also provides a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute the steps in the above-described application implementation method.
[0043] This application also provides an electronic device, including a processor and a memory, wherein the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used to execute the steps in the above-described application implementation method.
[0044] This application provides an application implementation method, apparatus, storage medium, and electronic device. First, it acquires the voice signal of a target user. Then, it performs voice type recognition on the voice signal to obtain the corresponding voice type. Next, it determines a keyword recognition mode based on the voice type and performs keyword recognition on the voice signal based on the keyword recognition mode to obtain the keywords of the voice signal. Finally, it performs program code conversion processing on the keywords to obtain the program code corresponding to the voice signal. Since the corresponding program code can be automatically generated from the voice signal, the user only needs to emit a voice signal to complete the program code writing. This writing process has low professional requirements for the user and is easy to operate, thereby effectively reducing the difficulty of writing program code and thus effectively improving the efficiency of program code writing. Attached Figure Description
[0045] The technical solution and other beneficial effects of this application will become apparent from the following detailed description of specific embodiments in conjunction with the accompanying drawings.
[0046] Figure 1 This is a flowchart illustrating the application implementation method provided in the embodiments of this application.
[0047] Figure 2 This is a schematic diagram of a scenario illustrating the application implementation method provided in the embodiments of this application.
[0048] Figure 3 This is a schematic diagram of the application implementation device provided in the embodiments of this application.
[0049] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application.
[0050] Figure 5This is another structural schematic diagram of the electronic device provided in the embodiments of this application. Detailed Implementation
[0051] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0052] This application provides an application implementation method, apparatus, storage medium, and electronic device.
[0053] like Figure 1 As shown, Figure 1 This is a flowchart illustrating the application implementation method provided in this application embodiment. The specific process can be as follows:
[0054] S101. Collect the voice signal of the target user.
[0055] Speech signals are short-term stationary signals used to carry speech information (e.g., semantics, tone, etc.), and the target user is the one emitting the speech signal. Specifically, in practical applications, the speech signal input by the target user can be acquired through audio input devices such as microphones or microphone arrays. These audio input devices can be built-in or external components of the computer device, and the speech signal can then be read from the output of the audio input device.
[0056] For example, when a target user transmits a voice signal carrying the semantic information "add an array" through a microphone, the microphone completes the acquisition of the voice signal.
[0057] Optionally, after the voice signal is acquired, noise reduction processing can be performed on the voice signal to minimize the interference of the voice environment on the voice signal, thereby extracting effective voice information in a complex voice environment.
[0058] S102. Perform speech type recognition on the speech signal to obtain the speech type corresponding to the speech signal.
[0059] Among them, speech type is used to characterize the attributes and categories of speech signals. Specifically, since different target users have different speaking habits, for example, some target users are accustomed to speaking spoken language, while others are accustomed to speaking written language, in order to correctly identify speech signals, it is necessary to first determine the speech type corresponding to the speech signal.
[0060] In this embodiment, a speech signal is input to a speech type recognition module to identify the speech type corresponding to the speech signal. Optionally, the speech type includes spoken language and written language. The speech type recognition module can be a device or program with speech type recognition functionality.
[0061] In one embodiment, the speech type recognition module is a speech type recognition network. When recognizing the speech type corresponding to a speech signal, the speech signal is input into the speech type recognition network. Optionally, the speech type recognition network is a YOLO network. In practical applications, a large number of speech features of spoken and written types are extracted in advance using the YOLO network, and the network is trained multiple times based on the extracted speech features. The trained YOLO network has the ability to recognize speech features of spoken / written types. At this time, the speech signal is input into the trained YOLO network to extract speech features from the speech signal using the YOLO network, determine the speech type corresponding to the speech feature, and use the speech type corresponding to the speech feature as the speech type corresponding to the speech signal.
[0062] For example, a speech signal A carrying the semantic information of "running code" and a speech signal B carrying the semantic information of "start running" are input into a speech type recognition network. The speech type recognition network extracts the speech features of speech signal A as feature a and the speech features of speech signal B as feature b, and determines that the speech type corresponding to feature a is spoken language and the speech type corresponding to feature b is written language. Therefore, it is determined that the speech type corresponding to speech signal A is spoken language and the speech type corresponding to speech signal B is written language.
[0063] In another embodiment, the speech type recognition module is a speech type recognition library, wherein the speech type recognition library stores the mapping relationship between speech information (including semantic information and tone information) of speech signals and speech types. When recognizing the speech type corresponding to a speech signal, the speech signal is input into the speech type recognition library so as to query the mapping relationship between the speech information and speech types stored in the speech type recognition library to determine the speech type corresponding to the speech signal.
[0064] For example, a speech signal with semantic information "must have an M subclass" and tone information "interrogative" is input into a speech type recognition library. The library is then used to query the mapping relationship between the stored speech information and speech types to determine that the speech signal represents the meaning that an M subclass does not need to be set, and its corresponding speech type is spoken language.
[0065] S103. Determine the keyword recognition mode based on the speech type.
[0066] The keyword recognition mode is a method used to identify keywords in speech signals. Specifically, since speech signals may carry a large amount of semantic information, some of which may be irrelevant to the program code, it is necessary to extract effective semantic information (e.g., keywords) and filter out redundant and irrelevant semantic information to ensure the reliability of the final generated program code. Optionally, the keyword recognition mode includes spoken language keyword recognition mode and written language keyword recognition mode, with different keyword recognition mechanisms. When the speech type is spoken language, the spoken language keyword recognition mode is used as the keyword recognition mode; when the speech type is written language, the written language keyword recognition mode is used as the keyword recognition mode.
[0067] For example, since the speech type of speech signal A carrying the semantic information of "running code" is spoken language, the spoken language keyword recognition mode is used as the keyword recognition mode of speech signal A. Since the speech type of speech signal B carrying the semantic information of "start running" is written language, the written language keyword recognition mode is used as the keyword recognition mode of speech signal B.
[0068] S104. Based on the keyword recognition mode, perform keyword recognition on the speech signal to obtain the keywords of the speech signal.
[0069] The keywords in the speech signal are words that are highly related to the program code, such as "add", "save", and "run". In order to ensure the reliability of the final generated program code, it is necessary to extract the keywords from the speech signal so that the program code with high reliability can be generated based on the keywords.
[0070] Furthermore, step S104 specifically includes:
[0071] When the keyword recognition mode is spoken keyword recognition mode, the voice signal is input into the spoken keyword mapping library so that the keywords of the voice signal can be queried through the spoken keyword mapping library;
[0072] When the keyword recognition mode is the written language keyword recognition mode, the speech signal is input into the written language keyword mapping library so that the keywords of the speech signal can be queried through the written language keyword mapping library.
[0073] The spoken language keyword mapping library stores the mapping relationship between spoken language semantics and keywords, while the written language keyword mapping library stores the mapping relationship between written language semantics and keywords. In practical applications, several mapping relationships between spoken language semantics / written language semantics and keywords can be pre-set in the spoken language keyword mapping library / written language keyword mapping library (for example, the spoken language keyword mapping library stores the mapping relationship between the spoken language semantics "search now" and "start searching next" and the keyword "query"; the written language keyword mapping library stores the mapping relationship between the written language semantics "inherit parent class attributes" and the keyword "add subclass"). After the voice signal is input into the spoken language keyword mapping library / written language keyword mapping library, the spoken language keyword mapping library / written language keyword mapping library will automatically query the mapping relationship between the spoken language semantics / written language semantics of the voice signal and keywords to determine the keywords of the voice signal.
[0074] For example, a speech signal C carrying the spoken semantics of "search now" is input into a spoken keyword mapping library, so that the keyword found by the spoken keyword mapping library for speech signal C is "search"; a speech signal D carrying the written semantics of "inherit parent class attributes" is input into a written keyword mapping library, so that the keyword found by the written keyword mapping library for speech signal D is "add subclass".
[0075] Specifically, because different target users have different language habits, they will express the same meaning in different ways. For example, when expressing the keyword "search", target user Q is used to saying "I am going to search now", while target user P is used to saying "Next, we can search". In order to ensure that the program code written by different target users has high reliability, a personal voice mapping library can be built in advance. This personal voice mapping library stores the language expressions that users are used to and their corresponding keywords (which can be customized by the user). When the user emits a voice signal, the personal voice mapping library is automatically called to query the keyword corresponding to the voice signal.
[0076] Furthermore, each individual voice mapping library has mutual access permissions. Specifically, since the content stored in an individual voice mapping library is limited, in order to avoid the situation where the keyword corresponding to the voice signal cannot be found during use, the individual voice mapping libraries of other target users with the same / similar attributes can also be searched based on the target user's (i.e., job position, age, etc.) personal attributes, thereby improving the success rate of keyword recognition.
[0077] For example, if target user Q is a teacher and is 25 years old, when target user Q utters the spoken word "start running", no corresponding keyword is found in target user Q's personal voice mapping library. At this time, the personal voice mapping library of target user P, who is also a teacher and is 26 years old, can be accessed, and the keyword corresponding to the spoken word "start running" can be found as "run".
[0078] Optionally, a camera device can be used to capture the target user's actions and gestures to determine keywords based on the captured actions and gestures. Specifically, a mapping relationship between actions / gestures and keywords can be preset. When the target user makes an action / gesture, it is compared with the preset action / gesture to determine the corresponding keyword. For example, if the target user makes an OK gesture (bending the thumb and index finger into an "O" shape and straightening the other three fingers), since the OK gesture has a mapping relationship with the keyword "run," the keyword corresponding to the gesture made by the target user at this time is determined to be "run."
[0079] Furthermore, following step S104 above, the method further includes:
[0080] If the number of keywords in the speech signal is less than the threshold, semantic association processing is performed based on the identified keywords (i.e., the keywords in the identified speech signal) to obtain associated keywords that are related to the identified keywords.
[0081] If the number of keywords in the speech signal is less than a threshold, it indicates that the number of keywords acquired is insufficient to guarantee that they can be combined into a complete sentence. To avoid code omissions in the subsequently generated program code, a coherence check is performed on the identified keywords in the speech signal. If the coherence is less than a preset value, contextual semantic association processing is performed based on the identified keywords to infer more keywords with a high degree of relevance to the speech signal (i.e., related keywords). For example, if the threshold is 4, such as... Figure 2 As shown, the target user sends a voice signal 2001 to the server 2002 saying "I want to create a window". The server 2002 extracts the keywords from the voice signal 2001 and sorts them in order: "create" and "window". In other words, the number of identified keywords is less than the threshold. Therefore, the server performs contextual semantic association processing based on the identified keywords: Since creating a window requires setting the window size, title and coordinates, it is inferred that the associated keywords of the voice signal 2001 are "size", "title name" and "coordinates".
[0082] S105. Perform program code conversion processing on the keywords to obtain the program code corresponding to the speech signal.
[0083] In this context, the application code corresponding to the voice signal is used to implement the application's functionality. The application is an executable file generated after the program code is compiled and linked. Specifically, in one embodiment, the identified keywords and associated keywords are converted into code function semantic feature identifiers, and then the code function semantic feature identifiers are decoded to obtain the application code corresponding to the voice signal. For example, as... Figure 4 The identified keywords are "create" and "window", and the associated keywords are "size", "title name" and "coordinate". Server 2002 converts them into code function semantic feature identifiers, and then decodes the code function semantic feature identifiers to obtain the program code 2003 of the application corresponding to the voice signal 2001: typedef struct {int width; int height; char* title; int coordinate}.
[0084] Furthermore, in another embodiment, if the semantic environment represented by the identified keywords or associated keywords is missing parameters, it is determined that the parameter acquisition conditions are met, and a parameter acquisition voice command (i.e., voice prompt) is automatically generated. The target user can send a parameter voice signal carrying semantic information of the parameters to the server according to the parameter acquisition voice command. After receiving the parameter voice signal, the server can identify the parameter keywords in the parameter voice signal. Finally, the parameter keywords, identified keywords and associated keywords are processed by program code conversion to obtain the program code of the application corresponding to the voice signal.
[0085] For example, the keywords "create" and "window" have been identified, and the associated keywords are "size", "title name" and "coordinates". Since the specific size parameters, title name parameters and coordinate parameters of the window are missing, it is determined that the parameter acquisition conditions are met, and the voice command "Please enter the window size parameters, window title name parameters and window coordinate parameters" is automatically generated. After hearing the voice command, the target user outputs the parameter voice signal "The window width is 640, the height is 480, the title name is "Insurance Mall Login Interface", the horizontal coordinate is 10, and the vertical coordinate is 52". The parameter keywords in the parameter voice signal are identified as "window width equals 640", "window height equals 480", "window title name is "Insurance Mall Login Interface"", and "window coordinates are (10, 52)". Finally, each keyword is converted into code function semantic feature identifiers, and then the code function semantic feature identifiers are decoded to obtain the program code of the application corresponding to the voice signal as: #define width 640; #define height 480; #define title "Insurance Mall Login Interface"; #define coordinate 10, 52.
[0086] Optionally, after generating the application code corresponding to the voice signal, the generated application code can be displayed on a screen for the target user to view. If the target user finds any errors or omissions in the application code, they can send a code-modified voice signal. After receiving the code-modified voice signal, the server modifies the application code corresponding to the voice signal according to the code-modified voice signal. Specifically, the process of modifying the application code corresponding to the voice signal according to the code-modified voice signal is the same as the process of generating the application code corresponding to the voice signal described above, and therefore will not be repeated here.
[0087] In the current mobile application development process, due to the high professional requirements of code writers, some special groups (such as the elderly, children, or people with disabilities) have limited professional knowledge or are unable to type manually, making it impossible for them to write program code independently. This leads to a series of adverse effects: for example, children may have a strong interest in application development, but due to their limited comprehension and learning abilities, they cannot write program code manually, which is detrimental to their intellectual development and interest cultivation; or, people with disabilities may have strong application development skills, but their physical disabilities prevent them from writing program code manually, thus preventing them from fully utilizing their professional skills. In addition, since programmers usually write program code manually by typing using code editing tools, and a massive amount of code is usually required to complete an application, this process is extremely tedious and complex, resulting in low program code writing efficiency.
[0088] To alleviate the above problems, the application implementation method provided in this application collects the voice signal of the target user to replace the current method of manually typing to complete the program code writing. This writing process has low professional requirements for the target user and is easy to operate, effectively reducing the difficulty of writing program code and enabling special groups of people to write program code independently. In addition, compared with the current method of manually typing, automatically writing program code through voice signal can effectively improve the efficiency of writing program code.
[0089] As described above, the application implementation method provided in this application first collects the voice signal of the target user, then performs voice type recognition on the voice signal to obtain the corresponding voice type, then determines the keyword recognition mode based on the voice type, and performs keyword recognition on the voice signal based on the keyword recognition mode to obtain the keywords of the voice signal, and finally performs program code conversion processing on the keywords to obtain the program code of the application corresponding to the voice signal. Since the corresponding program code can be automatically generated from the voice signal, the user only needs to emit a voice signal to complete the program code writing. This writing process has low professional requirements for the user and low operation difficulty, thereby effectively reducing the difficulty of writing program code and thus effectively improving the efficiency of writing program code.
[0090] Based on the methods described in the above embodiments, this embodiment will be further described from the perspective of application implementation apparatus.
[0091] Please see Figure 3 , Figure 3 This application provides a detailed description of an application implementation device, which may include: a data acquisition module 10, a voice type recognition module 20, a determination module 30, a keyword recognition module 40, and a conversion module 50, wherein:
[0092] (1) Acquisition Module 10
[0093] Acquisition module 10 is used to acquire the voice signal of the target user.
[0094] (2) Voice type recognition module 20
[0095] The speech type recognition module 20 is used to recognize the speech type of the speech signal and obtain the speech type corresponding to the speech signal.
[0096] Specifically, the voice type recognition module 20 is used for:
[0097] The speech signal is input into the speech type recognition module to identify the speech type corresponding to the speech signal; the speech type includes spoken language type and written language type.
[0098] Specifically, the speech type recognition module includes a speech type recognition network, and the speech type recognition module 20 is also used for:
[0099] The speech signal is input into the speech type recognition network to extract speech features from the speech signal and determine the speech type corresponding to the speech features.
[0100] The speech type corresponding to the speech features is taken as the speech type corresponding to the speech signal.
[0101] Furthermore, the speech type recognition module also includes a speech type recognition library, and the speech type recognition module 20 is also used for:
[0102] The speech signal is input into the speech type recognition library to determine the speech type corresponding to the speech signal through the mapping relationship between the speech information and speech types stored in the speech type recognition library; wherein, the speech information includes semantic information and tone information.
[0103] (3) Determine module 30
[0104] The determination module 30 is used to determine the keyword recognition mode based on the speech type.
[0105] Specifically, the determining module 30 is used for:
[0106] When the speech type is spoken language, the spoken language keyword recognition pattern is used as the keyword recognition pattern.
[0107] When the speech type is written language, the written language keyword recognition pattern is used as the keyword recognition pattern.
[0108] (4) Keyword recognition module 40
[0109] The keyword recognition module 40 is used to perform keyword recognition on the speech signal based on the keyword recognition pattern to obtain the keywords of the speech signal.
[0110] Specifically, the keyword recognition module 40 is used for:
[0111] When the keyword recognition mode is spoken keyword recognition mode, the voice signal is input into the spoken keyword mapping library so that the keywords of the voice signal can be queried through the spoken keyword mapping library;
[0112] When the keyword recognition mode is the written language keyword recognition mode, the speech signal is input into the written language keyword mapping library so that the keywords of the speech signal can be queried through the written language keyword mapping library.
[0113] (5) Conversion module 50
[0114] The conversion module 50 is used to perform program code conversion processing on the keywords to obtain the program code of the application corresponding to the voice signal.
[0115] Specifically, the conversion module 50 is used for:
[0116] Convert the identified keywords and related keywords into semantic feature identifiers for code functions;
[0117] The semantic feature identifiers of the code function are decoded to obtain the program code of the application corresponding to the speech signal.
[0118] Specifically, the conversion module 50 is also used for:
[0119] If the identified keywords or related keywords meet the parameter retrieval conditions, generate a voice command to retrieve the parameters.
[0120] Receive the parameter voice signal sent by the target user based on the parameter acquisition voice command;
[0121] The program identifies the parameter keywords in the parameterized speech signal, and then performs program code conversion processing on the parameter keywords, identified keywords, and associated keywords to obtain the program code corresponding to the speech signal for the application.
[0122] In practice, the above modules can be implemented as independent entities or combined in any way to be implemented as the same or several entities. For the specific implementation of the above modules, please refer to the previous method implementation examples, which will not be repeated here.
[0123] As described above, the application implementation device provided in this application first acquires the voice signal of the target user through the acquisition module 10, then performs voice type recognition on the voice signal through the voice type recognition module 20 to obtain the corresponding voice type, then determines the keyword recognition mode based on the voice type through the determination module 30, and performs keyword recognition on the voice signal based on the keyword recognition mode through the keyword recognition module 40 to obtain the keywords of the voice signal, and finally performs program code conversion processing on the keywords through the conversion module 50 to obtain the program code of the application corresponding to the voice signal. Since the corresponding program code can be automatically generated based on the voice signal, the user only needs to emit a voice signal to complete the program code writing. This writing process has low professional requirements for the user and low operation difficulty, thereby effectively reducing the difficulty of writing program code and thus effectively improving the efficiency of writing program code.
[0124] Accordingly, embodiments of the present invention also provide an application implementation system, including any of the application implementation devices provided in the embodiments of the present invention, which can be integrated into an electronic device.
[0125] The process involves: collecting the voice signal of the target user; performing voice type recognition on the voice signal to obtain the corresponding voice type; determining the keyword recognition mode based on the voice type; performing keyword recognition on the voice signal based on the keyword recognition mode to obtain the keywords of the voice signal; and performing program code conversion processing on the keywords to obtain the program code of the application corresponding to the voice signal.
[0126] The specific implementation details of each of the above devices can be found in the preceding embodiments, and will not be repeated here.
[0127] Since the application implementation system can include any of the application implementation devices provided in the embodiments of the present invention, it can achieve the beneficial effects that any of the application implementation devices provided in the embodiments of the present invention can achieve, as detailed in the preceding embodiments, and will not be repeated here.
[0128] Additionally, this application also provides an electronic device, which may be a smartphone or a computer, etc. Figure 4 As shown, the electronic device 400 includes a processor 401 and a memory 402. The processor 401 and the memory 402 are electrically connected.
[0129] The processor 401 is the control center of the electronic device 400. It connects various parts of the electronic device through various interfaces and lines. By running or loading the application program stored in the memory 402 and calling the data stored in the memory 402, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole.
[0130] In this embodiment, the processor 401 in the electronic device 400 loads the instructions corresponding to the processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 runs the application programs stored in the memory 402 to realize various functions:
[0131] Collect the voice signal of the target user;
[0132] Speech type recognition is performed on the speech signal to obtain the speech type corresponding to the speech signal;
[0133] Determine the keyword recognition pattern based on the speech type;
[0134] Keyword recognition is performed on the speech signal based on the keyword recognition pattern to obtain the keywords of the speech signal;
[0135] The keywords are processed by program code conversion to obtain the program code corresponding to the speech signal.
[0136] Figure 5 A specific structural block diagram of an electronic device provided in an embodiment of the present invention is shown. This electronic device can be used to implement the application implementation method provided in the above embodiment.
[0137] RF circuit 510 is used to receive and transmit electromagnetic waves, converting electromagnetic waves into electrical signals and vice versa, thereby enabling communication with communication networks or other devices. RF circuit 510 may include various existing circuit elements used to perform these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, Subscriber Identity Module (SIM) cards, memory, etc. RF circuit 510 can communicate with various networks such as the Internet, corporate intranets, and wireless networks, or communicate with other devices via wireless networks. The aforementioned wireless networks may include cellular telephone networks, wireless local area networks (WLANs), or metropolitan area networks (MANs). The aforementioned wireless networks may use various communication standards, protocols, and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as IEEE 802.11a, IEEE 802.11b, IEEE 802.11g, and / or IEEE 802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging, and short messages, and any other suitable communication protocols, including those that have not yet been developed.
[0138] The memory 520 can be used to store software programs and modules. The processor 580 executes various functional applications and data processing by running the software programs and modules stored in the memory 520, thereby realizing the function of storing 5G capability information. The memory 520 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 520 may further include memory remotely located relative to the processor 580, and these remote memories can be connected to the electronic device 500 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0139] The input unit 530 can be used to receive input digital or character information, and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. Specifically, the input unit 530 may include a touch-sensitive surface 531 and other input devices 532. The touch-sensitive surface 531, also known as a touch display screen or touchpad, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch-sensitive surface 531), and drive the corresponding connection device according to a pre-set program. Optionally, the touch-sensitive surface 531 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 580, and can receive and execute commands from the processor 580. In addition, the touch-sensitive surface 531 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 531, the input unit 530 may also include other input devices 532. Specifically, other input devices 532 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.
[0140] Display unit 540 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of electronic device 500. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Display unit 540 may include display panel 541, optionally configured as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, touch-sensitive surface 531 may cover display panel 541. When touch-sensitive surface 531 detects a touch operation on or near it, it transmits the information to processor 580 to determine the type of touch event. Subsequently, processor 580 provides corresponding visual output on display panel 541 according to the type of touch event. Although in Figure 5 In this embodiment, the touch-sensitive surface 531 and the display panel 541 are implemented as two separate components to realize the input and output functions. However, in some embodiments, the touch-sensitive surface 531 and the display panel 541 can be integrated to realize the input and output functions.
[0141] The electronic device 500 may also include at least one sensor 550, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 541 according to the ambient light level, and the proximity sensor can turn off the display panel 541 and / or backlight when the electronic device 500 is moved to the ear. As a type of motion sensor, a gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometers, taps), etc. Other sensors that the electronic device 500 may also be equipped with, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.
[0142] Audio circuitry 560, speaker 561, and microphone 562 provide an audio interface between the user and electronic device 500. Audio circuitry 560 converts received audio data into electrical signals and transmits them to speaker 561, where speaker 561 converts them into sound signals for output. Conversely, microphone 562 converts collected sound signals into electrical signals, which are then received by audio circuitry 560, converted back into audio data, and processed by processor 580. The audio data is then transmitted via RF circuitry 510 to, for example, another terminal, or output to memory 520 for further processing. Audio circuitry 560 may also include an earphone jack to facilitate communication between external headphones and electronic device 500.
[0143] Electronic device 500, through transmission module 570 (e.g., Wi-Fi module), can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 5 The transmission module 570 is shown, but it is understood that it is not a necessary component of the electronic device 500 and can be omitted as needed without changing the nature of the invention.
[0144] The processor 580 is the control center of the electronic device 500. It connects to various parts of the phone via various interfaces and lines, and performs various functions and processes data of the electronic device 500 by running or executing software programs and / or modules stored in the memory 520, and by calling data stored in the memory 520. Optionally, the processor 580 may include one or more processing cores; in some embodiments, the processor 580 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 580.
[0145] Electronic device 500 also includes a power supply 590 (such as a battery) for supplying power to various components. In some embodiments, the power supply may be logically connected to processor 580 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. The power supply 590 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0146] Although not shown, the electronic device 500 may also include a camera (such as a front-facing camera and a rear-facing camera), a Bluetooth module, etc., which will not be described in detail here. Specifically, in this embodiment, the display unit of the electronic device is a touch screen display, and the electronic device also includes a memory and one or more programs, wherein one or more programs are stored in the memory and configured to be executed by one or more processors. One or more programs contain instructions for performing the following operations:
[0147] Collect the voice signal of the target user;
[0148] Speech type recognition is performed on the speech signal to obtain the speech type corresponding to the speech signal;
[0149] Determine the keyword recognition pattern based on the speech type;
[0150] Keyword recognition is performed on the speech signal based on the keyword recognition pattern to obtain the keywords of the speech signal;
[0151] The keywords are processed by program code conversion to obtain the program code corresponding to the speech signal.
[0152] In practice, the above modules can be implemented as independent entities or combined in any way to be implemented as the same or several entities. For the specific implementation of the above modules, please refer to the previous method implementation examples, which will not be repeated here.
[0153] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. Therefore, embodiments of the present invention provide a storage medium storing multiple instructions that can be loaded by a processor to execute the steps in any of the application implementation methods provided by the embodiments of the present invention.
[0154] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0155] Since the instructions stored in the storage medium can execute the steps in any of the application implementation methods provided in the embodiments of the present invention, the beneficial effects that any of the application implementation methods provided in the embodiments of the present invention can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0156] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0157] In summary, although the present application has disclosed the preferred embodiments as described above, the above preferred embodiments are not intended to limit the present application. Those skilled in the art can make various modifications and refinements without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be determined by the scope defined in the claims.
Claims
1. An application implementation method, characterized by, The method comprises the following steps: collecting a voice signal of a target user; performing voice type recognition on the voice signal to obtain a voice type corresponding to the voice signal; determining a keyword recognition mode according to the voice type; performing keyword recognition on the voice signal based on the keyword recognition mode to obtain keywords of the voice signal; if the number of keywords of the voice signal is less than a threshold, performing semantic association processing based on the recognized keywords to obtain associated keywords having an association relationship with the recognized keywords; wherein the recognized keywords are the recognized keywords of the voice signal; performing program code conversion processing on the recognized keywords and the associated keywords to obtain program code of an application corresponding to the voice signal; the step of performing program code conversion processing on the recognized keywords and the associated keywords to obtain program code of an application corresponding to the voice signal comprises: if the recognized keywords or the associated keywords meet parameter acquisition conditions, generating a parameter acquisition voice instruction; receiving a parameter voice signal sent by the target user based on the parameter acquisition voice instruction; recognizing a parameter keyword of the parameter voice signal, and performing program code conversion processing on the parameter keyword, the recognized keywords and the associated keywords to obtain program code of an application corresponding to the voice signal.
2. The application implementation method of claim 1, wherein, the step of performing voice type recognition on the voice signal to obtain a voice type corresponding to the voice signal comprises: inputting the voice signal into a voice type recognition module to recognize the voice type corresponding to the voice signal through the voice type recognition module; wherein the voice type includes a spoken language type and a written language type.
3. The application implementation method of claim 2, wherein, the voice type recognition module comprises a voice type recognition network, and the step of inputting the voice signal into the voice type recognition module to recognize the voice type corresponding to the voice signal through the voice type recognition module comprises: inputting the voice signal into the voice type recognition network to extract voice features in the voice signal through the voice type recognition network, and determine the voice type corresponding to the voice features; taking the voice type corresponding to the voice features as the voice type corresponding to the voice signal.
4. The application implementation method of claim 2, wherein, the voice type recognition module further comprises a voice type recognition library, and the step of inputting the voice signal into the voice type recognition module to recognize the voice type corresponding to the voice signal through the voice type recognition module further comprises: inputting the voice signal into the voice type recognition library to determine the voice type corresponding to the voice signal through a mapping relationship between voice information and voice types stored in the voice type recognition library; wherein the voice information includes semantic information and tone information.
5. The application implementation method according to claim 3 or 4, characterized in that, the step of determining a keyword recognition mode according to the voice type comprises: when the voice type is the spoken language type, taking a spoken language keyword recognition mode as the keyword recognition mode; when the voice type is the written language type, taking a written language keyword recognition mode as the keyword recognition mode.
6. The application implementation method of claim 5, wherein, The keyword recognition mode is based on the keyword recognition mode, and the keyword recognition mode is based on the keyword recognition mode. When the keyword recognition mode is the spoken keyword recognition mode, the speech signal is input into a spoken keyword mapping library to query the keyword of the speech signal through the spoken keyword mapping library; When the keyword recognition mode is the written keyword recognition mode, the speech signal is input into a written keyword mapping library to query the keyword of the speech signal through the written keyword mapping library.
7. The application implementation method of claim 1, wherein, The program code conversion processing of the identified keyword and the associated keyword is performed, and the program code corresponding to the application of the speech signal is obtained. The identified keyword and the associated keyword are converted into code function semantic feature identifiers; The code function semantic feature identifiers are decoded to obtain the program code corresponding to the application of the speech signal.
8. The application implementation method of claim 7, wherein, After the step of performing program code conversion processing on the identified keyword and the associated keyword to obtain the program code corresponding to the application of the speech signal, the method further comprises: When a code modification speech signal is received, the program code corresponding to the application of the speech signal is modified according to the code modification speech signal.
9. An application implementation apparatus, characterized by comprising: Comprise: The acquisition module is used for acquiring the speech signal of the target user; The speech type recognition module is used for performing speech type recognition on the speech signal to obtain the speech type corresponding to the speech signal; The determination module is used for determining the keyword recognition mode according to the speech type; The keyword recognition module is used for performing keyword recognition on the speech signal based on the keyword recognition mode to obtain the keyword of the speech signal; if the number of keywords of the speech signal is less than a threshold, semantic association processing is performed based on the identified keyword to obtain the associated keyword having an association relationship with the identified keyword; wherein the identified keyword is the identified keyword of the speech signal; The conversion module is used for performing program code conversion processing on the identified keyword and the associated keyword to obtain the program code corresponding to the application of the speech signal; The program code conversion processing of the identified keyword and the associated keyword is performed, and the program code corresponding to the application of the speech signal is obtained. If the identified keyword or the associated keyword meets the parameter acquisition condition, a parameter acquisition voice instruction is generated; The parameter voice signal sent by the target user based on the parameter acquisition voice instruction is received; The parameter keyword of the parameter voice signal is recognized, and the parameter keyword, the identified keyword and the associated keyword are subjected to program code conversion processing to obtain the program code corresponding to the application of the speech signal.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by the processor to execute the steps in the application implementation method of any one of claims 1 to 8.
11. An electronic device, comprising: The application comprises a processor and a memory, the processor is electrically connected with the memory, the memory is used for storing instructions and data, and the processor is used for executing the steps in the application implementation method of any one of claims 1 to 8.
Citation Information
Patent Citations
A method and system for determining semantics by speech
CN109241332A
Code writing method and device and computer equipment
CN111292721A