CN112130839A - Method for constructing database, method for voice programming and related device - Google Patents

Method for constructing database, method for voice programming and related device Download PDF

Info

Publication number
CN112130839A
CN112130839A CN201910555555.5A CN201910555555A CN112130839A CN 112130839 A CN112130839 A CN 112130839A CN 201910555555 A CN201910555555 A CN 201910555555A CN 112130839 A CN112130839 A CN 112130839A
Authority
CN
China
Prior art keywords
programming
identifier
target
voice
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910555555.5A
Other languages
Chinese (zh)
Inventor
刘伟
谢远江
许静芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sogou Technology Development Co Ltd
Original Assignee
Beijing Sogou Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sogou Technology Development Co Ltd filed Critical Beijing Sogou Technology Development Co Ltd
Priority to CN201910555555.5A priority Critical patent/CN112130839A/en
Publication of CN112130839A publication Critical patent/CN112130839A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • G10L2015/223Execution procedure of a spoken command

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Machine Translation (AREA)

Abstract

The application discloses a method for constructing a database and voice programming and a related device, wherein the method comprises the following steps: determining a programming identifier of a target programming language; obtaining pronunciation characteristics of the target user to the programming identifier as voice characteristics of the programming identifier; and constructing a target programming database corresponding to the target user and the target programming language based on the voice characteristics of the programming identifier corresponding to the stored programming identifier. The method comprises the steps of establishing a target programming database which is personalized and suitable for a target user by determining a programming identifier and obtaining pronunciation characteristics of the target user to the programming identifier so as to clarify naming habits and pronunciation habits of the target user to the programming identifier, wherein different target programming databases support differences of the naming habits and pronunciation habits of different target users to programming identifiers with the same meaning. For the programming voice input by the target user, the corresponding programming identifier is efficiently and accurately determined by utilizing the corresponding target programming database to perform voice programming, so that the efficiency and the effect of the voice programming are improved.

Description

