Voice development method, system, electronic device, and medium

By using voice-based development methods and systems, source code files can be acquired and generated through voice input, solving the problems of high barriers to entry and low development efficiency in Huawei's HarmonyOS system. This improves development efficiency, reduces repetitive labor, and enhances the development experience.

CN115080007BActive Publication Date: 2025-11-18HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110277635.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-15
Publication Date
2025-11-18
Estimated Expiration
2041-03-15

AI Technical Summary

Technical Problem

In existing technologies, emerging operating systems such as Huawei's HarmonyOS have high development thresholds and low development efficiency. Furthermore, the software application development process can easily lead to repetitive strain injuries, affecting the health of developers.

Method used

This invention provides a voice-based development method and system that obtains development instructions through voice input, recognizes and generates corresponding development source code files, simplifies the operation process, improves development efficiency, and reduces the risk of developer fatigue.

Benefits of technology

By using voice-based development methods, the program development process is simplified, development efficiency is improved, the development threshold is lowered, repetitive labor is reduced, and the development experience is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115080007B_ABST
    Figure CN115080007B_ABST
Patent Text Reader

Abstract

The application designs a voice development method, system, electronic device and medium. The voice development method comprises the following steps: obtaining a voice development instruction of a user, obtaining corresponding program development parameters according to the voice development instruction, generating a development source code file of a program according to the program development parameters, and finally compiling the development source code file to generate the program. Compared with the traditional program development mode, the technical scheme of the application can improve the development efficiency of the developer, reduce the threshold of program development, avoid the threat to the health of the developer caused by long-time keystrokes and mouse clicks, and has universality and generalizability.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of software development, and particularly relates to a voice development method and system, an electronic device and a medium. BACKGROUND

[0002] With the continuous progress and development of science and technology, the demand for linkage between various intelligent devices has emerged, and the operating system used by the intelligent device is required to have strong interactivity and universality, so as to realize application scenarios such as on-screen cooperation between a mobile phone and a computer. On the contrary, the Android open source operating system (Android) with a large market share gradually cannot support the increasing device collaboration demand. Therefore, the majority of software developers begin to focus on other emerging open source operating systems, trying to overcome the above problems through the construction of a new application ecological environment.

[0003] Under this background, more and more emerging operating systems have emerged. For example, Huawei's Harmony system recently provides a beta version of Harmony system 2.0 for developers. As a microkernel-based distributed operating system for all scenarios, the Huawei Harmony system is not a single system of a mobile phone or a certain device, but a universal system that can connect all devices together. It has realized adaptation with the smart screen at present, and will further adapt to mobile phones, tablets, computers, smart cars, wearable devices and other multi-terminal devices in the future.

[0004] However, it is undeniable that the development threshold for the above emerging operating systems is high at present: for example, if a software developer wants to develop an application for the Harmony system, he or she needs to learn the Harmony system's programming language and development environment, and then develop the application according to the Harmony system's development specification. This is a very high threshold for the majority of software developers. Figure 1As shown, the developer needs to learn a large number of front-end development related instructions in advance, and then manually design the layout style of the user interface in the software application, and then input the source code file corresponding to the user interface layout and style through the keyboard and mouse, and finally compile the source code file to generate the front-end target program corresponding to the user interface. When a developer wants to develop a user interface of a Java Script (JS) application on the Harmony system, he first needs to learn the development paradigm of Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), Java Script language (JS) or Component Tree (CT) file, and be familiar with the usage of each component, the related attributes and the style setting rules thereof; then manually design the layout and style of the user interface in the software application, and input the source code file corresponding to the layout and style through the keyboard and mouse; finally, compile the source code file to form the front-end target program corresponding to the user interface, and manually correct if there is a compilation error until the compilation is successful and the expected user interface is displayed. In the above process, there are problems of low manual input efficiency, low development efficiency, long learning period and high development threshold, and an application development method needs to be proposed to solve the above problems.

[0005] In addition, in the development process of the software application, since the computer and other software application development tools do not conform to the ergonomic design, the software developer needs to maintain the same posture for a long time and repeatedly hit the keyboard and mouse, which is prone to repetitive strain injury and other diseases, and causes symptoms such as soreness, pain, tingling or muscle weakness of the limbs, affecting normal work and life. How to solve the strain problem in the above software application development process is also worth attention. SUMMARY

[0006] The purpose of the present application is to provide a voice development method, system, electronic device and medium. Through the method of the present application, the developer can perform program development work through voice input. The voice development system adopted by the present application can recognize the voice development instructions of the user, and automatically generate the corresponding development source code file according to the user's needs, greatly simplifying the operations required by the user in the program development process, and improving the user's program development experience.

[0007] The first aspect of the present application provides a voice development method of a program, comprising: obtaining a voice development instruction of a user; obtaining a program development parameter corresponding to the voice development instruction; generating a development source code file of the program according to the program development parameter; and compiling the development source code file to generate the program.

[0008] In the embodiments of this application, program development actions can be achieved by using voice input to provide voice development commands.

[0009] In one possible implementation of the first aspect mentioned above, the development source code file includes at least one development component, with each voice development command corresponding to one development component; the program development parameters include the component name, component attribute values, component style, and component layout information corresponding to the development component.

[0010] For example, when the program to be developed corresponds to a graphical user interface (GUI), the source code file corresponds to the content displayed in the GUI. The GUI can include display images (such as images of the appearance of a marketing product), display text (such as text descriptions of the marketing product), and interactive components (such as a purchase button for the marketing product). Each display image, text, or interactive component corresponds to a development component. For example, the image of the marketing product in the source code file corresponds to an image development component, and the text description of the marketing product corresponds to a text development component.

