Summary of the invention
The proposition of the technical program is exactly above-mentionedly occur these problems to solve.The technology that the technical program calls by a kind of Chinese language text the device that computer program runs specifically solves above-mentioned produced problem:
The Chinese language text of the technical program calls the device of computer program operation, comprise Chinese language text load module (1), computer system (2), Chinese language text word-dividing mode (3), store the computer program module (4) bound with the keyword in inputted Chinese phonetics codes or Chinese character in a computer in advance, by priority logical order arrangement institute's binding procedure module (5) performed, be stored in the program execution module (6) in computing machine, Chinese character and Chinese phonetics codes modular converter (7), be sequentially connected in series with the order of upper module according to computer treatmenting information,
Described Chinese phonetics codes comprises Chinese phonetic and adjusts full detail in units of word, main employing 26 Latin alphabets spellings;
Described Chinese language text comprises the text of Chinese natural statement, phrase and word composition.”
The feature of its method run of said apparatus and step is: first by Chinese language text load module 1, Chinese language text is inputted computer system 2, the Chinese language text received is carried out participle by Chinese language text word-dividing mode 3 by computer system 2, and then by storing the computer program module 4 bound with the keyword in inputted Chinese phonetics codes or Chinese character in a computer in advance, keyword in inputted Chinese phonetics codes or Chinese character is carried out the binding of computer program, correctly arrange finally by the computer program that will perform by the priority logical order arrangement institute binding procedure module 5 performed and be connected, and be transferred to the program execution module 6 be stored in computing machine and hand over computer system 2 to perform.
If computer program only carries out binding with Chinese phonetics codes and computer system 2 receives is Chinese-character text, first by Chinese language text load module 1, Chinese language text is inputted computer system 2, the Chinese language text received is carried out participle by Chinese language text word-dividing mode 3 by computer system 2, and then convert the Chinese character of point good word to form by ASCII character Chinese phonetics codes by Chinese character and Chinese phonetics codes modular converter 7, and then by storing the computer program module 4 bound with the keyword in inputted Chinese phonetics codes or Chinese character in a computer in advance, keyword in converted to Chinese phonetics codes is carried out the binding of computer program, correctly arrange finally by the computer program that will perform by the priority logical order arrangement link block 5 performed and be connected, and be transferred to the program execution module 6 be stored in computer system 2 and hand over computer system 2 to perform.
Above-mentioned Chinese language text load module can be the specific input keyboard load module of standard English keyboard module or Chinese character, or handwriting input module, or optical scanning load module, or cable network load module, or wireless network load module, or less radio-frequency load module, computer stored EM equipment module.
Above-mentioned computer system 2 can be desktop computer or notebook computer or server or cloud computer system, also can be embedded computer system.
Computer system 2 is when commencement of commercial operation program, be divided into two kinds of mode operations, one is automatic operational mode, this pattern carries out the operation of program automatically to the understanding of received Chinese language text according to computing machine, and the function that the program brought into operation will be reached exports with the phonetic synthesis form of Chinese language text or this Chinese language text; Another kind is inquiry affirmation mode, under this pattern, computer system 2 first correctly corrects received Chinese language text and the optimization of executive routine, and feed back a process and correctly correct the Chinese language text optimised with executive routine, this Chinese language text also can export through voice synthetic module in the form of speech, performs after confirming.
Above-mentioned Chinese phonetics codes spells in units of word with 26 Latin alphabets, here individual Chinese character is regarded as monosyllable, according to the phonetic in " Scheme for the Chinese Phonetic Alphabet " of each syllable of this word of composition, with and only use 26 Latin alphabets to the initial consonant of the Chinese phonetic alphabet, referral letter, simple or compound vowel of a Chinese syllable, tone is taked first to encode again successively by the sequential encoding spelling of " acoustic code+Jie's code+rhyme code+tune code is held concurrently every syllable symbol ", and directly express Chinese information by the coding of the phonetic code obtained, when direct term syllable code represents Chinese information, its usage in punctuation is identical with English usage in punctuation, during coding, multiple syllables of same word are without space continuous programming code, space will be had between word and word to separate.
The Chinese phonetics codes adopting 26 Latin alphabets to represent due to the technical program is to express Chinese information, and when direct term syllable code represents Chinese information, its usage in punctuation is identical with English usage in punctuation, this ensures that there the expression punctuation mark of Chinese information interior all completely the same with ASCII character, also namely compatible with ASCII character 100%, this ensures that thering whole system can run in the computing machine of ASCII character system.
Running environment due to computer programming language is generally ASCII character environment, therefore after having had the technical program, Chinese language text information can call computer program easily as English on the one hand, facilitate non-computer programming personnel to call computer program by the mode of nature text language on the other hand, thus the computer program that these call by computer run realize the control of various Computerized intelligent.
Embodiment
Below in conjunction with embodiment, the specific embodiment of the present invention is further described.
(1) coding method of each syllable sound, rhyme, tone of Chinese phonetics codes that the technical program adopts adopts following method:
Note: the symbol after dash "-" is Chinese phonetic symbols, the letter before dash "-" is the coding of each syllable sound, rhyme, tone of adopted Chinese, below all with, below by following control table referred to as code table.
Here it is worthy of note: when keying in the punctuation mark of Chinese phonetics codes and Chinese phonetics codes statement with keyboard, 26 Latin alphabets of composition Chinese phonetics codes coding are identical corresponding completely one by one with 26 letter keys of western language QWERTY keyboard, the punctuation mark key of Chinese phonetics codes statement and the punctuation mark key of western language QWERTY keyboard are also identical corresponding one by one, when input Chinese speech code letter and punctuation mark, only need the corresponding identical key mapping impacting western language QWERTY keyboard.
1, the coded identification of acoustic code adopts the letter character of the initial consonant basically identical with the Scheme for the Chinese Phonetic Alphabet, such as adopts the coding form of this acoustic code below:
b—b;p—p;m—m;f—f;d—d;t—t;
n—n;l—l;g—g;k—k;h—h;
j—zh,j;q—ch,q;x—sh,x;r—r;
z—z;c—c;s—s;y—y;w—w。
2, Chinese phonetic alphabet referral letter (ü) adopts a letter representation in 26 Latin alphabets, such as adopts the coding form of this Jie's code below:
i—i;u—u;y—ü。
3, the coding of rhyme code, single vowel is adopted to a letter representation in 26 Latin alphabets except (ü) except, other adopts the letter character identical with the Chinese phonetic alphabet, the composite vowel of the Chinese phonetic alphabet can adopt the form that " Scheme for the Chinese Phonetic Alphabet " is identical, also a consonant can be adopted to encode, such as adopt the simple or compound vowel of a Chinese syllable of this letter character to the Chinese phonetic alphabet below to encode:
a—a;o—o;e—e;i—i;u—u;y—ü;
k—ao;c—ai;s—an;x—ou;w—ei;n—en;
z—ua;l—uo;b—ang;d—ong;p—eng;
q—ing;g—ng;er—er;
R-i; " when i only spells with Chinese Pin Yin pseudonym zh, ch, sh phase, the coding r of the i phonetic code of the Chinese phonetic alphabet represents ".That is: zhi, chi, shi of the Chinese phonetic alphabet represent with jr, qr, xr of phonetic code respectively.J and R or Q and R or X and R and E and R two key mapping inputs are pressed respectively when jr or qr or xr and er input through keyboard.
4, adjust the coding of code except employing Chinese no consonant v represents the upper sound (∨) of the Chinese phonetic alphabet, other adopts vowel to represent the tone of Chinese, such as adopts the tone of letter below to the Chinese phonetic alphabet to encode:
A---, high and level tone; E-/, rising tone; V-∨, upper sound; U-, falling tone;
O-phonetic does not mark tone mark softly, softly.
(2) utilize the Chinese phonetics codes Chinese information of above-mentioned coding to represent and adopt following method:
In units of word, here individual Chinese character is regarded as monosyllable, according to the phonetic in " Scheme for the Chinese Phonetic Alphabet " of each syllable of this word of composition, successively by the sequential encoding of " acoustic code+Jie's code+rhyme code+tune code is held concurrently every syllable symbol ", multiple syllables of same word separate write the two or more syllables of a word together without space, and the coding space between word and word separates, when Chinese information represent be in Chinese phonetics codes state time, its six kinds of periods, seven kinds of labels adopt the form identical with English with the number of dividing a word with a hyphen at the end of a line;
Here owing to regarding the independent Chinese character used as monosyllable, therefore, the method of encode Chinese characters for computer of the present invention is identical with the method for Chinese language words syllable coding, adopt single syllable coding by obtaining word coding after word write the two or more syllables of a word together in the present invention, be made up of several words one group of word is called phrase by us, the present invention adopt the coding of phrase identical with the coding of Chinese sentence, because word can represent phrase and Chinese sentence, the coding of therefore adopted in the present invention phrase and the coding of Chinese sentence can be realized by the coding of word, and do not need to formulate a set of coding specially in addition to phrase and Chinese sentence, it is general when whole sentence entire chapter represents Chinese information in units of word, the selection carrying out homophone word is not generally needed when understanding, sound the sentence that can not produce ambiguity in principle, also can not produce ambiguity when expressing with coding.
The specific implementation step of the technical program is described for the text of the Chinese sentence of an input computing machine below:
Such as first by Chinese language text load module 1, we control to one the Chinese language text that the computer system 2 of air-conditioning inputs following Chinese-character text content:
" this afternoon 2, meeting room air-conditioning is opened, first ventilate 10 minutes, then room temperature is remained on 25 degree.”
After above-mentioned Chinese language text input computer system 2, the Chinese language text received is carried out participle by Chinese language text word-dividing mode 3 by computer system 2, obtains the text of point good word below:
" this afternoon 2, meeting room air-conditioning is opened, first ventilate 10 minutes, then room temperature is remained on 25 degree.”
The Chinese sentence of above-mentioned Chinese speech representation is:
Zcujinatisaxiauwuv2disvjibahuiuyiuxrukdatikvdavkca,xxvxisatdafpa10fnajda,rxvhxujibaxruwnabkvqrezcu25duu.
And then by storing the computer program module 4 bound with the keyword in inputted Chinese phonetics codes or Chinese character in a computer in advance, keyword in inputted Chinese phonetics codes or Chinese character is carried out the binding of computer program, concrete binding procedure is as follows:
Here jinatisa is " today " by the Chinese meaning that Chinese character represents, after this keyword is extracted, computing machine can go to look into calendar, the date finding today is such as on February 1st, 2013, this date will be extracted the program date parameter started as air conditioner ventilation and join in the program of air conditioner ventilation startup by computing machine, in like manner " xiauwuv2disv " is " 2 pm " by the Chinese meaning that Chinese character represents, after this crucial phrase is extracted, if computing machine can be converted into 14 points automatically by 24 hours computer chronographs, and is extracted the program time parameter opened as air-conditioning this time and join and open in the program of air-conditioning, if by 12 time timing, then computing machine this directly this time is extracted to join as the program time parameter opening air-conditioning and opens in the program of air-conditioning, here the huiuyiuxrukdatikv Chinese meaning that Chinese character represents is " meeting room air-conditioning ", after these two keywords are extracted, computing machine can go to look into " meeting room air-conditioning " address, after finding this " meeting room air-conditioning " address, the destination address parameter that this address will extract as the opertaing device in air conditioner ventilation start-up routine by computing machine joins in the program of air conditioner ventilation startup, here davkca is " opening " by the Chinese meaning that Chinese character represents, after this keyword is extracted, computing machine can go to look into " opening " air-conditioning program, find after this " opens " program of air-conditioning, this Program extraction will out correctly be arranged by the computer program that will perform by the priority logical order arrangement institute binding procedure module 5 performed and is connected by computing machine, here the foremost that air-conditioning this section of program module is placed on whole program will " be opened ", as the program first performed, because logically, if air-conditioning is not opened, other ventilation and temperature control supervisor are air-conditionings is to perform, so the program module that this section of air-conditioning is here opened will be placed on the foremost of whole program, as the program first performed, in like manner, if be not prescribed their priority executive routine to other program, also be according to the sequencing of this logic judgment criteria by auto arrangement program module after computer discriminant, rxvhxujiba. xxvxisa and rxvhxu is " first " and " then " by the Chinese meaning that Chinese character represents respectively here, because these two words do not have corresponding computer program corresponding with them, therefore, we claim this word to be non-key word, conjunction is belonged in Chinese, the implication of these two non-key words will come immediately following before rxvhxu subsequent course immediately following the program after xxvxisa, first perform than the program come after immediately following rxvhxu immediately following the program after xxvxisa during execution, here tdafpa is " ventilation " by the Chinese meaning that Chinese character represents, after this keyword is extracted, computing machine can go to look into the computer program bound with tdafpa, and the computer program bound with tdafpa found is extracted according to the execution sequence of upper surface analysis come open air-conditioning program module after, and then perform after opening air-conditioning program, here 10fnajda ventilates immediately following at tdafpa() after, computing machine can judge to refer to ventilation time " 10 minutes " accordingly, the ventilation duration parameters that computing machine will be extracted as air conditioner ventilation program joins in air conditioner ventilation program, here the xruwnabkvqre Chinese meaning that Chinese character represents is " room temperature maintenance ", after these two keywords are extracted, computing machine can go to look into the computer program bound with xruwnabkvqre, and the computer program bound with xruwnabkvqre found is extracted, and come tdafpa(according to the execution sequence of upper surface analysis and ventilate) after program module, and then tdafpa(ventilates) after program after perform, here zcu25duu(is at 25 degree) keep immediately following in xruwnabkvqre(room temperature) after, computing machine can judge that the temperature referring to " room temperature maintenance " is " 25 degree " accordingly, computing machine will be extracted to be kept as air-conditioning xruwnabkvqre(room temperature) temperature parameter of " room temperature maintenances " of program joins the maintenance of air-conditioning xruwnabkvqre(room temperature) in program program, so far, Chinese-character text has completed the computer program that whole text needs to transfer, and carried out the connection of correct procedure parameter assignment and program priority execution sequence.Finally computer system 2 is handed over to perform the above-mentioned program transportation connected to the program execution module 6 be stored in computing machine.
When above-mentioned whole program performs, first COMPUTER DETECTION current time, when current time arrives program Starting Executing Time: during point in 1 day 14 February in 2013 (2 pm), meeting room air-conditioning address is effective, to address, effective meeting room air-conditioning sends the control command of opening air-conditioning to computer program, meeting room air-conditioning is opened, after meeting room air-conditioning is opened, and then computing machine runs air conditioner ventilation program, computing machine can control air-conditioning and open the ventilating duct be connected with outdoor, scavenger fan simultaneously in air-conditioning can be started working, this is that room air and outdoor air can flow, realize the exchange of indoor and outdoor air, can constantly detect ventilation time at this process Computer and whether arrive the stand-by time of program setting, once detection ventilation time is the stand-by time to program setting, 10 minutes in present case, computing machine can send instruction to air-conditioning and cut out and outdoor ventilating opening, stop and outdoor ventilation, so just stopped the ventilation operation of air-conditioning, and then the xruwnabkvqre(room temperature that computing machine performs below keeps) program, this is that first computing machine detects indoor environment temperature, if lower than the maintenance temperature preset, 25 degree in present case, then computer program starts the heating arrangement in air-conditioning, make air-conditioning be discharged to indoor circulating air temperature to rise, in the process, computing machine keeps in xruwnabkvqre(room temperature) constantly detect indoor environment temperature under the control of program, if indoor environment temperature reaches the indoor environment temperature of program setting in advance, computing machine sends the instruction stopping heating to air-conditioning, air-conditioning heater stop heats, if higher than the maintenance temperature preset, 25 degree in present case, then computer program starts the refrigerating plant in air-conditioning, make air-conditioning be discharged to indoor circulating air temperature to decline, in the process, computing machine keeps in xruwnabkvqre(room temperature) constantly detect indoor environment temperature under the control of program, if indoor environment temperature reaches the indoor environment temperature of program setting in advance, computing machine sends the instruction stopping refrigeration to air-conditioning, air-conditioning refrigeration plant stops refrigeration, and indoor environment temperature just controls about 25 degree by the computing machine that like this goes round and begins again.So also just complete Chinese-character text calling computer program, achieve the method that Chinese-character text calls computer program operation.
Due to the difference of everyone word custom, some people's possibility word not necessarily standard, at this moment synonym and the near synonym table of comparisons can be stored in a computer in advance, and carry out automatically nonstandard word to be converted to by the synonym of setting and the near synonym table of comparisons Code words that computing machine approves by computing machine, keyword in computing machine must be the Code words of computing machine accreditation, such as: " open, open, open " " opening " this word can be unified by the table of comparisons, again such as: " turn off, close, close " " closedown " this word can be unified by the table of comparisons, and bind in advance with corresponding computer program module.
By that analogy, due to the object owing to controlling in this example, the action of time, control object can be changed by the change of Chinese language text, therefore said method can be adopted to carry out computer program to the action of other control object, time and control object and calls and realize the control to wanting control object.
After Chinese-character text changed by Chinese character and Chinese voice code bidirectional modular converter, Chinese character and Chinese phonetics codes can be changed mutually, therefore the technical program describe in, everyly can use Chinese speech representation by the information that Chinese character represents, vice versa, just do not state tired respectively here describing of the technical program.
Because computer programming language is when calling program module, often call by the program that the English spelt by 26 Latin alphabets is write, 26 Latin alphabets belong to ASCII character scope, it is no problem that computer system is normally run, because code system in Chinese character does not belong to ASCII character scope, if directly adopt Chinese character statement to call computer program, normal operation can not be ensured in some computer system, therefore, the technical program devises two sets of plan, a set of computer program and Chinese character keyword carry out binding as Fig. 1, when computer testing can not normally run in a computer to which, mode with regard to adopting another set of computer program and Chinese phonetics codes keyword to carry out binding is run as Fig. 2, because Chinese phonetics codes is the same as with English 26 Latin alphabet spellings, and punctuation mark is consistent with English, this ensure that the ISN of run Chinese information is within the scope of ASCII character, thus guarantee that the technical program can normally be run in computer systems, which.
If computer program only carries out binding with Chinese phonetics codes and computer system 2 receives is the situation of Chinese-character text as Fig. 2, then first by Chinese language text load module 1, Chinese language text is inputted computer system 2, the Chinese language text received is carried out participle by Chinese language text word-dividing mode 3 by computer system 2, such as: the above-mentioned text mentioned:
" this afternoon 2, meeting room air-conditioning is opened, first ventilate 10 minutes, then room temperature is remained on 25 degree." carry out participle through Chinese language text word-dividing mode 3, obtain the text of point good word below:
" this afternoon 2, meeting room air-conditioning is opened, first ventilate 10 minutes, then room temperature is remained on 25 degree.”
And then convert the Chinese character of point good word to form by ASCII character Chinese phonetics codes by Chinese character and Chinese phonetics codes modular converter 7, the sentence of above-mentioned Chinese-character text is converted to the Chinese sentence of following Chinese speech representation:
Zcujinatisaxiauwuv2disvjibahuiuyiuxrukdatikvdavkca,xxvxisatdafpa10fnajda,rxvhxujibaxruwnabkvqrezcu25duu.
And then repeat process above namely by storing the computer program module 4 bound with the keyword in inputted Chinese phonetics codes or Chinese character in a computer in advance, keyword in converted to Chinese phonetics codes is carried out the binding of computer program, correctly arrange finally by the computer program that will perform by the priority logical order arrangement link block 5 performed and be connected, and be transferred to the program execution module 6 be stored in computer system 2 and hand over computer system 2 to perform, had above concrete and described, be just not repeated here.
Above-mentioned Chinese language text load module can be the specific input keyboard load module of standard English keyboard module or Chinese character, or handwriting input module, or optical scanning load module, or cable network load module, or wireless network load module, or less radio-frequency load module, computer stored EM equipment module.
Above-mentioned computer system 2 can be desktop computer or notebook computer or server or cloud computer system, also can be embedded computer system.
Computer system 2 is when commencement of commercial operation program, be divided into two kinds of mode operations, one is automatic operational mode, this pattern carries out the operation of program automatically to the understanding of received Chinese language text according to computing machine, and the function that the program brought into operation will be reached exports with the phonetic synthesis form of Chinese language text or this Chinese language text; Another kind is inquiry affirmation mode, under this pattern, computer system 2 first correctly corrects received Chinese language text and the optimization of executive routine, and feed back a process and correctly correct the Chinese language text optimised with executive routine, this Chinese language text also can export through voice synthetic module in the form of speech, performs after confirming.
Such as, in example above, computer system 2 understanding of received Chinese speech information convert Chinese language text information to after, correctly call program that the keyword in text binds and carry out according to correct actuating logic on the basis of execution sequence arrangement, can export: " this afternoon, 2 meeting room air-conditionings were opened; first ventilate 10 minutes, then room temperature is remained on 25 degree." Chinese-character text information or this Chinese-character text phonetic synthesis after voice, this Chinese-character text information also can convert Chinese phonetics codes or foreign language to or minority language exports.
Another kind is inquiry affirmation mode, under this pattern, computer system 2 first correctly corrects the Chinese language text that received Chinese speech is converted and the optimization of executive routine, and feed back a process and correctly correct the Chinese language text optimised with executive routine, this Chinese language text also can export through the form of voice synthetic module and voice, performs after confirming.Such as: computer system 2 receives the Chinese-character text be converted with next section of Chinese speech information: " today 2, meeting room air-conditioning is opened, first ventilate 10 minutes, then room temperature is remained on 25 degree." computer system 2 detects and now have passed through point in the morning 2; can automatically by set of time 2 points in the afternoon; detect that immediate one section makes the more optimal Chinese language text of calling program with this Chinese language text in the Chinese language text simultaneously stored in advance in computer system 2; at this moment computer system 2 can export: " opened by meeting room air-conditioning this afternoon 2, first ventilate 10 minutes, then
with air-conditioning sterilizing is carried out to meeting room androom temperature is remained on 25 degree." you confirm? notice that the word of computer optimization part here the mark such as will to underline and send; after sending confirm Chinese speech or Chinese language text or other confirmations to computer system 2; computer system 2 just using this Chinese language text as the Chinese language text finally received; according to the step in case above, add " air-conditioning sterilizing program " satisfied preset condition time bring into operation.
Same this Chinese language text information above, after voice synthetic module phonetic synthesis, can export with speech form, and this Chinese-character text information also can convert Chinese phonetics codes or foreign language or minority language to and export.
Finally it is pointed out that and comprise Chinese character, the Chinese phonetic alphabet, Chinese phonetics codes etc., and Chinese-character text refers to the Chinese information text be made up of Chinese character by the text that the character that the Chinese language text in above-mentioned describing refers to all expression Chinese informations forms.
By the device of above the technical program, we achieve and call with Chinese language text the object that computer program runs.