Method for constructing database, method for voice programming and related device
Technical Field
The present application relates to the field of voice data processing technologies, and in particular, to a method and a related apparatus for constructing a database and performing voice programming.
Background
With the rapid development of science and technology, speech recognition technology is applied to more and more fields. The programming is a Chinese abbreviation for programming, which means actually that a developer writes codes to obtain a program. Generally, developers use keyboard + mouse devices for programming, but this approach requires sufficient coordination of the two hands of the developer and the extreme familiarity of the developer with the keyboard and mouse devices, and thus speech recognition technology is increasingly used in the programming field to implement speech programming.
At present, the specific implementation manner of voice programming is to firstly obtain the programming voice input by the developer, then recognize the programming voice input by the developer, search and call a corresponding programming identifier in a programming database; finally, the program identifier retrieved based on the sequential combination of programming voices entered by the developer forms the program. The programming database is adopted for programming voices input by different developers.
However, when different developers perform voice programming, different developers have different naming habits or pronunciation habits for programming identifiers such as keywords, variable names or function names with the same meaning, and the like, and therefore, for the programming voice input by different developers, the corresponding programming identifiers cannot be efficiently and accurately searched through the programming database, that is, the voice programming mode cannot support the difference of the naming habits or pronunciation habits of the programming identifiers with the same meaning by different developers, and is poor in adaptability to different developers, and the efficiency and effect of the voice programming are greatly reduced.
Disclosure of Invention
The technical problem to be solved by the present application is to provide a method and related apparatus for constructing a database and voice programming, wherein the constructed target programming database can be adapted to target users individually, and different target programming databases support different target users' naming habits or pronunciation habits of programming identifiers with the same meaning. And subsequently, for the programming voice input by the target user, the corresponding programming identifier can be efficiently and accurately determined by utilizing the corresponding target programming database to perform voice programming, so that the efficiency and the effect of the voice programming are improved.
In a first aspect, an embodiment of the present application provides a method for constructing a database, where the method includes:
determining a programming identifier of a target programming language;
obtaining pronunciation characteristics of the programming identifier of a target user as voice characteristics of the programming identifier;
and constructing a target programming database corresponding to the target user and the target programming language based on the voice characteristics of the programming identifier corresponding to the stored programming identifier.
Optionally, the target programming language includes a C language, a C + + language, a C # language, a Java language, a go language, a python language, or a scala language; the type of the programming identifier comprises one or more of a keyword, a function name, a custom variable name, a constant name and a class name; the function name comprises a common function name and/or a custom function name.
Optionally, the obtaining the pronunciation characteristic of the target user for the programming identifier as the voice characteristic of the programming identifier includes:
acquiring pronunciation data of the target user for the programming identifier;
and obtaining pronunciation characteristics of the pronunciation data as the voice characteristics of the programming identifier based on a voice characteristic extraction model.
Optionally, if the type of the programming identifier is a custom function name or a custom variable name, before determining the programming identifier of the target programming language, the method further includes:
the programming identifier is pre-customized and stored.
Optionally, the storing the voice feature of the programming identifier based on the corresponding programming identifier specifically includes:
and correspondingly storing the type, spelling data, pronunciation data and voice characteristics of the programming identifier based on the programming identifier.
Optionally, the method further includes:
determining a common code editing template and a corresponding template name of the target programming language;
and correspondingly storing the common code editing template and the template name in the target programming database.
Optionally, the method further includes:
determining a development environment execution operation of the target programming language and a corresponding execution instruction;
and correspondingly storing the development environment execution operation and the execution instruction in the target programming database.
In a second aspect, an embodiment of the present application provides a method for voice programming, which uses the target programming database described in any one of the above first aspects, and the method includes:
acquiring to-be-recognized programming voice data of a target user, wherein the to-be-recognized programming voice data comprises to-be-recognized programming identifier voice data;
obtaining voice characteristics of the voice data of the programming identifier to be recognized; determining the target programming database based on the identification of the target user and the identification of the programming language;
and determining a programming identifier corresponding to the voice characteristic of the voice data of the programming identifier to be recognized in the target programming database.
Optionally, the programming speech to be recognized further includes speech data of a name of a template to be recognized, and the target programming database is the target programming database according to the first aspect, further including:
identifying the template name in the template name voice data to be identified;
and determining a common code editing template corresponding to the template name in the target programming database.
Optionally, the to-be-recognized programming speech further includes to-be-recognized execution instruction speech data, and the target programming database is the target programming database according to the first aspect, further including:
identifying an execution instruction in the voice data of the execution instruction to be identified;
and determining a development environment execution operation corresponding to the execution instruction in the target programming database.
In a third aspect, an embodiment of the present application provides an apparatus for building a database, where the apparatus includes:
a first determining unit for determining a programming identifier of a target programming language;
a first obtaining unit, configured to obtain a pronunciation feature of the programming identifier for a target user as a voice feature of the programming identifier;
and the construction unit is used for constructing a target programming database corresponding to the target user and the target programming language based on the voice characteristics of the programming identifier correspondingly stored in the programming identifier.
Optionally, the target programming language includes a C language, a C + + language, a C # language, a Java language, a go language, a python language, or a scala language; the type of the programming identifier comprises one or more of a keyword, a function name, a custom variable name, a constant name and a class name; the function name comprises a common function name and/or a custom function name.
Optionally, the first obtaining unit includes:
the acquisition subunit is used for acquiring pronunciation data of the target user for the programming identifier;
an obtaining subunit, configured to obtain a pronunciation feature of the pronunciation data as a voice feature of the programming identifier based on a voice feature extraction model.
Optionally, if the type of the programming identifier is a custom function name or a custom variable name, before the first determining unit, the method further includes:
and the self-defining storage unit is used for self-defining in advance and storing the programming identifier.
Optionally, the building unit is specifically configured to:
and constructing a target programming database corresponding to the target user and the target programming language based on the type, spelling data, pronunciation data and voice characteristics of the programming identifier which is correspondingly stored by the programming identifier.
Optionally, the method further includes:
the third determining unit is used for determining a common code editing template of the target programming language and a corresponding template name;
and the first storage unit is used for correspondingly storing the common code editing template and the template name in the target programming database.
Optionally, the method further includes:
a fourth determining unit, configured to determine a development environment execution operation of the target programming language and a corresponding execution instruction;
and the second storage unit is used for correspondingly storing the development environment execution operation and the execution instruction in the target programming database.
In a fourth aspect, embodiments of the present application provide an apparatus for constructing a database, the apparatus comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs configured to be executed by the one or more processors include instructions for:
determining a programming identifier of a target programming language;
obtaining pronunciation characteristics of the programming identifier of a target user as voice characteristics of the programming identifier;
and constructing a target programming database corresponding to the target user and the target programming language based on the voice characteristics of the programming identifier corresponding to the stored programming identifier.
In a fifth aspect, embodiments of the present application provide a machine-readable medium having stored thereon instructions, which, when executed by one or more processors, cause an apparatus to perform a method of constructing a database as described in one or more of the above first aspects.
In a sixth aspect, an embodiment of the present application provides a speech programming apparatus, which uses the target programming database described in any one of the above third aspects, and includes:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring to-be-recognized programming voice data of a target user, and the to-be-recognized programming voice data comprises to-be-recognized programming identifier voice data;
the obtaining and determining unit is used for obtaining the voice characteristics of the voice data of the programming identifier to be recognized; determining the target programming database based on the identification of the target user and the identification of the programming language;
and the second determining unit is used for determining the programming identifier corresponding to the voice characteristic of the voice data of the programming identifier to be recognized in the target programming database.
Optionally, the to-be-recognized programming speech further includes to-be-recognized template name speech data, and the target programming database is the target programming database of the first storage unit, and further includes:
the first identification unit is used for identifying the template name in the template name voice data to be identified;
and the fifth determining unit is used for determining the common code editing template corresponding to the template name in the target programming database.
Optionally, the to-be-recognized programming speech further includes to-be-recognized execution instruction speech data, and the target programming database is the target programming database of the second storage unit, further including:
the second identification unit is used for identifying the execution instruction in the voice data of the execution instruction to be identified;
and the sixth determining unit is used for determining the development environment execution operation corresponding to the execution instruction in the target programming database.
In a seventh aspect, an embodiment of the present application provides an apparatus for speech programming, the apparatus comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs configured to be executed by the one or more processors include instructions for:
acquiring to-be-recognized programming voice data of a target user, wherein the to-be-recognized programming voice data comprises to-be-recognized programming identifier voice data;
obtaining voice characteristics of the voice data of the programming identifier to be recognized; determining the target programming database based on the identification of the target user and the identification of the programming language;
and determining a programming identifier corresponding to the voice characteristic of the voice data of the programming identifier to be recognized in the target programming database.
In an eighth aspect, embodiments of the present application provide a machine-readable medium having stored thereon instructions, which when executed by one or more processors, cause an apparatus to perform a method of voice programming as described in one or more of the second aspects above.
Compared with the prior art, the method has the advantages that:
by adopting the technical scheme of the embodiment of the application, firstly, a programming identifier of a target programming language is determined; then, acquiring pronunciation characteristics of the target user to the programming identifier as voice characteristics of the programming identifier; and finally, constructing a target programming database corresponding to the target user and the target programming language based on the voice characteristics of the programming identifier corresponding to the stored programming identifier. Therefore, the naming habit and the pronunciation habit of the target user for the programming identifier are determined by determining the programming identifier and obtaining the pronunciation characteristic of the target user for the programming identifier, so that the constructed target programming database can be individually adapted to the target user, and different target programming databases support the difference of the naming habit or the pronunciation habit of different target users for the programming identifier with the same meaning. And subsequently, for the programming voice input by the target user, the corresponding programming identifier can be efficiently and accurately determined by utilizing the corresponding target programming database to perform voice programming, so that the efficiency and the effect of the voice programming are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a system framework related to an application scenario in an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating a method for constructing a database according to an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating a method of voice programming according to an embodiment of the present disclosure;
FIG. 4 is a schematic structural diagram of an apparatus for constructing a database according to an embodiment of the present disclosure;
FIG. 5 is a schematic structural diagram of a voice programming apparatus according to an embodiment of the present disclosure;
FIG. 6 is a schematic structural diagram of an apparatus for constructing a database or voice programming according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, the programming of the keyboard and the mouse device is gradually changed into the voice programming, and specifically, for the programming voice input by different developers, corresponding programming identifiers are searched in the same programming database to be called and combined to form a program. However, when different developers perform voice programming, different developers have different naming habits or pronunciation habits for programming identifiers with the same meaning, and the corresponding programming identifiers cannot be efficiently and accurately searched by using the same programming database, that is, the programming database cannot support the difference of the naming habits or pronunciation habits of the programming identifiers with the same meaning for different developers, and has poor adaptability to different developers, thereby affecting the efficiency and effect of the voice programming.
To address this issue, in an embodiment of the present application, a programming identifier of a target programming language is determined; obtaining pronunciation characteristics of the target user to the programming identifier as voice characteristics of the programming identifier; and correspondingly storing the voice characteristics of the programming identifier based on the programming identifier so as to build a target programming database corresponding to the target user and the target programming language. Therefore, the naming habit and the pronunciation habit of the target user for the programming identifier are determined by determining the programming identifier and obtaining the pronunciation characteristic of the target user for the programming identifier, so that the constructed target programming database can be individually adapted to the target user, and different target programming databases support the difference of the naming habit or the pronunciation habit of different target users for the programming identifier with the same meaning. And subsequently, for the programming voice input by the target user, the corresponding programming identifier can be efficiently and accurately determined by utilizing the corresponding target programming database to perform voice programming, so that the efficiency and the effect of the voice programming are improved.
For example, one of the scenarios in the embodiment of the present application may be applied to the scenario shown in fig. 1, where the scenario includes the user terminal 101 and the processor 102, where the user terminal 101 may be a personal computer, or may be another mobile terminal, such as a mobile phone or a tablet computer. The user operates the user terminal 101 to determine the programming identifier of the determined target programming language, the user terminal 101 sends the programming identifier of the determined target programming language to the processor 102, and the processor 102 constructs the target programming database corresponding to the target user and the target programming language by adopting the technical scheme of constructing the database according to the embodiment of the application. After the user inputs the to-be-recognized programming voice data of the target user at the user terminal 101, the user terminal 101 sends the to-be-recognized programming voice data of the target user to the processor 102, and the to-be-recognized programming voice data includes the to-be-recognized programming identifier voice data. The processor 102 determines the programming identifier corresponding to the voice data of the programming identifier to be recognized by using the technical solution of voice programming in the embodiment of the present application to display on the interface of the user terminal 101.
It is to be understood that, in the above application scenario, although the actions of the embodiment of the present application are described as being performed by the processor 102, the actions may also be performed by the user terminal 101, or may also be performed partially by the user terminal 101 and partially by the processor 102. The present application is not limited in terms of the execution subject as long as the actions disclosed in the embodiments of the present application are executed.
It is to be understood that the above scenario is only one example of a scenario provided in the embodiment of the present application, and the embodiment of the present application is not limited to this scenario.
The following describes in detail specific implementations of a method for constructing a database and a voice programming and related apparatuses in the embodiments of the present application, with reference to the accompanying drawings.
Exemplary method
Referring to fig. 2, a flow chart of a method for constructing a database in the embodiment of the present application is shown. In this embodiment, the method may include, for example, the steps of:
step 201: a programming identifier of a target programming language is determined.
It can be understood that, because different developers have different naming habits or pronunciation habits for programming identifiers with the same meaning, and the like, in the prior art, the same programming database is used for programming voices input by different developers, and the programming database cannot support the difference of the naming habits or pronunciation habits for programming identifiers with the same meaning by different developers, so that the adaptability of the programming database to different developers is poor. Therefore, in the embodiment of the application, the personalized programming database which is extremely suitable for the developers is constructed according to the naming habit or pronunciation habit of each developer to the programming identifier. And taking the developer as a target user, constructing a personalized programming database of the developer, namely constructing a target programming database, wherein the construction of the target programming database needs a programming identifier of a programming language selected by the target user, and the programming language selected by the target user is the target programming language.
It should be noted that the common programming languages are C language, C + + language, C # language, Java language, go language, python language and scala language, and the target programming language is any one of them. The programming identifiers of the target programming language can be largely classified into three types by their types, a keyword, a predefined programming identifier, and a user-defined programming identifier. The predefined programming identifier includes, for example, a function name, a constant name, a class name, and the like, the function name is generally a common function name, and the user-defined programming identifier includes, for example, a custom function name, a custom variable name, and the like. Therefore, in an alternative implementation manner of this embodiment of the present application, the target programming language includes a C language, a C + + language, a C # language, a Java language, a go language, a python language, or a scala language; the type of the programming identifier comprises one or more of a keyword, a function name, a custom variable name, a constant name and a class name; the function name comprises a common function name and/or a custom function name.
It should also be noted that when the type of the programming identifier is a key or a predefined programming identifier, the processor may directly determine the programming identifier to perform the subsequent steps. When the type of the programming identifier is a user-defined programming identifier, that is, the type of the programming identifier is a user-defined function name or a user-defined variable name, it indicates that the programming identifier is set by the user, and the processor cannot directly determine the programming identifier, and the programming identifier needs to be pre-defined and stored, so that the subsequent processor can determine the programming identifier to perform the subsequent steps. Therefore, in an optional implementation manner of this embodiment of the present application, if the type of the programming identifier is a custom function name or a custom variable name, before the step 201, for example, a step a may be further included: the programming identifier is pre-customized and stored.
As an example, when the type of the programming identifier is a custom function name, the user first customizes and stores the function name "dprintf" in advance through the user terminal, and specifically, the type of the "dprintf" is the custom function name, the spelling data is "dprintf", and the pronunciation data is [ d Promot f ]. As another example, when the type of the programming identifier is a custom variable name, the user first customizes and stores a variable name "srcAddr" in advance through the user terminal, and specifically, the type of the "srcAddr" is the custom variable name, spelling data is "srcAddr", and pronunciation data is [ src address ].
Step 202: and acquiring the pronunciation characteristics of the target user to the programming identifier as the voice characteristics of the programming identifier.
It is understood that after the programming identifier is determined in step 201, in order to construct a target programming database that is highly adapted to the target user to meet the pronunciation habit of the target user for personalizing the programming identifier, the personalized pronunciation characteristics of the target user for the programming identifier are obtained and used as the voice characteristics of the programming identifier for subsequently constructing the target programming database.
Specifically, the target user is required to pronounce the programming identifier once or several times through the user terminal, and the processor first collects pronunciation data of the target user for the programming identifier, and then extracts pronunciation features of the pronunciation data as voice features of the programming identifier. It should be noted that if the target user has different pronunciation data for the same programming identifier, the pronunciation characteristics of the extracted pronunciation data are different, i.e. different pronunciation characteristics are all used as the voice characteristics of the programming identifier. Therefore, in an alternative implementation manner of this embodiment of the present application, the step 202 may include the following steps:
and B: acquiring pronunciation data of the target user for the programming identifier;
and C: and obtaining pronunciation characteristics of the pronunciation data as the voice characteristics of the programming identifier based on a voice characteristic extraction model.
First, taking the same pronunciation data of the same programming identifier for the target user as an example, the pronunciation feature of the pronunciation data obtained based on the speech feature extraction model as the speech feature of the programming identifier is as follows:
as an example, the programming identifier is a keyword "FILE", the target user pronounces the keyword "FILE" for a plurality of times through the user terminal to form [ fil ], the processor collects and acquires pronunciation data of the target user for the keyword "FILE" as [ fil ], and a pronunciation feature of the pronunciation data [ fil ] is m by using the voice feature extraction model; the pronunciation feature m is used as the phonetic feature of the keyword "FILE".
As another example, the programming identifier is a common function name "printf", the target user pronounces the common function name "printf" for several times through the user terminal as [ printf ], the processor collects and acquires pronunciation data of the target user for the common function name "printf as [ printf ], and obtains pronunciation characteristics of the pronunciation data [ printf ] as n by using the speech characteristic extraction model; the pronunciation feature n is taken as the speech feature of the common function name "printf".
As another example, the programming identifier is a custom function name "dprintf", the target user pronounces the custom function name "dprintf" for several times through the user terminal to obtain [ d Purunf ], the processor collects and obtains pronunciation data of the target user for the custom function name "dprintf to obtain [ d Purunf ], and a pronunciation feature of the pronunciation data [ d Purunf ] is p by using the voice feature extraction model; and taking the pronunciation characteristic p as the pronunciation characteristic of the self-defined function name 'dprintf'.
As another example, the programming identifier is a custom variable name "srcAddr", the target user pronounces the custom variable name "srcAddr" for several times through the user terminal to obtain a [ src address ], the processor collects and acquires pronunciation data of the target user to the custom variable name "srcAddr" as the [ src address ], and a pronunciation feature of the pronunciation data [ src address ] is obtained as q by using the voice feature extraction model; the pronunciation feature q is used as the phonetic feature of the custom variable name "srcAddr".
Further, taking as an example that the pronunciation data of the same programming identifier is different for the target user, the pronunciation feature of the pronunciation data obtained based on the speech feature extraction model as the speech feature of the programming identifier is as follows:
as an example, the programming identifier is the keyword "FILE", and the target user pronounces the keyword "FILE" several times through the user terminal
Figure BDA0002106787960000111
And [ fail]The processor collects the pronunciation data of the target user for the keyword' FILE
Figure BDA0002106787960000112
And [ fail]Obtaining pronunciation data using a speech feature extraction model
Figure BDA0002106787960000113
The pronunciation characteristics are u and pronunciation data [ fail]V is the pronunciation characteristic of; pronunciation features u and v are used as the phonetic features of the keyword "FILE". Similarly, when the target user has different pronunciation data for the same common function name, the user-defined function name or the user-defined variable name and other programming identifiers, the pronunciation features of the different pronunciation data are obtained by using the voice feature extraction model as the voice features of the target user, which is not described herein again.
It should be noted that, when the pronunciation habit of the target user to personalize the programming identifier changes, new pronunciation characteristics of the target user to personalize the programming identifier need to be retrieved and used as the voice characteristics of the programming identifier to update the voice characteristics of the programming identifier. Therefore, in an optional implementation manner of this embodiment of the present application, after the step 202, for example, the following steps may be further included:
step D: acquiring new voice data of the target user on the programming identifier;
step E: and obtaining the pronunciation characteristics of the pronunciation characteristic update programming identifier of the new pronunciation data based on a pronunciation characteristic extraction model.
As an example, the programming identifier is a custom variable name "srcAddr", the target user pronounces the custom variable name "srcAddr" for several times through the user terminal, and the [ src address ] is changed into [ srcAddr ], the processor collects and acquires new pronunciation data of the target user to the custom variable name "srcAddr as [ srcAddr ], and acquires pronunciation characteristics of the new pronunciation data [ srcAddr ] as l by using the voice characteristic extraction model; the pronunciation characteristic l is used as the pronunciation characteristic of the custom variable name "srcAddr".
Step 203: and constructing a target programming database corresponding to the target user and the target programming language based on the voice characteristics of the programming identifier corresponding to the stored programming identifier.
It will be appreciated that after obtaining the speech features of the programming identifier that are actually personalized pronunciation features of the programming identifier for the target user in step 202, the speech features of the programming identifier need to be stored corresponding to the programming identifier to construct a target programming database that is highly adapted to the target user and conforms to the pronunciation habits personalized for the target user for the programming identifier.
In particular, for the programming identifier, what is actually needed to be stored correspondingly is the type of the programming identifier, spelling data, pronunciation data, and voice characteristics, especially the spelling data of the programming identifier in order to subsequently clarify the spelling data of the corresponding programming identifier based on the voice characteristics. Therefore, in an optional implementation manner of this embodiment of the present application, the step 203 may specifically be, for example: and correspondingly storing the type, spelling data, pronunciation data and voice characteristics of the programming identifier based on the programming identifier.
Based on the various examples in step 202, the following examples are obtained: as an example, the type, spelling data, pronunciation data, and speech characteristics of the keyword "FILE" are correspondingly stored as { type: a keyword; spelling data: "FILE"; pronunciation data: [ fil ]; voice characteristics: m }. As another example, the type, spelling data, pronunciation data, and speech feature of the common function name "printf" are correspondingly stored as { type: a common function name; spelling data: "printf"; pronunciation data: [ printf ]; voice characteristics: n }. As yet another example, based on the custom function name "dprintf", the type, spelling data, pronunciation data, and phonetic feature of which are stored are correspondingly { type: self-defining a function name; spelling data: "dprintf"; pronunciation data: [ d Printet f ]; voice characteristics: p }. As yet another example, based on the custom variable name "srcoadr", the type, spelling data, pronunciation data, and speech characteristics of which are stored correspondingly are { type: self-defining variable names; spelling data: "srcAddr"; pronunciation data: [ src address ]; voice characteristics: q }.
It should be further noted that, a common code editing template convenient for programming is generally provided in the target programming language, and the common code editing template of the target programming language can be named to obtain a corresponding template name; for example, "while loop code editing template" corresponds to the template name "while loop"; the "if statement code edit template" corresponds to the template name "if statement". In the embodiment of the application, the common code editing template of the target programming language and the template name can be correspondingly stored in the target programming database, so that the corresponding common code editing template of the target programming language can be directly obtained in the target programming database based on the template name for voice programming of the target programming language. Therefore, in an optional implementation manner of the embodiment of the present application, the method further includes:
step F: determining a common code editing template and a corresponding template name of the target programming language;
step G: and correspondingly storing the common code editing template and the template name in the target programming database.
It should be noted that, for the target programming language, various programming operations are generally performed in a specific development environment, that is, the development environment execution operation of the target programming language may be named to obtain a corresponding execution instruction; for example, "start execution operation" corresponds to an execution instruction "start"; the new execution operation corresponds to the execution instruction new; the "compiling execution operation" corresponds to the execution instruction "compiling" and the "execution operation" corresponds to the execution instruction "running", and the like. In the embodiment of the application, the development environment execution operation and the execution instruction of the target programming language can be correspondingly stored in the target programming database, so that the development environment execution operation of the corresponding target programming language can be directly obtained in the target programming database based on the execution instruction to perform the voice programming of the target programming language. Therefore, in an optional implementation manner of the embodiment of the present application, the method further includes:
step H: determining a development environment execution operation of the target programming language and a corresponding execution instruction;
step I: and correspondingly storing the development environment execution operation and the execution instruction in the target programming database.
Through various embodiments provided by this embodiment, first, a programming identifier of a target programming language is determined; then, acquiring pronunciation characteristics of the target user to the programming identifier as voice characteristics of the programming identifier; and finally, constructing a target programming database corresponding to the target user and the target programming language based on the voice characteristics of the programming identifier corresponding to the stored programming identifier. Therefore, the naming habit and the pronunciation habit of the target user for the programming identifier are determined by determining the programming identifier and obtaining the pronunciation characteristic of the target user for the programming identifier, so that the constructed target programming database can be individually adapted to the target user, and different target programming databases support the difference of the naming habit or the pronunciation habit of different target users for the programming identifier with the same meaning. And subsequently, for the programming voice input by the target user, the corresponding programming identifier can be efficiently and accurately determined by utilizing the corresponding target programming database to perform voice programming, so that the efficiency and the effect of the voice programming are improved.
It should be noted that, when the target user inputs the to-be-recognized programming voice data including the to-be-recognized programming identifier voice data, the target programming database conforming to the naming habit or pronunciation habit of the target user for the programming identifier needs to be utilized to perform voice programming, and the programming identifier corresponding to the to-be-recognized programming voice data is determined efficiently and accurately, so as to improve the efficiency and effect of the voice programming. Specifically, the voice feature of the voice data of the programming identifier to be recognized needs to be obtained, the target programming database is determined based on the identification of the target user and the identification of the programming language, and the programming identifier corresponding to the voice feature of the voice data of the programming identifier to be recognized is determined through matching of the voice feature of the voice data of the programming identifier to be recognized and the voice feature of the programming identifier in the target programming database. The following describes, by way of example, a specific implementation manner of the present application in which the target programming database is subjected to voice programming in the foregoing method embodiment, with reference to fig. 3.
Referring to fig. 3, a flow chart of a method of voice programming in an embodiment of the present application is shown. In this embodiment, with the target programming database described in the above method embodiment, the method may include the following steps:
step 301: and acquiring to-be-recognized programming voice data of a target user, wherein the to-be-recognized programming voice data comprises to-be-recognized programming identifier voice data.
Step 302: obtaining voice characteristics of the voice data of the programming identifier to be recognized; the target programming database is determined based on an identification of a target user and an identification of a programming language.
Step 303: and determining a programming identifier corresponding to the voice characteristic of the voice data of the programming identifier to be recognized in the target programming database.
As an example, a target user inputs a to-be-recognized programming identifier voice data "incroad" at a user terminal, a processor obtains the to-be-recognized programming identifier voice data "incroad" of the target user, obtains a voice feature of the to-be-recognized programming identifier voice data "incroad" based on a voice feature extraction model, determines a target programming database based on the identification of the target user and the identification of a programming language, and matches the target programming database to obtain a { type: a keyword; spelling data: "include"; pronunciation data: "lnkruend"; voice characteristics: y, if the programming identifier corresponding to the voice feature of the to-be-recognized programming identifier voice data "inclund" is "include", inserting the programming identifier "include" into the position where the cursor is located.
Corresponding to the above method embodiment, the programming speech to be recognized may further include the template name speech data to be recognized, and then the template name in the template name speech data to be recognized needs to be recognized first, and then the common code editing template corresponding to the template name may be directly obtained through template name matching in the target programming database. Therefore, in an optional implementation manner of the embodiment of the present application, the programming speech to be recognized further includes speech data of a template name to be recognized, and for example, the following steps may be further included:
step J: identifying the template name in the template name voice data to be identified;
step K: and determining a common code editing template corresponding to the template name in the target programming database.
As an example, a target user inputs a template name voice data to be recognized "insert main function" at a user terminal, a processor acquires the template name voice data to be recognized "insert main function" of the target user, recognizes the template name of the target user as the "main function" by using a voice recognition technology, and matches a common code editing template corresponding to the template name "main function" in a target programming database to obtain the "main function code editing template", specifically: "int main (int argc, char argv [ ]) \\ r \ n { \ r \ nreturn 0; \ r \ n } ", then insert" main function code editing template "into the position of the cursor.
Corresponding to the method embodiment, the to-be-recognized programming voice may further include to-be-recognized execution instruction voice data, and then, an execution instruction in the to-be-recognized execution instruction voice data is needed first, and then, a development environment execution operation corresponding to the execution instruction may be directly obtained in the target programming database through execution instruction matching. Therefore, in an optional implementation manner of the embodiment of the present application, the to-be-recognized programming speech further includes to-be-recognized execution instruction speech data, and for example, the following steps may be further included:
step L: identifying an execution instruction in the voice data of the execution instruction to be identified;
step M: and determining a development environment execution operation corresponding to the execution instruction in the target programming database.
As an example, a target user inputs to-be-recognized execution instruction voice data "start running" at a user terminal, a processor acquires to-be-recognized execution instruction voice data "start running" of the target user, recognizes an execution instruction as "running" by using a voice recognition technology, and executes a development environment execution operation corresponding to the execution instruction "running" obtained by matching in a target programming database as "running execution operation", and then executes the "running execution operation" in a development environment of a target programming language.
Through various implementation manners provided by the embodiment, firstly, to-be-recognized programming voice data including to-be-recognized programming identifier voice data of a target user is acquired; then, obtaining the voice characteristics of the voice data of the programming identifier to be recognized, and determining a target programming database based on the identification of the target user and the identification of the programming language; and finally, determining the programming identifier corresponding to the voice characteristic of the voice data of the programming identifier to be recognized in the target programming database. Therefore, the target programming database which is individually adapted to the target user is determined through the identification of the target user and the identification of the programming language, the target programming database supports the naming habit or the pronunciation habit of the target user for the programming identifier, and the programming identifier corresponding to the voice characteristics of the voice data of the programming identifier to be recognized can be efficiently and accurately determined by utilizing the target programming database, so that the efficiency and the effect of voice programming are improved.
Exemplary devices
Referring to fig. 4, a schematic structural diagram of an apparatus for constructing a database in the embodiment of the present application is shown. In this embodiment, the apparatus may specifically include:
a first determining unit 401 for determining a programming identifier of a target programming language;
a first obtaining unit 402, configured to obtain a pronunciation feature of the programming identifier for a target user as a voice feature of the programming identifier;
a constructing unit 403, configured to construct a target programming database corresponding to the target user and the target programming language based on the programming identifier corresponding to the voice feature storing the programming identifier.
In an optional implementation manner of the embodiment of the present application, the target programming language includes a C language, a C + + language, a C # language, a Java language, a go language, a python language, or a scala language; the type of the programming identifier comprises one or more of a keyword, a function name, a custom variable name, a constant name and a class name; the function name comprises a common function name and/or a custom function name.
In an optional implementation manner of this embodiment of this application, the first obtaining unit 402 includes:
the acquisition subunit is used for acquiring pronunciation data of the target user for the programming identifier;
an obtaining subunit, configured to obtain a pronunciation feature of the pronunciation data as a voice feature of the programming identifier based on a voice feature extraction model.
In an optional implementation manner of the embodiment of the present application, if the type of the programming identifier is a custom function name or a custom variable name, before the first determining unit 401, the method further includes:
and the self-defining storage unit is used for self-defining in advance and storing the programming identifier.
In an optional implementation manner of the embodiment of the present application, the constructing unit 403 is specifically configured to:
and constructing a target programming database corresponding to the target user and the target programming language based on the type, spelling data, pronunciation data and voice characteristics of the programming identifier which is correspondingly stored by the programming identifier.
In an optional implementation manner of the embodiment of the present application, the method further includes:
the third determining unit is used for determining a common code editing template of the target programming language and a corresponding template name;
and the first storage unit is used for correspondingly storing the common code editing template and the template name in the target programming database.
In an optional implementation manner of the embodiment of the present application, the method further includes:
a fourth determining unit, configured to determine a development environment execution operation of the target programming language and a corresponding execution instruction;
and the second storage unit is used for correspondingly storing the development environment execution operation and the execution instruction in the target programming database.
By the various embodiments provided by this embodiment, the first determining unit determines a programming identifier of the target programming language; the first obtaining unit obtains pronunciation characteristics of the target user to the programming identifier as voice characteristics of the programming identifier; the construction unit constructs a target programming database corresponding to the target user and the target programming language based on the voice characteristics of the programming identifier corresponding to the stored programming identifier. Therefore, the naming habit and the pronunciation habit of the target user for the programming identifier are determined by determining the programming identifier and obtaining the pronunciation characteristic of the target user for the programming identifier, so that the constructed target programming database can be individually adapted to the target user, and different target programming databases support the difference of the naming habit or the pronunciation habit of different target users for the programming identifier with the same meaning. And subsequently, for the programming voice input by the target user, the corresponding programming identifier can be efficiently and accurately determined by utilizing the corresponding target programming database to perform voice programming, so that the efficiency and the effect of the voice programming are improved.
Referring to fig. 5, a schematic structural diagram of a voice programming apparatus in an embodiment of the present application is shown. In this embodiment, the apparatus may specifically include:
an obtaining unit 501, configured to obtain to-be-recognized programming voice data of a target user, where the to-be-recognized programming voice data includes to-be-recognized programming identifier voice data;
an obtaining and determining unit 502, configured to obtain a voice feature of the voice data of the programming identifier to be recognized; determining the target programming database based on the identification of the target user and the identification of the programming language;
a second determining unit 503, configured to determine, in the target programming database, a programming identifier corresponding to the voice feature of the to-be-recognized programming identifier voice data.
In an optional implementation manner of the embodiment of the present application, the programming speech to be recognized further includes speech data of a name of a template to be recognized, and the target programming database is the target programming database of the first storage unit, and further includes:
the first identification unit is used for identifying the template name in the template name voice data to be identified;
and the fifth determining unit is used for determining the common code editing template corresponding to the template name in the target programming database.
In an optional implementation manner of the embodiment of the present application, the to-be-recognized programming speech further includes to-be-recognized execution instruction speech data, and the target programming database is the target programming database of the second storage unit, further including:
the second identification unit is used for identifying the execution instruction in the voice data of the execution instruction to be identified;
and the sixth determining unit is used for determining the development environment execution operation corresponding to the execution instruction in the target programming database.
Through various implementation manners provided by the embodiment, the obtaining unit obtains to-be-recognized programming voice data including to-be-recognized programming identifier voice data of a target user; the obtaining and determining unit is used for obtaining the voice characteristics of the voice data of the programming identifier to be recognized and determining a target programming database based on the identification of the target user and the identification of the programming language; the second determining unit determines the programming identifier corresponding to the voice characteristic of the voice data of the programming identifier to be recognized in the target programming database. Therefore, the target programming database which is individually adapted to the target user is determined through the identification of the target user and the identification of the programming language, the target programming database supports the naming habit or the pronunciation habit of the target user for the programming identifier, and the programming identifier corresponding to the voice characteristics of the voice data of the programming identifier to be recognized can be efficiently and accurately determined by utilizing the target programming database, so that the efficiency and the effect of voice programming are improved.
FIG. 6 is a block diagram illustrating an apparatus 600 for building a database or voice programming according to an example embodiment. For example, the apparatus 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, apparatus 600 may include one or more of the following components: processing component 602, memory 604, power component 606, multimedia component 608, audio component 610, input/output (I/O) interface 612, sensor component 614, and communication component 616.
The processing component 602 generally controls overall operation of the device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 can include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operation at the device 600. Examples of such data include instructions for any application or method operating on device 600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 604 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power supply component 606 provides power to the various components of device 600. The power components 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 600.
The multimedia component 608 includes a screen that provides an output interface between the device 600 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure correlated to the touch or slide operation. In some embodiments, the multimedia component 608 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 600 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 610 is configured to output and/or input audio signals. For example, audio component 610 includes a Microphone (MIC) configured to receive external audio signals when apparatus 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 614 includes one or more sensors for providing status assessment of various aspects of the apparatus 600. For example, the sensor component 614 may detect an open/closed state of the device 600, the relative positioning of components, such as a display and keypad of the apparatus 600, the sensor component 614 may also detect a change in position of the apparatus 600 or a component of the apparatus 600, the presence or absence of user contact with the apparatus 600, orientation or acceleration/deceleration of the apparatus 600, and a change in temperature of the apparatus 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communications between the apparatus 600 and other devices in a wired or wireless manner. The apparatus 600 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 604 comprising instructions, executable by the processor 620 of the apparatus 600 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of a mobile terminal, enable the mobile terminal to perform a method of building a database, the method comprising:
determining a programming identifier of a target programming language;
obtaining pronunciation characteristics of the programming identifier of a target user as voice characteristics of the programming identifier;
constructing a target programming database corresponding to the target user and the target programming language based on the programming identifier and the voice characteristics of the programming identifier; or the like, or, alternatively,
a method for enabling a mobile terminal to perform voice programming, the method comprising:
acquiring to-be-recognized programming voice data of a target user, wherein the to-be-recognized programming voice data comprises to-be-recognized programming identifier voice data;
obtaining voice characteristics of the voice data of the programming identifier to be recognized; determining the target programming database based on the identification of the target user and the identification of the programming language;
and determining a programming identifier corresponding to the voice characteristic of the voice data of the programming identifier to be recognized in the target programming database.
Fig. 7 is a schematic structural diagram of a server in the embodiment of the present application. The server 700 may vary significantly depending on configuration or performance, and may include one or more Central Processing Units (CPUs) 722 (e.g., one or more processors) and memory 732, one or more storage media 730 (e.g., one or more mass storage devices) storing applications 742 or data 744. Memory 732 and storage medium 730 may be, among other things, transient storage or persistent storage. The program stored in the storage medium 730 may include one or more modules (not shown), each of which may include a series of instruction operations for the server. Further, the central processor 722 may be configured to communicate with the storage medium 730, and execute a series of instruction operations in the storage medium 730 on the server 700.
The server 700 may also include one or more power supplies 726, one or more wired or wireless network interfaces 750, one or more input-output interfaces 758, one or more keyboards 756, and/or one or more operating systems 741, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely a preferred embodiment of the present application and is not intended to limit the present application in any way. Although the present application has been described with reference to the preferred embodiments, it is not intended to limit the present application. Those skilled in the art can now make numerous possible variations and modifications to the disclosed embodiments, or modify equivalent embodiments, using the methods and techniques disclosed above, without departing from the scope of the claimed embodiments. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present application still fall within the protection scope of the technical solution of the present application without departing from the content of the technical solution of the present application.

Claims (16)

1. A method of constructing a database, comprising:
determining a programming identifier of a target programming language;
obtaining pronunciation characteristics of the programming identifier of a target user as voice characteristics of the programming identifier;
and constructing a target programming database corresponding to the target user and the target programming language based on the voice characteristics of the programming identifier corresponding to the stored programming identifier.
2. The method of claim 1, wherein the target programming language comprises C language, C + + language, C # language, Java language, go language, python language, or scala language; the type of the programming identifier comprises one or more of a keyword, a function name, a custom variable name, a constant name and a class name; the function name comprises a common function name and/or a custom function name.
3. The method of claim 1, wherein obtaining the pronunciation characteristics of the programming identifier by the target user as the voice characteristics of the programming identifier comprises:
acquiring pronunciation data of the target user for the programming identifier;
and obtaining pronunciation characteristics of the pronunciation data as the voice characteristics of the programming identifier based on a voice characteristic extraction model.
4. The method of claim 2, wherein if the type of the programming identifier is a custom function name or a custom variable name, before the determining the programming identifier of the target programming language, further comprising:
the programming identifier is pre-customized and stored.
5. The method according to claim 1, wherein the storing of the voice characteristics of the programming identifier based on the corresponding programming identifier is specifically:
and correspondingly storing the type, spelling data, pronunciation data and voice characteristics of the programming identifier based on the programming identifier.
6. The method of claim 1, further comprising:
determining a common code editing template and a corresponding template name of the target programming language;
and correspondingly storing the common code editing template and the template name in the target programming database.
7. The method of claim 1, further comprising:
determining a development environment execution operation of the target programming language and a corresponding execution instruction;
and correspondingly storing the development environment execution operation and the execution instruction in the target programming database.
8. A method of voice programming, using the object programming database of any of claims 1-7, comprising:
acquiring to-be-recognized programming voice data of a target user, wherein the to-be-recognized programming voice data comprises to-be-recognized programming identifier voice data;
obtaining voice characteristics of the voice data of the programming identifier to be recognized; determining the target programming database based on the identification of the target user and the identification of the programming language;
and determining a programming identifier corresponding to the voice characteristic of the voice data of the programming identifier to be recognized in the target programming database.
9. The method according to claim 8, wherein the programming speech to be recognized further includes template name speech data to be recognized, and the target programming database is the target programming database according to claim 6 or 7, further comprising:
identifying the template name in the template name voice data to be identified;
and determining a common code editing template corresponding to the template name in the target programming database.
10. The method of claim 8, wherein the programming speech to be recognized further comprises execution instruction speech data to be recognized, and the target programming database is the target programming database of claim 7, further comprising:
identifying an execution instruction in the voice data of the execution instruction to be identified;
and determining a development environment execution operation corresponding to the execution instruction in the target programming database.
11. An apparatus for constructing a database, comprising:
a first determining unit for determining a programming identifier of a target programming language;
a first obtaining unit, configured to obtain a pronunciation feature of the programming identifier for a target user as a voice feature of the programming identifier;
and the construction unit is used for constructing a target programming database corresponding to the target user and the target programming language based on the voice characteristics of the programming identifier correspondingly stored in the programming identifier.
12. An apparatus for constructing a database, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and wherein the one or more programs configured to be executed by one or more processors comprise instructions for:
determining a programming identifier of a target programming language;
obtaining pronunciation characteristics of the programming identifier of a target user as voice characteristics of the programming identifier;
and constructing a target programming database corresponding to the target user and the target programming language based on the voice characteristics of the programming identifier corresponding to the stored programming identifier.
13. A machine-readable medium having stored thereon instructions which, when executed by one or more processors, cause an apparatus to perform a method of constructing a database as claimed in one or more of claims 1 to 7.
14. A voice programming apparatus, using the object programming database of claim 11, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring to-be-recognized programming voice data of a target user, and the to-be-recognized programming voice data comprises to-be-recognized programming identifier voice data;
the obtaining and determining unit is used for obtaining the voice characteristics of the voice data of the programming identifier to be recognized; determining the target programming database based on the identification of the target user and the identification of the programming language;
and the second determining unit is used for determining the programming identifier corresponding to the voice characteristic of the voice data of the programming identifier to be recognized in the target programming database.
15. An apparatus for speech programming, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and wherein execution of the one or more programs by one or more processors comprises instructions for:
acquiring to-be-recognized programming voice data of a target user, wherein the to-be-recognized programming voice data comprises to-be-recognized programming identifier voice data;
obtaining voice characteristics of the voice data of the programming identifier to be recognized; determining the target programming database based on the identification of the target user and the identification of the programming language;
and determining a programming identifier corresponding to the voice characteristic of the voice data of the programming identifier to be recognized in the target programming database.
16. A machine-readable medium having stored thereon instructions which, when executed by one or more processors, cause an apparatus to perform a method of voice programming as recited in one or more of claims 8-10.
CN201910555555.5A 2019-06-25 2019-06-25 Method for constructing database, method for voice programming and related device Pending CN112130839A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910555555.5A CN112130839A (en) 2019-06-25 2019-06-25 Method for constructing database, method for voice programming and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910555555.5A CN112130839A (en) 2019-06-25 2019-06-25 Method for constructing database, method for voice programming and related device

Publications (1)

Publication Number Publication Date
CN112130839A true CN112130839A (en) 2020-12-25

Family

ID=73850036

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910555555.5A Pending CN112130839A (en) 2019-06-25 2019-06-25 Method for constructing database, method for voice programming and related device

Country Status (1)

Country Link
CN (1) CN112130839A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113655896A (en) * 2021-08-25 2021-11-16 合肥马道信息科技有限公司 Working method of keyboard with voice transcription code function
CN115794065A (en) * 2022-11-01 2023-03-14 中犇科技有限公司 Visual intelligent programming method based on AI voice interaction

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113655896A (en) * 2021-08-25 2021-11-16 合肥马道信息科技有限公司 Working method of keyboard with voice transcription code function
CN115794065A (en) * 2022-11-01 2023-03-14 中犇科技有限公司 Visual intelligent programming method based on AI voice interaction
CN115794065B (en) * 2022-11-01 2023-11-03 中犇科技有限公司 Visual intelligent programming method based on AI voice interaction

Similar Documents

Publication Publication Date Title
US9942690B2 (en) Method and device for information push
CN107644646B (en) Voice processing method and device for voice processing
CN109961791B (en) Voice information processing method and device and electronic equipment
CN107666536B (en) Method and device for searching terminal
CN107945806B (en) User identification method and device based on sound characteristics
CN112508612B (en) Method for training advertisement creative generation model and generating advertisement creative and related device
CN112651235A (en) Poetry generation method and related device
CN112037756A (en) Voice processing method, apparatus and medium
CN112130839A (en) Method for constructing database, method for voice programming and related device
CN111061452A (en) Voice control method and device of user interface
CN111324214B (en) Statement error correction method and device
CN111613244A (en) Scanning and reading-following processing method and related device
CN113923517B (en) Background music generation method and device and electronic equipment
CN112784151A (en) Method and related device for determining recommendation information
CN112331194A (en) Input method and device and electronic equipment
CN109901726B (en) Candidate word generation method and device and candidate word generation device
CN111667827B (en) Voice control method and device for application program and storage medium
CN112363631A (en) Input method, input device and input device
CN112837668B (en) Voice processing method and device for processing voice
CN113946228A (en) Statement recommendation method and device, electronic equipment and readable storage medium
CN111831132A (en) Information recommendation method and device and electronic equipment
CN111611339A (en) Recommendation method and device for inputting related users
CN112732098A (en) Input method and related device
CN112242142B (en) Voice recognition input method and related device
CN115225702B (en) Information pushing method and device, electronic equipment and storage medium

Legal Events

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