[0011] A complete development component includes a component name, component attribute values, component styles, and component layout information. The component name can represent the content name corresponding to the development component; for example, the component name of a text development component can be "Text," the component name of an image development component can be "Image," and the component name of a rating development component can be "Rating," etc., without restriction. Component attribute values ​​can represent the specific content to be displayed by the development component; for example, the component attribute value of a text development component can be the specific text content to be displayed, and the component attribute value of an image development component can be the specific image to be displayed, etc., without restriction. Component styles can represent the display format of the specific content to be displayed by the development component; for example, the component style of a text development component can be the font, font size, and color of the text, and the component style of an image development component can be the size of the image, etc., without restriction. Component layout information can represent the layout position information of the developed components. For example, when the component layout information of the developed components is column-arranged, the display content of each developed component can be arranged vertically according to the order of input; or when the component layout information of the developed components is row-arranged, the display content of each developed component can be arranged horizontally according to the order of input, without any restrictions.

[0012] In one possible implementation of the first aspect described above, the development source code file includes a development paradigm; corresponding program development parameters are then set according to the development paradigm to generate the development source code file. Here, the development paradigm can be understood as the source code generation rules and standard format corresponding to the development source code file; different development source code files have different development paradigms. By setting program development parameters into the development paradigm, the development source code file required by the user can be generated.

[0013] In one possible implementation of the first aspect described above, each voice development command includes a start flag and / or an end flag. For example, the start flag can be represented by "start" and the end flag can be represented by "end". By setting start and end flags in the voice development commands, it is easier to more accurately distinguish and recognize the voice development commands input by the user.

[0014] In one possible implementation of the first aspect described above, the development source code files include component tree files, Hypertext Markup Language (HTML) files, Cascading Style Sheets (CSS) files, and JavaScript files. JavaScript is a lightweight, interpreted or just-in-time (JIT) programming language that prioritizes functions and supports object-oriented, imperative, and declarative (e.g., functional programming) styles. Users can choose the corresponding development source code files based on their program development needs; no restrictions are imposed here.

[0015] In one possible implementation of the first aspect described above, the program includes application programs and system programs. The application programs include graphical user interfaces. Users can choose the program content they wish to develop based on their own program development needs; no limitations are imposed here.

[0016] In one possible implementation of the first aspect above, the voice development method further includes: pre-training to obtain a voice recognition model; and recognizing voice development instructions based on the voice recognition model to obtain program development parameters corresponding to the voice development instructions.

[0017] In the embodiments of this application, a speech recognition model is pre-trained, and the user's voice development commands are recognized according to the recognition rules contained in the speech recognition model to obtain program development parameters related to program development. The speech recognition model can be trained using machine learning or other methods based on a pre-set training set, and is not limited thereto.

[0018] In one possible implementation of the first aspect described above, the voice development method further includes: performing an update operation on the generated development source code file according to program development parameters, thereby updating the development source code file. The update operation includes deleting and modifying portions of the development source code file.

[0019] In this embodiment of the application, users can update the generated source code files by inputting voice development commands. These commands include the location information of the development component to be updated and the corresponding program development parameters. It is understood that developers need to modify and adjust the input source code files multiple times during program development to meet the final design requirements. Updating the generated source code files via voice development commands aligns with developers' habits and further enhances their voice development experience.

[0020] In one possible implementation of the first aspect mentioned above, the voice development method further includes: displaying the generated program and / or the corresponding development source code file.

[0021] For example, when the program to be developed corresponds to a graphical user interface (GUI), developers need to observe the generated GUI to determine whether modifications and adjustments to the source code files are necessary. Presenting the visual content of the generated program allows users to easily make appropriate adjustments to the generated source code files, thereby optimizing the program's visual display. Similarly, the source code files corresponding to voice development commands can also be displayed, allowing users to intuitively view the recognition and generation results of voice development commands. This enables users to promptly correct and modify any recognition errors in voice development commands and facilitates review during subsequent adjustments, further enhancing the user's voice development experience.

[0022] The second aspect of this application provides a voice development system for a program, comprising: a voice pickup module for acquiring a user's voice development instructions; a recognition module for acquiring program development parameters corresponding to the voice development instructions; a generation module connected to the recognition module for generating development source code files based on the program development parameters corresponding to the voice development instructions; and a compilation module connected to the generation module for compiling the development source code files to generate a program.

[0023] In one possible implementation of the second aspect above, the recognition module further includes: a training unit for pre-training to obtain a speech recognition model; the recognition module recognizes the speech development instructions according to the speech recognition model to obtain the program development parameters corresponding to the speech development instructions.

[0024] In the embodiments of this application, the recognition module is equipped with a pre-trained speech recognition model, and recognizes the user's voice development commands according to the recognition rules contained in the speech recognition model, thereby obtaining program development parameters related to program development. The speech recognition model can be obtained through training by a training unit. The training method used by the training unit can be based on a pre-set training set, employing machine learning or other methods, and is not limited here.

[0025] In one possible implementation of the second aspect described above, the generation module further includes a correction unit, configured to perform an update operation on the generated development source code file according to program development parameters, thereby updating the development source code file. The update operation may include deleting or modifying portions of the development source code file.

[0026] In the embodiments of this application, by setting up a correction unit, users can update the generated development source code files by inputting voice development commands. The input voice development commands contain the location information of the development component to be updated and the program development parameters corresponding to the updated component. It is understood that programmers need to modify and adjust the input development source code files multiple times during the program development process to meet the final design requirements. By setting up a correction unit in the voice development system, which aligns with the development habits of programmers, the voice development experience can be further improved.

[0027] In one possible implementation of the second aspect above, the voice development system further includes a display unit, which is connected to the generation module and the compilation module respectively, for displaying the generated program and / or the development source code file corresponding to the program.

[0028] For example, when the content corresponding to the program to be developed is a graphical user interface, the developer needs to observe the generated graphical user interface to determine whether the development source code files need to be modified and adjusted. The display unit can be a display screen. By presenting the visual content of the generated program and / or the corresponding development source code files on the display screen, users can have a more intuitive understanding of the correctness of the voice development command input and the final presentation effect of the program, further enhancing the user's voice development experience.

[0029] In one possible implementation of the second aspect described above, the display unit can also be used to display the layout adjustment button; and to obtain the component layout information corresponding to the developed component in the development source code file based on the interaction information received by the layout adjustment button. The developed component is the same as described above and will not be repeated here.

