Summary of the invention
The purpose of this utility model is the existence at the problems referred to above, provide a kind of and can pass through the internet, according to user's age, sex and hobby upgrade automatically, the program downloading content.By Script Programming realize controlling playing programs, receive user's input information, according to user's input information control follow-up play, drive soft, hardware function, drive access to netwoks and can export the network interaction voice toy components of deal with data.
The purpose of this utility model is achieved through the following technical solutions:
A kind of network interaction voice toy components comprises:
Storer is used for the storing audio program data, data such as user's operation information;
Audio decoder is used for audio data file in the playout storage;
Communication module is used for carrying out the renewal of program and the data communication between hardware and the PC;
Microcontroller, be used for the control audio playing programs, receive user's input information, according to user's input information control follow-up play, output deal with data, realize interactive question and answer.
Wherein above-mentioned network interaction voice toy components also includes:
Recording module is used for recording user voice data;
The LED dot matrix display screen realizes that by the LED lamp of lighting corresponding order image shows;
Clock module is used for being provided with the function of giving the correct time with timer clock;
Key-press module, be used for importing user's operation information, this key-press module give the correct time key, broadcast/Pause key, system power supply, program redirect key, music program key, English learning program key, the program key of telling a story, voice mail key, interactive game and knowledge question key, record button, answer selection key, volume control key up and down;
Power module is used for carrying out the power management of battery.
The beneficial effects of the utility model are: by the automatic renewal of internet realization program, the button input by the user in playing programs is achieved as follows interactive program: interactive question and answer, interactive story, multi-thread story, interactive voice recreation and interactive teaching etc.The user plays, answers a question by final result, participation that this toy can be controlled story, really realizes man-machine interaction.
Below in conjunction with drawings and Examples the utility model is further specified.
Embodiment
As shown in Figure 1, network interaction voice toy components described in the utility model comprises:
Storer is used for the storing audio program data, data such as user's operation information;
Audio decoder is used for audio data file in the playout storage;
Communication module is used for carrying out the renewal of program and the data communication between hardware and the PC, and communication module adopts the USB module in the utility model, promptly realizes data communication by the USB module;
Script audio pack file, all resource files that have the fragment of needed voice, music, audio and the control data file that includes multiple sampling rate and compressed format of self script, the corresponding intelligent interaction script of one cover is all arranged in each script data audio pack, playing program just can be finished a series of intelligence order automatically by the script file of carrying out wherein, and controls client software and hardware is finished multiple function;
Microcontroller, be used for explaining script command and control and manage various devices and make its collaborative work, the control audio playing programs, receive user's input information, according to user's input information control follow-up play, drive soft, hardware function, drive access to netwoks and can export deal with data, realize functions such as interactive question and answer, interactive story, multi-thread story, interactive voice recreation and interactive teaching, by the internet, according to user's age, sex and hobby upgrade automatically, the program downloading content.
Described network interaction voice toy components also includes:
Recording module is used for recording user voice data;
The LED dot matrix display screen realizes that by the LED lamp of lighting a definite sequence image shows;
Clock module is used for being provided with the function of giving the correct time with timer clock;
Key-press module, be used for importing user's operation information, this key-press module comprises the key that gives the correct time, broadcast/Pause key, system power supply, program redirect key, music program key, English learning program key, the program key of telling a story, voice mail key, interactive game and knowledge question key, record button, answer selection key, volume control key up and down;
Power module is used for carrying out the power management of battery.
Network interaction voice toy components wherein described in the utility model is a core with a microcontroller, this microprocessor can adopt Intel MCS-51 series, Atmel 89C51/52, Atmel 89C, connected storage carries out reading and storing of data, microcontroller reads the audio file data of storing in the storer as requested, calls in data and enter the broadcast that power amplifier module is realized voice data behind audio decoder decode.The voice signal that MIC gathers is converted into digital document by recording module and is stored in the storer, and need play in order to system is to call.By key control with the user key-press that receives coding and coded message is sent to microcontroller handle.The clock system of clock module is by realizing giving the correct time with being provided with of microcontroller and the function of timer clock.When need showing when output microprocessor controls LED matrix, system lights LED lamp on the LED matrix with display image according to certain image array data.Communication module is used for realizing that by the programmed process of the storer of microcontroller the USB mode passes data file up and down between PC computer and hardware, realizes the renewal of hardware programme content.Power module is the battery power management system.
As shown in Figure 2, script audio pack file described in the utility model has needed all resource files of self script (fragment of the voice of multiple sampling rate and compressed format, music, audio and control data file) for it, the corresponding intelligent interaction script of one cover is all arranged in each script data audio pack, playing program just can be finished a series of intelligence order automatically by the script file of carrying out wherein, and controls client software and hardware is finished multiple function.This script audio pack file includes header file, command script, audio-frequency information and audio data section, wherein header file is the essential information of audio pack, can initialization playing process, the broadcast information of definition audio file and the storage address information of each data file by its script interpretive routine.The command script data item that many command script are formed of serving as reasons, every order data is a regular length.The audio-frequency information data item that many audio fragment information are formed of serving as reasons comprises the offset address that each voice data fragment begins to locate, canned datas such as data segment, length, and every order data is a regular length.Audio data section is the audio file fragment data of playing.
The implementation method of network interaction voice toy components described in the utility model may further comprise the steps:
(1), press power key after system begin loading power, microcontroller begins to carry out initialize routine, play the start audio frequency and open LED matrix screen display start welcome pattern, then opening the button receiver module waits for user's input information and judges the order that will carry out, as fill order is that data sync and program updating then forward step 5 to, as fill order for giving the correct time and alarm clock then forwards step 4 to, for recording then forwards step 3 to, is that voice interface program then forward step 2 as fill order as fill order;
(2), enter the voice interface program, described voice interface program includes music program, English learning program, the program of telling a story, voice mail program, interactive game and the knowledge question program voice program of totally 6 types, after the user presses corresponding program button selection program, microcontroller accesses corresponding program bag and plays in storer, this moment, described playing programs may further comprise the steps:
(21), microcontroller accesses corresponding script audio pack in storer, this moment, described script audio pack was to have the independently file of voice, music, audio and order data of multistage, the corresponding intelligent interaction script of one cover is all arranged in each script data audio pack, playing program just can be finished a series of intelligence order automatically by the script file of carrying out wherein, and controls client software and hardware is finished multiple function;
(22), microcontroller reads the script command in the script audio pack, described script command was one group and was used for the information coding of controls playing and user's input and obtains the interactive play method of playing this voice interface program this moment;
(23), microcontroller reads first command, the start-stop position of playing according to the information 3dpa bag in the script command is some audio fragments, and according to the reference position positioning playing pointer in the order, read voice data and in audio decoder, play, after being played to end position, read next command again; If second command is requirement user input, microcontroller will begin to receive the button data of mutual button, after the user key-press input, microcontroller will compare the button numbering of user's input and the data in the order, explanation user correct judgment when user's input is identical with the correct input data of definition in the order, microcontroller will be in storer the correct information of recording user operation, the operation information with the user during for system synchronization records in the internet platform.Then microcontroller reads the 3rd order and reorientates down the start-stop position of section audio and begin and play, and fill order like this finishes up to script;
(3), enter recording, the user opens sound-recording function after pressing key, recording module begins to receive the pickup input, microcontroller is saved in the storer after data are compressed according to certain compression factor, system provides 20 seconds record length, system will stop recording after surpassing the regulation record length, automatic then playback data;
(4), enter and give the correct time and alarm clock, press the key that gives the correct time and enable speech chronopher, the current time data that microcontroller will the read-out system clock, and the diaphone audio data of calling in the storer is play.After the PC end configured alarm clock wake-up time data, microcontroller will be play the voice data broadcast that configures in advance when at the appointed time arriving.The data of system's timed power on/off can be provided with from the PC end, if do not have playback action, system will carry out shutdown automatically at the appointed time;
(5), enter data sync and program updating, after toy passes through USB line and PC line, the PC software systems can search unique hardware numbering (feature number) and the identification equipment of this hardware system automatically, online back PC can search the hardware parameter table in the storer of hardware, and reads this epiphase and answer parameter.Comprised in the hardware parameter table that the program file information of hardware and user's operational circumstances (listened those stories as the user, those were not also listened, or certain story is heard that paragraph by the user, interactive game user's operational circumstances such as integration etc., the information such as timing start-up time that the user sets) synchronizing software of PC reads above-mentioned information, obtain the user after the service data on the hardware, PC software will be deleted the program data packets that the user has finished in hardware memory, and download new program to PC according to up-to-date the rendition list that network service platform provides, then new program data packets is passed through the USB synchronous transmission in hardware memory, if there is recording file can be sent among the PC in the storer, the related data of user's operation will together upload to network service platform afterwards.
(6), in the whole process of user operation, microcontroller can be according to pre-set display routine, control LED matrix lamp shows various figures and animation, with the perception of the operation toy that increases the user.
Execution flow process and the method that the script audio frequency is described wherein shown in Figure 3, the header file information that program at first reads in the audio pack is carried out version to it, audio compression form and sampling rate define and initialization, then load script data table and locator data pointer on article one main audio data item, play the main audio file fragment, play and finish back execution article one main command, main command is play and is putd question to audio frequency and wait for that the user imports answer information, user's answer information input back script interpretive routine recording user input information also compares input information, import the information redirect of answer according to the user and carry out corresponding assist command, assist command is returned the main audio playing process after carrying out, and the script data list index is positioned at down and repeats above process on the bar data item up to end.For example: a script audio pack is arranged, wherein script require hardware play a section audio " 1+1=? " user's input is waited in the back, if 1 key during the user pushes button afterwards is with regard to audio plays " mistake ", if the user presses 2 keys with regard to audio plays " correctly ".System can find command script after calling in the script audio pack automatically in this document, the audio file locating information is found in requirement according to script hereof, determine the actual storage address of this section audio according to the information in the audio-frequency information, the playing pointer of audio decoder is navigated to corresponding stored position in the audio data section, read voice data and be sent to decodes and plays in the audio decoder, play and finish the script command wait user key-press input of back according to command script, 1 key during if the user pushes button, system will locate " mistake " audio frequency according to the method described above and play in script audio pack file, 2 keys in pushing button, system will locate " correctly " audio frequency and play.In addition, user's all operations will be recorded, and system can issue the internet central platform with user's operation information automatically when hardware and PC are synchronous.
The toy that illustrated shown in Figure 4 upgrades and the program downloading flow process automatically by the internet, and program is broadcast management server by automatic regular polling and user's login, and trigger event sends program to client computer.When server will be opened online user's table to poll after the time, access online user's data, check whether it has new program to need to download, if the user does not download new program and just sends the program downloading table to the user, this user handles the back and continues next user up to intact all online users of poll.Will trigger program and broadcast the management server incident behind logging in system by user, broadcasting management server is to check that whether it has new program to need to download, and does not just send the program downloading table to the user if the user downloads new program equally.After client machine system is received new program downloading table, programme information wherein will be joined not in the program downloading table, the local program download mechanism will be opened FTP and connect program in the automatic program downloading table when detecting new program.
Give the correct time, alarm clock function, push button signalling is received the back coding and is sent to microcontroller by key control, microcontroller accesses the corresponding clock voice document of storing in the storer after reading current time of clock module, microcontroller is issued audio decoder with data after according to these audio files of certain sequential combination, and the audio decoder decode audio file is also play.The clock of clock module is to triggering a look-at-me during certain time that configures, and look-at-me will be sent to microcontroller, and microcontroller will read the noisy resonant frequency file in the storer and submit to the audio decoder decode audio file to play.
The interactive program playing function, push button signalling is sent to microcontroller after encoding by key control, microcontroller is called in the respective program file that is stored in the storer according to pre-set program, microcontroller is read program file data post analysis this document header and initialization audio decoder from storer, microcontroller is read the script command in the program file and begun and carries out then.At first read the first section audio data and be sent to the audio decoder decode broadcast, audio decoder sent and plays end signal to microcontroller after voice data was play and finished, then the microcontroller notice is waited for the input of user key-press by key control, microcontroller receives by key control will calculate the memory location of hypomere audio file to be played according to the script command program after from the signal of button, microcontroller will be read the corresponding audio data slot and be sent to the audio decoder decode broadcast from storer afterwards, simultaneously microcontroller with user's button operation information stores in the storer for future use, treat that this section audio is play and finish back microcontroller and notify once more by key control and wait for that user's input makes new judgement and redirect, so analogize until script and finish.The displaying information on screen data that will store in reading storer in the time of the microcontroller Run Script, microcontroller is according to certain display routine control LED matrix display pattern and animation.
Sound-recording function, microcontroller calls recorded program and carries out after receiving by the signal of key control from button, at first notify the recording module initialization module and begin to receive voice signal from MIC, then data will be stored in the storer immediately after the voice signal process recording module encoding compression, and microcontroller will cut out recording module and finish Recording Process after the record length of setting arrives.Microcontroller will read the recorded audio file of storing in the storer and hand over the audio decoder decode broadcast during playback.
The program updating function, when hardware is connected with PC by the communication module USB device, microcontroller will carry out data sync by communication module and PC, if in the synchronizing information of PC, find to have the data updated of needs, microcontroller will be deleted expired program data file in storer, and startup file transmission procedure, by communication module new program data file transfer is stored in storer, the user operation records that last microcontroller will read in the storer is transferred among the PC by communication module.