[0030] In the embodiments of this application, the voice development system provided in the second aspect of this application includes a display unit, which can display layout adjustment buttons. Users can interact with the layout adjustment buttons to control the layout information corresponding to each development component.

[0031] For example, the display unit can be a display screen, and the layout adjustment button can be an interactive button displayed on the display screen, which includes the layout information of the currently developed component. During the development of the graphical user interface, in the default state, the content corresponding to each developed component is arranged in column (vertical) order. At this time, the interactive button, acting as the layout adjustment button, displays a vertical arrow, indicating that the content corresponding to each developed component is arranged in column order. When the user wants to arrange the content corresponding to each developed component in row (horizontal) order, they can interact with it by clicking the layout adjustment button. After receiving the user's click, the layout adjustment button can arrange the content corresponding to each developed component for subsequent voice development commands in row order. At this time, the interactive button, acting as the layout adjustment button, displays a horizontal arrow, indicating that the content corresponding to each developed component is arranged in row order. With the layout adjustment buttons set up as described above, developers no longer need to repeatedly emphasize the corresponding component layout information when inputting each voice development command. They can control and adjust the component layout information of the development components through simple interactive actions, further enhancing the user's voice development experience.

[0032] A third aspect of this application provides an electronic device, comprising: a memory storing instructions; and a processor coupled to the memory, wherein when the program instructions stored in the memory are executed by the processor, the electronic device performs the voice development method provided in the first aspect above.

[0033] In one possible implementation of the third aspect above, the electronic device further includes: a voice pickup device for acquiring the user's voice development instructions; and a display device for displaying the generated program and / or the corresponding development source code file.

[0034] A fourth aspect of this application provides a readable medium, characterized in that the readable medium stores instructions that, when executed on an electronic device, cause the electronic device to perform the voice development method provided in the first aspect above. Attached Figure Description

[0035] Figure 1 A flowchart illustrating a prior art program development method is shown.

[0036] Figure 2According to an embodiment of this application, a schematic diagram of the structure of a voice development system is shown;

[0037] Figure 3a According to an embodiment of this application, a graphical user interface generated based on voice development instructions is shown;

[0038] Figure 3b According to an embodiment of this application, another graphical user interface generated based on voice development instructions is shown;

[0039] Figure 4 According to an embodiment of this application, a schematic diagram of the structure of a voice development device is shown;

[0040] Figure 5a According to an embodiment of this application, a graphical user interface generated based on voice development instructions is shown;

[0041] Figure 5b According to an embodiment of this application, another graphical user interface generated based on voice development instructions is shown;

[0042] Figure 6 According to an embodiment of this application, a flowchart of a voice development method is shown;

[0043] Figure 7 According to an embodiment of this application, a schematic diagram of generating a graphical user interface based on voice development instructions is shown;

[0044] Figure 8 According to an embodiment of this application, a flowchart of another voice development method is shown;

[0045] Figure 9 According to an embodiment of this application, a schematic diagram is shown of modifying an existing graphical user interface based on voice development instructions;

[0046] Figure 10 According to an embodiment of this application, a flowchart of another voice development method is shown;

[0047] Figure 11 According to an embodiment of this application, another graphical user interface generated based on voice development instructions is shown;

[0048] Figure 12 According to an embodiment of this application, a schematic diagram of a layout adjustment button setting is shown;

[0049] Figure 13 According to an embodiment of this application, a flowchart of another voice development method is shown;

[0050] Figure 14According to an embodiment of this application, another schematic diagram of generating a graphical user interface based on voice development instructions is shown;

[0051] Figure 15 According to an embodiment of this application, a flowchart of another voice development method is shown;

[0052] Figure 16 According to an embodiment of this application, a schematic diagram of the structure of an electronic device is shown;

[0053] Figure 17 According to an embodiment of this application, a software structure block diagram of an electronic device is shown. Detailed Implementation

[0054] The embodiments of this application will now be described in further detail with reference to the accompanying drawings.

[0055] To address the aforementioned issues of high development barriers, low development efficiency, and significant physical strain on developers during operating system development, this application provides a voice-based development system. In embodiments of this application, developers can input development commands via voice. A voice development device then specifically recognizes the input voice, extracting key factors such as component names, attribute values, and styles to construct a corresponding component tree file. Finally, a parsing engine parses and renders the obtained component tree file, ultimately completing the development of the software application's user interface. This voice-based development system not only improves developer efficiency but also lowers the development barrier for emerging operating systems, while avoiding the health risks associated with prolonged keyboard and mouse use. It helps attract more developers to participate in building emerging application ecosystems, demonstrating universality and scalability.

[0056] It is understood that the operating system applicable to the technical solution of this application can be any operating system, such as the Android open-source operating system, Apple's iOS mobile operating system, Microsoft's Windows operating system, and Huawei's HarmonyOS, etc. For ease of explanation, the following description will uniformly use HarmonyOS as an example.

[0057] Similarly, it is understood that the development objects applicable to the technical solutions of this application can be various software applications, such as mobile phone applications, computer applications, control software for smart devices, etc. For ease of explanation, the following description will uniformly use the user interface development of applications under the HarmonyOS operating system as an example.

[0058] For ease of description, the following example uses the conversion of voice commands into component tree source code files for software development to illustrate the specific structure of the language development system and the voice development method of this application.

[0059] In the embodiments of this application, Figure 2 A schematic diagram of the structure of a speech development system 200 is shown. Specifically, the speech development system may include a speech processing module 201, a recognition module 202, a model training module 203, a generation module 204, a correction module 205, and a compilation module 206.

[0060] The voice processing module 201 is used to convert the voice commands input by the developer into digital signals. It is understood that developers typically input voice commands through a microphone, which collects audio vibration signals from the air to obtain the analog signals corresponding to the voice commands. The voice processing module 201 then converts these analog signals into digital electrical signals for subsequent modules to recognize and process. In the process of converting analog signals into digital signals, existing technologies such as frame segmentation can be used. Those skilled in the art can employ appropriate technical means to achieve the above conversion effect, and no limitations are imposed here.

[0061] Furthermore, considering that developers may be in a noisy environment when inputting voice, the voice processing module 201 can also have a noise filtering function to filter out ambient noise and highlight the developer's voice input. In addition, considering that developers need time to think during voice input and will not continuously input voice for extended periods, and that there may be a time interval between two programming voice commands, the voice processing module 201 can also have a Voice Activity Detection (VAD) function to identify and eliminate the collected information corresponding to silent periods from long audio signal streams. In essence, the voice processing module 201 performs a series of preprocessing actions on the collected developer's voice input, converting the collected signal into a digital signal that can be processed by subsequent modules, and maximizing the voice acquisition quality corresponding to the digital signal.

[0062] The recognition module 202 is connected to the speech processing module 201 and is used to extract development parameters from the developer's voice commands from the digital signal according to pre-trained speech recognition rules, and send them to the generation module 204 and the correction module 205. Understandably, when developers use this voice development system to develop software user interfaces, a completed voice command may contain some irrelevant conjunctions or interjections. The recognition module 202 needs to remove these irrelevant factors and capture the content related to the development and programming actions.

[0063] For example, the developer's voice command might be "Create a text component with the content 'Hello World' and the color black." For instance, when this voice development system is designed for user interface development under the HarmonyOS operating system, the developer needs a Component Tree (CT) file. This CT file includes multiple display components, each corresponding to a display element in the user interface (for example, as shown in Figure 5, each function icon 500 in the user interface can be considered a component). Specifically, it includes a "component name," "attribute value," and "style": the component name represents the name of a display component, i.e., "text component" in the aforementioned voice command; the attribute value represents the content attribute of the display component, i.e., "Hello World" in the aforementioned voice command; and the style represents the presentation style of the display component, i.e., "black" in the aforementioned voice command. The developer, through the aforementioned voice command, wants to create a "Hello World" text content in black on the user interface. The corresponding recognition module 202 extracts the three development parameters "text component," "Hello World," and "black" from the voice command, mapping them to the component name, attribute value, and style required by the CT file. In other words, guided by pre-trained speech recognition rules, the recognition module 202 can extract the corresponding development parameters from the developer's voice commands and establish the corresponding mapping relationship according to the needs of the development documents.

[0064] The model training module 203 is connected to the recognition module 202 and is used to train the aforementioned training rules based on a preset training set. The model training module 203 can store a preset training set, which may include multiple speech commands and multiple standard recognition results, with each speech command corresponding to one standard recognition result. The model training module 203 summarizes the aforementioned speech recognition rules by recognizing these speech commands and comparing them with the standard recognition results.

[0065] For example, when the preset training set includes multiple voice commands such as "create a text component with content as... and color as...", after multiple training sessions, the voice recognition rules can be summarized as follows: the voice content following the voice digital signal corresponding to "content as" is the attribute value parameter of a text component in the component tree file, and the voice content following the voice digital signal corresponding to "color as" is the color style parameter of a text component in the component tree file.

[0066] The generation module 204 is connected to the identification module 202 and is used to generate corresponding development source code files based on the development parameters extracted by the identification module 202. For example, when developing a user interface for the HarmonyOS operating system environment, the generation module 204 can generate corresponding component tree files, i.e., development source code files, based on the component names, attribute values, and styles extracted by the identification module 202.

[0067] For example, when the developer inputs the voice command "Create a text component with the content 'Hello World' and the color black", the component tree file generated by module 204 will be:

[0068] {

[0069] "className":"Text",

[0070] "value":"Hello World",

[0071] "color":"black"

[0072] }

[0073] In this context, “className” represents the component name, “value” represents the attribute value, “color” represents the color style, and “Text” indicates that the component is a text component, and the same applies below.

[0074] The correction module 205 is connected to both the recognition module 202 and the generation module 204, and is used to modify the development source code file generated by the generation module 204 based on the development parameters extracted by the recognition module 202. Understandably, during application development, developers need to repeatedly debug and correct existing content, especially in user interface development, where adjustments to the position, size, color, and other layout information of each component in the component tree file are required. This adjustment operation is implemented by the correction module 205.

[0075] For example, regarding the component tree file mentioned above, when the developer inputs the voice command "Change the color of the text in the text component to gray", the recognition module 202 extracts the development parameter "Change the style parameter to gray" and sends it to the correction module 205. The correction module 205 then modifies the component tree file accordingly.

[0076] {

[0077] "className":"Text",

[0078] "value":"Hello World",

[0079] "color":"gray"

[0080] }

[0081] The compilation module 206 is connected to the generation module 204 and the correction module 205, respectively, and is used to compile the development source code files to form an executable target application. For example, when developing a user interface for the HarmonyOS operating system environment, the compilation module 206 can be a rendering engine module, which parses and renders the aforementioned component tree file to obtain and display a visual user interface.

[0082] For example: If a developer needs to design a user interface for a mobile application, and the developer's voice command is "Create a text component with the content 'Hello World' and the color black", the development display effect generated by compiler module 206 can be as follows: Figure 3a As shown, 300 is a virtual screen for demonstration, and 301 is the development display effect corresponding to the voice command. If the developer is not satisfied with the current development display effect, and then inputs a new voice command "change the color of the text in the text component to gray", the development display effect generated by the compilation module 206 can be as follows: Figure 3b As shown, the "Hello World" content 301 displayed on the virtual screen 300 in the demonstration changed from black to gray, allowing the developer to make the modification.

[0083] In some embodiments of this application, the focus is on user interface development scenarios for the HarmonyOS operating system environment. Figure 4 A schematic diagram of a voice development device is shown. Specifically, the voice development device may include a sound pickup device 400, a voice mode converter 401, a voice and word mapper 402, a component and style binder 403, a component corrector 404, a layout controller 405, a component tree generator 406, a rendering engine 407, and a display device 408.

[0084] The pickup device 400 is used to acquire the audio signal corresponding to the voice development instructions input by the developer.

[0085] The voice mode converter 401 is connected to the pickup device 400 and is used to convert the audio signal acquired by the pickup device 400 into a digital signal. Furthermore, the voice mode converter 401 can also perform preprocessing operations such as noise filtering on the digital signal to obtain a higher quality digital signal that is more conducive to speech recognition.

[0086] The speech-to-word mapper 402 is connected to the speech mode converter 401 and is used to identify the specific words corresponding to the speech development instructions from the digital signal. Specifically, the identification of specific words from the digital signal can be achieved by methods such as dimensionality decoding, and those skilled in the art can use appropriate speech recognition algorithms according to the actual application needs.

[0087] The component and style binder 403 connects to the speech and word mapper 402 and is used to parse the information of each component contained in the voice development command from the recognized specific words. Each component information includes the component name, attributes, and style. It can be understood that when developing a user interface for the HarmonyOS operating system environment, the development source code file required by the developer is a component tree (CT) file; and the component tree file includes multiple components, each corresponding to a display element in the user interface. The specific composition of each component includes the component name, attribute value, and style. The function of the component and style binder 403 is to extract and bind the development settings related to the component name, attribute value, and style from the specific words of the voice development command.

[0088] For example, when a developer inputs the voice command "Create a text component with the content 'Hello World' and the color black", the component and style binder 402 can obtain three key-value pairs: "Component name - Text", "Attribute value - Hello World", and "Style - Black", all of which correspond to the same component. The component and style binder 402 implements the mapping and binding between specific words and component information through these key-value pairs.

[0089] Furthermore, when a developer inputs multiple commands at once, the component and style binder 403 can bind each component to its corresponding style and / or attribute value. For example, when the developer inputs the voice command "Create a text component 1 with the content 'Hello World', the color is black, stop; Create a text component 2 with the content 'END', the color is gray", the component and style binder 402 can recognize "stop" as a separator, and then obtain six key-value pairs from it, namely: "Component name - Text component 1", "Attribute value - Hello World", "Style - Black" and "Component name - Text component 2", "Attribute value - END", "Style - Gray", and the first three of these six key-value pairs correspond to text component 1, and the last three correspond to text component 2.

[0090] The component tree generator 406 connects to the component and style binder 403, and is used to generate a component tree file based on the information of each component. It can be understood that the component tree file is equivalent to the source code file in the application development process, which includes multiple components. For example, the specific form of the component tree file can be as follows:

[0091] {

[0092] "className":"Text",

[0093] "value":"Hello World",

[0094] "color":"gray"

[0095] }

[0096] {

[0097] "className":"Rating",

[0098] "numstars":"4",

[0099] "height": "150"

[0100] }

[0101] In this context, “Rating” indicates that the above component is a rating component, “numstars” represents the number of rating stars corresponding to the rating component, and “height” represents the display height of each rating star in pixels.

[0102] The component tree file above contains two components: a text component displaying the grayed-out words "Hello World," and a rating component displaying a star rating object with a total of 4 stars and a height of 150 pixels. In conventional development, this component tree file is entered directly by developers using a keyboard and mouse. The technical solution proposed in this application converts the developer's voice commands into a component tree file that is consistent with keyboard and mouse input, freeing up the developer's hands. Statistics show that when entering the same amount of code in a component tree file, voice command input is approximately 15% faster than keyboard and mouse input, effectively improving development efficiency.

[0103] The component corrector 404 is connected to the speech and word mapper 402 and the component tree generator 406, respectively, and is used to correct each component according to the developer's voice development instructions. Understandably, during software development, developers need to continuously optimize and adjust based on debugging results, especially in the development of visual interfaces such as user interfaces. To achieve better display effects, developers need to continuously adjust the display components in the user interface, which requires the component corrector 404 to correct and adjust each component in the component tree file. Corrections and adjustments may include changing the style and / or attributes of components, undoing entered components, inserting a new component between two entered components, etc., and are not limited here.

[0104] The layout controller 405 is connected to the voice and word mapper 402 and the component tree generator 406, respectively, and is used to control the layout direction of each component according to the developer's voice development instructions. Understandably, when developing for a user interface, the placement of text components, icon components, and image components is extremely important: for example, in the user interface design of a chat application, such as... Figure 5a As shown, if the function icon 500 is designed with a vertical layout, it will not only compress the space of the chat list at the top, but also create a large blank area in the lower right corner of the user interface, lacking layout rationality; while designing the function icon 500 with a horizontal layout, as shown... Figure 5b As shown, this design maximizes the use of all space in the user interface while maintaining aesthetic appeal. Therefore, during the development and design of the user interface, it is necessary to adjust the layout orientation between various components using the layout controller 405.

[0105] The rendering engine 407 is connected to the component tree generator 406 and is used to compile and render the component tree file generated by the component tree generator 406 to obtain a visual software user interface and present it through the display device 408.

[0106] It is understandable that, in practical application scenarios, the speech mode converter 401, speech-to-word mapper 402, component and style binder 403, component corrector 404, layout controller 405, component tree generator 406, and rendering engine 407 can all be integrated into a single integrated processor 409. Furthermore, considering that the functions implemented by the aforementioned speech mode converter 401, speech-to-word mapper 402, component and style binder 403, component corrector 404, layout controller 405, component tree generator 406, and rendering engine 407 can all be implemented by a computer, and given that the computer has a display screen that can serve as a display device 408 and provides expandability support for the sound pickup device 400, in practical application scenarios, the aforementioned speech development device can also be integrated into a computer.

[0107] For example, when the aforementioned voice development device is integrated into a computer with an Integrated Development Environment (IDE) that supports external recording devices, developers can choose to use a keyboard and mouse or voice input for software development within the IDE. This aligns with developers' established habits of using computers for software development and provides them with diverse options, thus enhancing their development experience.

[0108] For example, the aforementioned voice development device can also be integrated into a smartphone. Since smartphones have built-in microphones and displays, this can be achieved simply by integrating components such as the component and style binder 403 and the component tree generator 406 into the smartphone's processor. Developers can use smartphones to perform software development operations anytime, anywhere via voice input. Especially during the development of user interfaces for mobile applications, the smartphone's display screen allows for a more intuitive experience of the completed development and further optimization, significantly improving the developer experience while lowering the barrier to entry for software development.

[0109] Based on such Figure 4 The following section, in conjunction with the accompanying drawings, details the speech development method using the illustrated speech development apparatus.

[0110] In some embodiments of this application, the specific process of voice development by developers is illustrated as follows: Figure 6 As shown, it specifically includes:

[0111] Step 600: The sound pickup device 400 acquires voice development commands. These voice development commands can be input by the user.

[0112] Step 601: The voice mode converter 401 converts the voice development commands into digital signals. For details on the conversion method, please refer to the previous description of the voice mode converter 401.

[0113] Step 602: The speech and word mapper 402 identifies the specific words corresponding to the speech development command based on the digital signal. For details on the identification method, please refer to the previous description of the speech and word elicitor 402.

[0114] Step 603: Component and style binder 403 parses the information of each component contained in the voice development command from the specific words. For details on the parsing method, please refer to the previous description of component and style binder 403.

[0115] Step 604: Component tree generator 406 generates a component tree file based on the component information. For details on the generation method, please refer to the previous description of component tree generator 406.

[0116] Step 605: The rendering engine 407 compiles and renders the component tree file to obtain a visual software user interface, which is then presented through the display device 408.

[0117] For example, when a developer sequentially enters three voice development commands: "Create a text component, the content of which is to display an image and a rating component, the color of which is black, stop (end, as the end marker for a single voice development command, the same below)," "Create an image component, the image path is a local notebook image, the width is 700px (pixels), stop," and "Create a rating component, the total number of stars is 4, the height is 150px (pixels), stop," the displayed content on the display device 408 will be as follows: Figure 7 As shown.

[0118] It is understandable that the display area of ​​the display device 408 can include two parts: a code area 701 and a demo area 702, or it can include only one part: the demo area 702 or the code area 701. The code area 701 is used to display the source code corresponding to the component tree file, while the demo area 702 is used to display the visual user interface obtained after compiling and rendering the component tree file. Developers can more intuitively understand the specific display effect of each component by comparing the two, thereby obtaining a better development experience.

[0119] In the specific embodiments described above, the developer ends each voice development command with "stop". This can be stipulated by pre-defined voice development command rules. Using "stop" as the marker for the end of component creation helps the component and style binder 403 to better bind each component to its corresponding style and / or attribute values. There are no limitations on the setting of the start and end markers for component creation. For example, voice development command rules can be set to require each voice command from the developer to be "begin, ..., stop". The double-ended validation of "begin" (the start marker for a single voice development command, hereinafter the same) and "stop" further improves the accuracy of binding components to styles and / or attribute values.

[0120] In the specific embodiments described above, it can be seen that each voice development command from the developer is composed of "component + attribute + style + stop", which can also be defined by pre-set voice development command rules. In other practical application scenarios, the composition of the developer's voice development command can also be "component + style + attribute + stop", "component + style + stop", or "component + attribute + stop", and is not limited here.

[0121] Considering that developers need to repeatedly modify source code files to achieve the best display effect during the user interface development process, the specific process of voice development can also be illustrated as follows in the embodiments of this application: Figure 8 As shown, it specifically includes:

[0122] Steps 800 to 803 are the same as steps 600 to 603, and will not be repeated here.

[0123] Step 804: Component corrector 404 modifies the component tree file based on the component information.

[0124] Step 805: The rendering engine 407 compiles and renders the modified component tree file to obtain a visual software user interface, which is then presented through the display device 408.

[0125] For example, after a developer sequentially inputs three voice commands: "Create text component 1, content 'Hello World', color gray, stop", "Create text component 2, content 'Hello JS', color white, stop", and "Create text component 3, content 'Hello Text', color black", and then deems some text components need adjustment, they further input two more voice commands: "Change the text color in text component 1 to black, stop" and "Delete text component 2, stop". The changes displayed in demo area 702 can be seen as follows: Figure 9 As shown.

[0126] Understandably, since text component 2 is white and matches the background color of the user interface, it cannot be displayed. Developers can choose to delete text component 2 entirely. In this case, since the user interface is designed with a vertical column layout by default, text component 3 will automatically take its place and move up because text component 2 is deleted.

[0127] Understandably, developers need to confirm the component to be modified when inputting voice commands for corrections. When the component tree file contains more than one component, each component in the component tree file has a unique serial number, such as the suffix "2" in "text component 2". Developers can locate and confirm the component to be modified by voice inputting the component name with the serial number.

[0128] Considering that developers need to adjust the arrangement of components appropriately during the user interface development process, the specific process of voice development can also be illustrated as follows in the embodiments of this application: Figure 10 As shown, it specifically includes:

[0129] Steps 1000 to 1003 are the same as steps 600 to 603, and will not be repeated here.

[0130] Step 1004: The layout controller 405 parses the layout information of each component contained in the voice development instructions from the specific words.

[0131] Step 1005: Component tree generator 406 generates a component tree file based on component information and layout information.

[0132] Step 1006: The rendering engine 407 compiles and renders the component tree file to obtain a visual software user interface, which is then presented through the display device 408.

[0133] It is understandable that, such as Figure 7 or Figure 9 As shown in the above specific embodiment, it can be seen from the presentation of the components in the demonstration area 702 that, by default, each component is arranged in a vertical column distribution according to the order of input. Considering that developers need to adjust the layout of each component during the design and development of the user interface, the layout controller 405 needs to parse the layout information of each component contained in the voice development command from the specific words, and the component tree generator 406 will generate the corresponding component tree file based on the component information and layout information.

[0134] For example, when a developer sequentially enters three voice commands: "Create text component 1, content: Hello World, horizontal layout, gray color, stop", "Create text component 2, horizontal layout, content: Hello JS, black color, stop", and "Create text component 3, horizontal layout, content: Hello Text, black color", the presentation in demo area 702 will be as follows: Figure 11 As shown.

[0135] In other embodiments of this application, the layout controller 405 can also be controlled in other ways. It is understood that in the aforementioned embodiments, since each component is arranged vertically in the order of input by default, developers need to specify "components are arranged horizontally" when inputting each voice development command, which can easily lead to fatigue. Specific implementations of other methods to control the layout controller 405 can be found in [reference needed]. Figure 12A layout adjustment button 1200 is placed in the lower right corner of the demonstration area 702. When the layout adjustment button 1200 displays a downward arrow, it indicates that each component is arranged vertically in the order it was entered. When the layout adjustment button 1200 displays a right arrow, it indicates that each component is arranged horizontally in the order it was entered. Developers can adjust the style of the layout adjustment button 1200 by touch screen or mouse click, and the component tree generator 406 synchronously obtains the corresponding layout information. This eliminates the need for developers to repeatedly input layout information by voice, further facilitating their development process.

[0136] As described in the above embodiments, the technical solution proposed in this application can replace manual keyboard and mouse input with voice input, thereby solving the problems of low efficiency and error-proneness in manual keyboard and mouse input, and helping to improve the overall efficiency of application development. Furthermore, when using the technical solution proposed in this application to develop software user interfaces for the HarmonyOS operating system, developers do not need to learn the development paradigm of component tree source code files in advance; they only need to understand the simple input rules of voice development commands to directly participate in the development process, significantly lowering the development threshold and attracting more developers, especially those suffering from repetitive strain injuries, to join the construction of the HarmonyOS application ecosystem. This advantage is consistent with the attraction for the development of other emerging operating systems.

[0137] In the above embodiments of this application, when developing a software user interface for the HarmonyOS operating system, the generated source code files are all component tree (CT) files. However, in other embodiments of this application, source code files can also be written using Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), and JavaScript (JS), which are commonly used in front-end development. The specific process is as follows... Figure 13 As shown:

[0138] Steps 1300 to 1303 are the same as steps 600 to 603, and will not be repeated here.

[0139] Step 1304: The source code generator generates HTML, CSS, and JS source code based on the component information. The source code generator stores development paradigms for Hypertext Markup Language, Cascading Style Sheets, and JavaScript. It generates HTML, CSS, and JS source code by placing the component information into the corresponding development paradigms.

[0140] Step 1305: The bundler packages the HTML source code, CSS source code, and JS source code into a single JS data package.

[0141] Step 1306: The rendering engine 407 compiles and renders the JS data package to obtain a visual software user interface, which is then presented through the display device 408.

[0142] It is understandable that in the above embodiments, a source code generator and a bundler are used instead of the component tree generator 406, and a JS data package is used instead of the component tree file. Because the format of the source code file has changed, the mapping rules from component information to the component tree file have been adaptively changed, transforming into mapping rules from component information to HTML source code, CSS source code, and JS source code.

[0143] For example, when a developer inputs the voice command "begin, create a text component with the content 'Hello World', color 'black', stop", the content displayed on display device 408 will be as follows: Figure 14 As shown.

[0144] It is understood that the display area of ​​the display device 408 can include two parts: a code area 1401 and a demonstration area 1402. The code area 1401 includes an area 14011 for displaying HTML source code, an area 14012 for displaying CSS source code, and an area 14013 for displaying JS source code. The demonstration area 702 is used to display the visual user interface obtained by compiling and rendering the JS data package. Specifically, as... Figure 14 As shown in the above embodiments, the component name information and attribute value information in the component information are mapped to the HTML source code, and the style information in the component information is mapped to the CSS source code.

[0145] In the above embodiments, a JS data package consisting of HTML source code, CSS source code, and JS source code is used instead of a component tree file as the source code file. This can better adapt to the programming paradigm that is more commonly used in current front-end development, and helps to improve the scalability of front-end applications. Developers can extend the various components in the front-end application in subsequent development processes.

[0146] In other embodiments of this application, developers can also develop software applications via voice input through methods such as... Figure 15 The implementation is carried out in the manner shown, and the specific process includes:

[0147] Step 1500: Developers input the standard development voice through the microphone.

[0148] The standard development voice includes several pre-defined voice commands, which consist of English phrases and require developers to learn and master them in advance.

[0149] Step 1501: The speech processing device performs noise reduction processing on the standard development speech and then recognizes it to obtain the standard text.

[0150] During the speech recognition process, the speech processing device will only perform targeted recognition on speech commands that conform to the specifications.

[0151] Step 1502: The translator obtains the standard text and converts it into the corresponding keystroke commands.

[0152] Keystroke commands include keystroke commands corresponding to pressing the keyboard and click commands corresponding to clicking the mouse.

[0153] Step 1503: The translator sends the keystroke commands to the integrated compilation environment.

[0154] The translator sends the keystroke commands it receives to an integrated editing environment or text editor, essentially replacing keyboard and mouse input with voice input to input programming code.

[0155] In the above embodiments, developers first need to pre-learn the custom-defined development language, which has a high development threshold. Forgetting or confusing certain standard development languages ​​during development will seriously affect development efficiency. Furthermore, the above embodiments do not establish a mapping relationship between voice commands and various components in front-end development. The steps proposed in the above embodiments only replace keyboard and mouse input with voice commands in the code input stage, requiring character-by-character input of the source code file, which also leads to low development efficiency. Moreover, this development method has a fine granularity, making it difficult to apply to large-granularity front-end component development environments.

[0156] Figure 16 A schematic diagram of the electronic device is shown.

[0157] The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0158] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0159] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0160] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0161] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0162] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a limitation on the structure of the electronic device. In other embodiments of this application, the electronic device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0163] The wireless communication function of electronic devices can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0164] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.

[0165] The mobile communication module 150 can provide solutions for wireless communication applications including 2G / 3G / 4G / 5G in electronic devices. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0166] The wireless communication module 160 can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0167] Electronic devices implement display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0168] Internal memory 121 can be used to store executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of the electronic device (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of the electronic device by running instructions stored in internal memory 121 and / or instructions stored in memory located within the processor.

[0169] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons, such as the buttons on the virtual keyboard of the primary input method displayed on the electronic device. The electronic device can receive button input and generate key signal inputs related to the user settings and function control of the electronic device.

[0170] The software system of an electronic device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to illustrate the software structure of an electronic device.

[0171] Figure 17 This is a software structure block diagram of an electronic device according to an embodiment of the present invention.

[0172] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0173] The application layer can include a series of application packages.

[0174] like Figure 17 As shown, the application package can include applications such as an online store, camera, gallery, calendar, calling, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0175] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0176] like Figure 17 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0177] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0178] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, and more.

[0179] The view system can be a display system service 101 of the electronic device, used to manage and modify the display style of the electronic device's applications. Based on the display style parameters included in the display parameters obtained by the electronic device from the tablet computer 200, the view system obtains the display functions corresponding to the aforementioned display style parameters, and uses these functions to configure the electronic device's applications.

[0180] A phone manager is used to provide communication functions for electronic devices. For example, it manages call status (including connection and disconnection).

[0181] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0182] In embodiments of the present invention, the resource manager can also be used to store overlay configuration files.

[0183] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.

[0184] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0185] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0186] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0187] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0188] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0189] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0190] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0191] A 2D graphics engine is a graphics engine for 2D drawing.

[0192] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0193] The following example, using a voice development scenario, illustrates the workflow of the relevant software and hardware when the electronic device is a mobile phone: When the microphone receives a user's voice development command, the corresponding analog audio signal is sent to the kernel layer; the kernel layer processes the analog audio signal into raw input time (including the digital audio signal corresponding to the analog audio signal, the timestamp of the analog audio signal, etc.); the raw input time is stored in the kernel layer; the application framework layer obtains the raw input time from the kernel layer and identifies the control corresponding to the input event. Taking the control corresponding to the voice development command as a voice development control in a mobile phone as an example, the mobile phone calls the application framework layer's overlay interface to start the voice development program (i.e., generating the development source code file corresponding to the development component according to the voice development command and compiling the development source code file), and then displays the corresponding development source code file and the program's displayable content through the display driver.

[0194] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0195] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0196] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0197] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0198] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0199] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for developing a program's voice, characterized in that, include: Obtain the user's voice development commands; Obtain the program development parameters corresponding to the voice development command, wherein the program development parameters include the component name, component attribute value, component style, and component layout information of the development component; Generate the application's development source code files based on the program development parameters; The development source code files are compiled to generate the application. If the development source code file includes a component tree file, the source code corresponding to the component tree file is displayed in the code area, and the visual user interface obtained after compiling and rendering the component tree file is displayed in the demo area; The step of obtaining the program development parameters corresponding to the voice development command includes: Pre-training yields a speech recognition model; The speech development instructions are identified using the speech recognition model to obtain the corresponding program development parameters. The step of recognizing the voice development command according to the voice recognition model to obtain the program development parameters corresponding to the voice development command includes: The speech recognition model identifies the words corresponding to the speech development instructions and parses the program development parameters corresponding to the speech development instructions from the words.

2. The method as described in claim 1, characterized in that, The development source code file includes at least one development component, and each voice development command corresponds to one development component.

3. The method as described in claim 1, characterized in that, Each of the aforementioned voice development instructions includes a start flag and / or a stop flag.

4. The method as described in claim 1, characterized in that, The development source code files include component tree files, hypertext markup language files, cascading style sheet files, and JavaScript files.

5. The method as described in claim 1, characterized in that, The application includes a graphical user interface.

6. The method as described in claim 1, characterized in that, Also includes: The generated development source code file is updated according to the program development parameters. The update operation includes deleting and modifying parts of the development source code files.

7. The method as described in claim 1, characterized in that, Also includes: Display the generated application and / or the corresponding development source code file of the application.

8. A voice development system for a program, characterized in that, include: The voice pickup module is used to acquire the user's voice development commands; The recognition module is used to obtain the program development parameters corresponding to the voice development command based on the voice development command; wherein, the program development parameters include the component name, component attribute value, component style and component layout information of the development component; A generation module, connected to the recognition module, is used to generate the application's development source code file according to the program development parameters corresponding to the voice development instructions; A compilation module, connected to the generation module, is used to compile the development source code files to generate an application. If the development source code file includes a component tree file, the source code corresponding to the component tree file is displayed in the code area, and the visual user interface obtained after compiling and rendering the component tree file is displayed in the demo area; The step of obtaining the program development parameters corresponding to the voice development command includes: Pre-training yields a speech recognition model; The speech development instructions are identified using the speech recognition model to obtain the corresponding program development parameters. The step of recognizing the voice development command according to the voice recognition model to obtain the program development parameters corresponding to the voice development command includes: The speech recognition model identifies the words corresponding to the speech development instructions and parses the program development parameters corresponding to the speech development instructions from the words.

9. The system as described in claim 8, characterized in that, The identification module further includes: Training unit, used to pre-train a speech recognition model; The recognition module identifies the voice development command based on the voice recognition model to obtain the program development parameters corresponding to the voice development command.

10. The system as described in claim 8, characterized in that, The generation module further includes: The correction unit is used to perform an update operation on the generated development source code file according to the program development parameters, so as to update the development source code file; The update operation includes deleting and modifying parts of the development source code files.

11. The system as described in claim 8, characterized in that, Also includes: The display unit, connected to the generation module and the compilation module, is used to display the generated application and / or the development source code file corresponding to the application.

12. The system as claimed in claim 11, characterized in that, The display unit is used to display the layout adjustment buttons; Based on the interaction information received by the layout adjustment button, obtain the component layout information corresponding to the development component in the development source code file.

13. An electronic device, characterized in that, include: Memory, which stores instructions; A processor coupled to a memory, wherein when program instructions stored in the memory are executed by the processor, the electronic device performs the voice development method according to any one of claims 1 to 7.

14. The electronic device as claimed in claim 13, characterized in that, Also includes: A voice pickup device used to acquire the user's voice development commands; A display device for displaying the generated application and / or the development source code file corresponding to the application.

15. A readable medium, characterized in that, The readable medium stores instructions that, when executed on an electronic device, cause the electronic device to perform the voice development method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Voice-based script writing method and device, equipment and storage medium

    CN111949255A