Intelligent robot, data processing method and storage medium
By introducing stream processing control modules and remote servers to process audio and image data in intelligent robots, the problem that intelligent robots cannot dynamically recognize voice commands is solved, efficient voice and image processing is achieved, and the degree of intelligence and interaction efficiency is improved.
Patent Information
- Application Number
- CN202411054874.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-09-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing intelligent robots cannot dynamically recognize various voice commands, and locally stored voice commands are simple, limited in capacity, and low-efficiency in interaction with underlying hardware.
An intelligent robot was designed, including a stream processing control module, a behavior control module, a language model module, an audio module, an audio recognition module, a camera module and a display module. Through a remote server, a multilingual recognition and problem can be realized. Analyze and display emotional data synchronously on the display module.
It realizes seamless connection between intelligent robot heads and various software applications, provides professional services, supports multiple languages, dialects, long list memory, supports questioning, supports music playback and emotional analysis, and improves intelligence and interaction efficiency.
Smart Images

Figure CN118596168A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robots, and in particular to an intelligent robot. Background Art
[0002] With the advent of artificial intelligence and large language models, computer devices have made a qualitative leap in the dimension of "thinking", opening up unlimited imagination space for the development of artificial intelligence. At the same time, smart products such as smartphones, VR glasses, virtual helmets, and various sensors are constantly improving and enriching, allowing computer devices to compete with the human brain in the dimension of "shape". Based on the "soft and hard" characteristics of computer development, an intelligent control and interaction device similar to the human head can be designed, hereinafter referred to as "device", to achieve the following functions: Simulate human ears: The microphone converts the speaker's voice into digital signals, and the digital signal processor analyzes and processes these signals. Finally, the natural language processing algorithm converts the recognized voice into text or instructions that can be processed by the computer. Simulate human eyes: Use ultrasonic, camera, lidar, GPS and other sensors to collect information about objects, faces, and the environment, and then use computer vision algorithms to process and analyze the images, and finally identify the characteristics and categories of the target. Simulate population: Use speech recognition technology to convert text into speech, or search for corresponding music in the audio and video library and send it to the power amplifier device for playback. Simulate human face: Use dot matrix display screen to show the expressions of joy, anger, sorrow and happiness during conversation; although traditional devices such as mobile phones reduce the initial design cost, the mobile phone is expensive. More importantly, the device selection, packaging rigor and size are not convenient for integration, expansion and continuous improvement with other hardware. Although traditional devices such as mobile phones reduce the initial design cost, the mobile phone is expensive. More importantly, the device selection, packaging rigor and size are not convenient for integration, expansion and continuous improvement with other hardware. When traditional devices such as apps interact with the underlying hardware, first, the processing efficiency is low and the response time is long; second, it is impossible to access all the functional interfaces of the hardware device, making it difficult to achieve the required effect. Other intelligent interactive devices mainly solve specific functional requirements and are not universal. For example, smart speakers generally play songs, and smart monitoring generally monitors the environment, but these cannot be used for the heads of smart robots. Ordinary equipment cannot dynamically recognize various voice commands, and the locally stored voice commands are simple and have limited capacity. The control of robots is not intelligent enough. Therefore, by simulating and imitating human sensory functions, the heads of smart robots can interact with humans more naturally and achieve more intelligent services and manufacturing. Summary of the invention
[0003] The main purpose of the present invention is to provide an intelligent robot, aiming to solve the problems that existing intelligent robots cannot dynamically recognize various voice commands, the locally stored voice commands are simple and have limited capacity, and the interaction processing efficiency with the underlying hardware is slow.
[0004] To achieve the above-mentioned purpose, the intelligent robot proposed in the present invention includes a stream processing control module and a behavior control module, a language large model module, an object recognition module, an audio module, an audio recognition module, a camera module and a display module, all of which are connected to the stream processing control module; the stream processing control module is used to control other modules and perform stream data processing, the audio module is used to sample and play sound, the audio recognition module is used to recognize audio, the camera module is used to capture image data, and the object recognition module is used to identify different objects and organisms in the image data; the language large model module is used to perform multi-language recognition, question analysis and answering; the audio playback module is used to play answers, the display module is used to display answers and facial expression simulation, and the behavior control module is used to control the movement of the motion mechanism.
[0005] Preferably, it includes a shell, a motion mechanism and a server, the shell covers the motion mechanism, the stream processing control module, audio module, audio recognition module, camera module and display module are arranged on the shell, the behavior control module, language large model module and object recognition module are arranged on the server, and the behavior control module is used to control the connection of the motion mechanism.
[0006] Preferably, the audio module comprises a sound sensor, an audio collector and an audio player, the sound sensor is used to detect whether the sound reaches a preset value, the audio collector is used to collect sound, and the audio player is used to play sound.
[0007] Preferably, the method comprises the following steps: When the sound is detected, the audio module samples the sound; The audio recognition module determines whether the audio data collected by the audio module is a preset instruction; If not, the audio module starts audio collection; The stream processing control module sends the collected audio samples to the remote server, and the language model of the remote server processes the audio samples and returns the processing results.
[0008] Preferably, the stream processing control module sends the collected audio samples to the remote server, and the remote server's language model processes the audio samples and returns the processing results, including: The stream processing control module encodes the collected audio samples through base64, converts them into JSON strings, and sends them to the remote server through the http protocol; the stream processing control module encodes the binary data through base64, converts them into JSON strings, and sends them to the remote server through the http protocol; The remote server's language model performs multi-language recognition, question analysis and answering, and stores the questions and answers in a linked list of the current session ID as context for the next round of question processing; Returns a remotely accessible audio address as the processing result.
[0009] Preferably, after the step of the audio recognition module determining whether the audio data collected by the audio module is a preset instruction, the following steps are included: Determining whether the voice is a preset recognition instruction; If so, the camera module is started and the captured image data is sent to the remote server, and the object recognition module processes the image and returns the processing result.
[0010] Preferably, the step of starting the camera module and sending the captured image data to the remote server, and having the object recognition module perform image processing and return the processing result, comprises the following steps: Initialize basic variables, including file name, baud rate setting, camera parameter setting, photo size, and buffer size; The camera module starts capturing the surrounding environment, or faces, or plants for taking photos; Checking whether the quality of the photo meets a preset condition; If yes, the data is written into the buffer, encoded with base64, and the processed screen data is sent to the stream processing control module; The stream processing control module includes a picture buffer to receive the picture data, and after the picture buffer is filled, the data is immediately formatted into a JSON string and sent to a remote server in the form of an http protocol; The remote server returns the processing result.
[0011] Preferably, after the step of the audio recognition module determining whether the audio data collected by the audio module is a preset instruction, the following steps are included: Determining whether the voice is a preset control instruction; If yes, the instruction code corresponding to the control instruction is sent to the remote server, which is processed by the behavior control module and returns the processing result.
[0012] Preferably, the processing result includes audio data and emotional data, the audio data is played through the audio module, and the emotional data is displayed through the display module.
[0013] A data processing method storage medium for an intelligent robot includes computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in any of the above methods.
[0014] In the technical solution of the present invention, the intelligent robot head can be seamlessly connected with various software applications to realize more intelligent functions and services. For example, it can call the business application system and intelligent model interface functions to provide professional services; it can be linked with smart home devices to realize intelligent home control; it can be combined with virtual reality technology to realize a more immersive gaming experience, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0016] Figure 1 It is a structural schematic diagram of the intelligent robot of the present invention.
[0017] Figure 2 Schematic diagram of the circuit of the intelligent robot of the present invention.
[0018] Figure 3 It is a schematic diagram of the process of the intelligent robot of the present invention.
[0019] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0022] In addition, in the present invention, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0023] In the present invention, unless otherwise clearly specified and limited, the terms "connection", "fixation", etc. should be understood in a broad sense. For example, "fixation" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0024] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0025] Please refer to Figure 1-Figure 3 The present invention proposes an intelligent robot, including a stream processing control module and a behavior control module, a language large model module, an object recognition module, an audio module, an audio recognition module, a camera module and a display module, all of which are connected to the stream processing control module; the stream processing control module is used to control other modules and perform stream data processing, the audio module is used to sample and play sound, the audio recognition module is used to recognize audio, the camera module is used to shoot image data, and the object recognition module is used to recognize different objects and organisms in the image data; the language large model module is used to perform multi-language recognition, question analysis and answering; the audio playback module is used to play answers, the display module is used to display answers and facial expression simulation, and the behavior control module is used to control the movement of the motion mechanism.
[0026] In the technical solution of the present invention, the audio module is used to record and play, and the audio recognition module distinguishes the audio data. When it is a partial preset keyword, it is directly processed. For non-preset keywords, it can be transmitted to the language large model module through the stream processing control module, thereby solving the problem that the existing intelligent robot cannot dynamically recognize various voice commands, and the locally stored voice commands are simple and have limited capacity. For the processing of preset keywords, direct interaction is carried out through the stream processing control module, and the interactive processing efficiency is high.
[0027] Specifically, the core part of the device is mainly composed of ESP32-WROVER development board and ESP32-CAM camera, MAX9814 audio collector, MAX98357 audio player, MAX6650 sound sensor and SU-03T voice recognition chip, and MAX7219 dot matrix screen.
[0028] In another embodiment of the present invention, it includes a shell, a motion mechanism and a server, the shell covers the motion mechanism, the stream processing control module, audio module, audio recognition module, camera module and display module are arranged on the shell, the behavior control module, language large model module and object recognition module are arranged on the server, and the behavior control module is used to control the connection of the motion mechanism.
[0029] Specifically, robot behavior control: the robot can be controlled to walk, stop, turn left, turn right, waving, dancing, singing and many other actions. The motion mechanism realizes the robot's walking, stopping, turning left, turning right, waving, dancing, singing and many other actions.
[0030] In another embodiment of the present invention, the audio module includes a sound sensor, an audio collector and an audio player, the sound sensor is used to detect whether the sound reaches a preset value, the audio collector is used to collect sound, and the audio player is used to play sound.
[0031] Specifically, in real-time monitoring, the knob of the sound sensor can be dynamically adjusted to set it to an appropriate threshold. Only when the intensity of the monitored ambient sound exceeds this value will a signal be sent to the audio collector for sound sampling. This is to avoid the influence of factors such as too high acquisition frequency or environmental noise.
[0032] A data processing method for an intelligent robot comprises the following steps: S100, when sound is detected, the audio module performs sound sampling; S200, the audio recognition module determines whether the audio data collected by the audio module is a preset instruction; If not, executing step S300, the audio module starts audio collection; S400, the stream processing control module sends the collected audio samples to the remote server, and the language model of the remote server processes the audio samples and returns the processing results.
[0033] Specifically, when there is external voice, the device will start working, which will be divided into three processes: Dialogue process: If it is not a preset command, audio collection starts, the collected sound samples are sent to the remote server, and the language model processes the audio and returns the processing results; Recognition process: If the voice is a preset simple command, such as "take a photo", "hello", "goodbye", etc., the recognition process will be carried out, the camera will be started, the captured image will be sent to the remote server, and the object recognition module will process the image and return the processing result; Control process: If the voice is a preset simple command, such as "forward", "backward", "stop", etc., the control process will be followed, and the corresponding command code will be sent to the remote server, which will be processed by the behavior control module and return the processing result; In another embodiment of the present invention, the step of S400 includes: S410, the stream processing control module encodes the collected audio samples through base64, converts them into a JSON string, and sends them to the remote server through the http protocol; encodes the binary data through base64, converts them into a JSON string, and sends them to the remote server through the http protocol; S420: The remote server's language model performs multilingual recognition, question analysis and answering, and stores the question and answer in a linked list of the current session ID as context for the next round of question processing; S430: Return an audio address that can be accessed remotely as a processing result.
[0034] Specifically, it implements the initial setup, sound sampling, data upload, waiting for server processing results, playing reply audio, and displaying emoticons. The main features include: Support multiple languages and dialects; Long list memory, support for follow-up questions; The wake-up word can be set dynamically and can be canceled or retained; Support conversation interruption; Support music playback; Support sentiment analysis and expression synchronization; The initial setting of the MCU program includes the timer interrupt setting, which binds the interrupt function; defines the 32-pin connection to the sound sensor; connects the 34-pin connection to the audio collector; defines the recorded data buffer, converts the JSON string variable; determines whether the wake-up word is retained; defines the maximum silent time, the time setting for receiving the response timeout, etc. The program is as follows: #defineMAX_QUIET_TIME1000 #defineADC32 #defineADC234 uint16_t*adc_data; charwake_word; char*data_json; adc_data=(uint16_t*)ps_malloc(data_len*sizeof(uint16_t)); data_json=(char*)ps_malloc(json_len*sizeof(char)); In real-time monitoring, the knob of the sound sensor can be adjusted dynamically to set it to an appropriate threshold. Only when the intensity of the monitored ambient sound exceeds this value will a signal be sent to the audio collector for sound sampling. This is to avoid the influence of factors such as too high acquisition frequency or environmental noise.
[0035] When the audio collector starts sampling sound, the indicator light will be on, sampling 8000 points per second. The timer reads data from pins 32 and 34 to fill the buffer. There are three conditions to terminate the reception: When the sound is silent for more than 1 second.
[0036] When the buffer data exceeds the specified maximum length; When receiving the "stop" command; The sampling timer function code is as follows: void IRAM_ATTRonTimer(){ adc_data[num++]=analogRead(ADC); flag_data[count_num++]=digitalRead(ADC2); if(num>8000&&flag_data[count_num-2]==0&&flag_data[count_num-1]==0){ adc_complete_flag=1; } if(num>=data_len||stop_num>=8000*1.5){ adc_complete_flag=1; } if(TTS_Serial.available()&&adc_complete_flag){ isOn=TTS_Serial.read(); if(isOn==7){ adc_complete_flag=1; } } } After the audio collection is completed, the binary data is encoded through base64 and converted into a JSON string, which is sent to the language model of the remote server through the http protocol for multi-language recognition, question analysis, and answering. At the same time, the questions and answers are stored in the linked list of the current session id as the context content for the next round of question processing to achieve the follow-up question function. After the processing is completed, an audio address that can be accessed remotely will be returned. The audio can be voice or song, etc. Start playing using the audio player. As long as the audio does not receive an interrupt signal, it will continue to play until the end. The code is as follows: AudioOutputI2S*out; void playAudio(char*URL){ timerStart(timer); while(adc_complete_flag){ file=newAudioFileSourceICYStream(URL); buff=newAudioFileSourceBuffer(file,4096); / / Doubledformdefault2048 mp3 = new AudioGeneratorMP3(); mp3->begin(buff,out); delay(500); while(mp3->isRunning()){ if(!mp3->loop()){ mp3->stop(); } if(adc_complete_flag==0){ break; } } } timerStop(timer);} When the server returns the audio, it will also give the emotional color of the answer. In addition to praise and criticism, it will also give specific types such as horror, joy, pain, sadness, etc. When the local device plays the audio, it will also display emoticons on the display screen. The display module is an 8x8 dot matrix screen. In addition to displaying a smiley face, which indicates a smiling and listening expression, it will also display the effect of the mouth opening and closing; when there is no audio processing in the middle, a blinking effect will be displayed. The blinking effect code is as follows: voidDisplay_4col(bytecharacter[][4],intdevice_num,intcol,intpoint){ for(int i = 0; i < 4; i ++) { DC.setColumn(device_num,point+i,character[col][i]); } } byteeye_display[][4]={ {0x3C,0x42,0x42,0x3C}, {0x3C,0x7E,0x7E,0x3C}, {0x10,0x10,0x10,0x10}, }; for(int i = 0; i < 2; i ++) { Display_4col(eye_display,2,0,2); Display_4col(eye_display,1,0,2); delay(1350); Display_4col(eye_display,2,2,2); Display_4col(eye_display,1,2,2); delay(150); } In another embodiment of the present invention, after the step S200, the following steps are included: S310, determining whether the voice is a preset recognition instruction; If so, step S320 is executed to start the camera module and send the captured image data to the remote server, and the object recognition module performs image processing and returns the processing result.
[0037] In yet another embodiment of the present invention, the step S320 includes the following steps: S321. Initialize basic variables, where the basic variables include file name, baud rate setting, camera parameter setting, photo size, and buffer size; S322. The camera module starts capturing the surrounding environment, or a human face, or a plant for taking pictures; S323. Check whether the photo quality meets the preset conditions; If so, execute step S324. Write the data into the buffer, encode it with base64, and send the processed frame data to the stream processing control module; S325. The stream processing control module includes a picture buffer to receive the frame data. After the picture buffer is filled, immediately format the data into a JSON string and send it to the remote server in the form of an http protocol; S326. The remote server returns the processing result.
[0038] Specifically, this process uses the camera of the device, combines voice commands with the remote server, and through optimizing the data upload and download algorithms, achieves second-level recognition in terms of speed. The specific functions are as follows: Face recognition Environment recognition Pose recognition Common plant and animal recognition First, offline set the voice commands for the voice chip, including wake-up words, reply words, sound source type, volume, timbre, speech rate, pin configuration, etc., and burn them through the keil5 tool. The burned part of the code is as follows: { "signal":"{'number':'1','field':'far','denoise':'0','ace':''}", "wakeup":"{'wakeupSensitive':'high','wakeupWord':[{'word':'你好盛鼎','tips':'','piny':'ni3hao3sheng4ding3','score':'','evaluate':''}],'wakeReply':['我在','你说','有什么可以帮到你']}", "custom_voice":{'voiceType':'speaker','speaker':{'id':3,'name':tang, 'i_type':'lively girl'},'volume':50,'speed':50,'brightness':50}", "pin_config":"[{\"pin\":\"3\",\"function\":\"GPIO_A25\"] } When receiving a voice command, the recognition chip first recognizes the command locally, and then outputs the command code to the TTS_Serial2 serial port of the video module through the TTS_Serial serial port. The code is as follows: if(TTS_Serial.available()&&all_complete==1){ isOn=TTS_Serial.read(); } if(isOn==3){ while(TTS_Serial2.read()>0){} TTS_Serial2.print('3'); } After the video module receives the instruction code, the program starts to work. First, it will initialize some variables, including file name, baud rate setting, camera parameter setting, photo size, buffer size, etc.
[0039] #defineFILE_PHOTO" / photo.jpeg" Serial.begin(115200); camera_config_tconfig; config.frame_size=FRAMESIZE_UXGA; config.jpeg_quality=4; config.fb_count=2; Then, the camera starts to capture the surrounding environment, or faces, or plants to take pictures. Check the photo quality. If it meets the requirements, write the data into the buffer and encode it with base64. Write the "okk" end mark at the end of the data, and finally send the processed data to the serial port. The key code of the function is as follows: voidcapturePhotoSaveSpiffs(void){ camera_fb_t*fb=NULL; do{ fb = esp_camera_fb_get(); Filefile=SPIFFS.open(FILE_PHOTO,FILE_WRITE); file.write(fb->buf,fb->len); size=file.size(); if(size>100000){ uint8_t*fbBuf=fb->buf; size_tfbLen=fb->len; char*a=base64_encode(fbBuf,fbLen); Serial.print(a); Serial.print("okk"); delay(100); } file.close(); esp_camera_fb_return(fb); ok=checkPhoto(SPIFFS); }while(!ok||size<100000); } At the same time, the stream processing chip is always in the receiving state. When there is available data to receive, the data is filled into the image buffer "photo_data" and is encoded in accordance with base64, with "=" filled as an integer multiple of "4". In order to improve the data processing efficiency of the server, when the buffer is filled, the data is immediately formatted into a JSON string and sent to the object recognition module of the remote server in the form of http protocol. Multiple data segments are spliced with sequence numbers, and "okk" is used as the end mark of the current session. The key code for image processing is as follows: while(1){ if(TTS_Serial2.available()){ photo_char=TTS_Serial2.read(); if(photo_flag){ photo_data[photo_num++]=photo_char; } } if(photo_num>100000&&photo_data[photo_num-3]=='o'&&photo_data[photo_num-2]=='k'&&photo_data[photo_num-1]=='k'){ photo_data[photo_num-3]='\0'; photo_data[photo_num-2]='\0'; photo_data[photo_num-1]='\0'; while(TTS_Serial2.read()>0){ } break; } } After processing is completed, an audio address that can be accessed remotely will be returned. In another embodiment of the present invention, after the step S200, the following steps are included: S330, determining whether the voice is a preset control instruction; If so, step S340 is executed to send the instruction code corresponding to the control instruction to the remote server, which is processed by the behavior control module and returns the processing result.
[0040] Specifically, this process sends control instructions to the behavior control module of the remote server in real time through the local offline speech recognition module, which can achieve the effect of instantaneous dynamic control. According to the functional configuration of the remote server, it can be expanded to the following special functions: Robot behavior control: The robot can be controlled to walk, stop, turn left, turn right, wave, dance, sing and many other actions.
[0041] IoT sensor control: can control the switching of lights, the closing of gate valves, adjust temperature and humidity, etc.
[0042] Large screen control: You can open specified applications, play PPT, play videos, etc. on the big screen.
[0043] Expression control: The device can display various expressions of joy, anger, sadness, and happiness.
[0044] Animal simulation: can simulate the sounds of various animals.
[0045] In another embodiment of the present invention, the processing result includes audio data and emotion data, the audio data is played through the audio module, and the emotion data is displayed through the display module.
[0046] Specifically, when the server returns the audio, it also gives the emotional data of the answer. In addition to praise and criticism, it also gives specific types such as horror, joy, pain, sadness, etc. When the local device plays the audio, it will synchronously display emoticons on the display screen. The display module is an 8x8 dot matrix screen. In addition to displaying a smiley face, which indicates a smiling and listening expression, it will also display the effect of the mouth opening and closing; when there is no audio processing in the middle, a blinking effect will be displayed. The blinking effect code is as follows: voidDisplay_4col(bytecharacter[][4],intdevice_num,intcol,intpoint){ for(int i = 0; i < 4; i ++) { DC.setColumn(device_num,point+i,character[col][i]); } } byteeye_display[][4]={ {0x3C,0x42,0x42,0x3C}, {0x3C,0x7E,0x7E,0x3C}, {0x10,0x10,0x10,0x10}, }; for(int i = 0; i < 2; i ++) { Display_4col(eye_display,2,0,2); Display_4col(eye_display,1,0,2); delay(1350); Display_4col(eye_display,2,2,2); Display_4col(eye_display,1,2,2); delay(150); } In another embodiment of the present invention: 1. Chip and equipment selection.
[0047] The core part of the device is mainly composed of ESP32-WROVER development board and ESP32-CAM camera, MAX9814 audio collector, MAX98357 audio player, MAX6650 sound sensor and SU-03T voice recognition chip, and MAX7219 dot matrix screen.
[0048] 2. Initial settings of the program.
[0049] Including the settings of serial port, wifi, timer, and audio player. The following are the detailed settings and codes.
[0050] Serial port settings: including SU-03T and ESP32-CAM serial ports, set their baud rate, data bit, parity check, stop bit, receiving pin number, sending pin number, flip logic level low or high, and automatic baud rate detection timeout respectively; Audio player settings: Use the third-party library ESP8266Audio to set the volume, the pins connected to the MAX98357, GPIO27 (serial clock SCK) -> SCLK, GPIO33 (word select WS) -> LRC, GPIO32 (serial data SD) -> DIN; Timer settings: The start settings include selecting the built-in 64-bit general-purpose timer, the frequency division coefficient, and whether to count up; the interrupt settings include the target timer, the bound interrupt function, and whether to count edge values; the alarm settings include the target timer, the alarm protection value, and whether to enable automatic reload; Wi-Fi connection settings: Wi-Fi connection status, identification name, password, connection success prompt voice, connection failure prompt voice; currently the prompt voice is obtained from the remote server, and can also be obtained directly from the local NVS storage.
[0051] 3. Implement the speech recognition module The main program is written to set voice commands for the SU-03T chip, monitor the voice, and after localized recognition, the camera collects photos of the surrounding environment or faces, sends them to the remote server for processing, and then feeds back the recognition results.
[0052] 4. Implement the audio acquisition module Write the main program, define the pins of the sound sensor and audio collector, define variables such as the recorded data buffer size and maximum silence time, and enable the loop recording function.
[0053] 5. Implement the video acquisition module The main program is written to recognize the photo-taking command, start the camera module to take photos, fill the data into the stream processing chip and send it to the remote server for processing.
[0054] 6. Implement the display module The main program is written to display the expressions during the conversation on the dot matrix screen synchronously.
[0055] 7. Equipment testing Consider the following scenarios of continuous conversation and greeting: 1) Say hello to acquaintances.
[0056] Zhang San said to the voice device: "Hello, Shengding"; After SU-03T recognizes the voice command, ESP32-CAM takes a photo of the face and uploads it to the remote server S1. After S1 recognizes the photo as Zhang San, it responds with the processed audio. Because the SU-03T voice command takes priority, the audio data recorded by MAX9814 has a lower priority. The ESP32-WROVER main program only processes the photo data, not the recorded audio. The MAX98357 plays the reply audio, "Hello, Zhang San." At the same time, the MAX7219 displays the mouth movement effect.
[0057] 2) Talk to strangers.
[0058] Li Si said to the voice device: "Hello, Shengding"; After SU-03T recognizes the voice command, ESP32-CAM takes a photo of the face and uploads it to S1. S1 fails to recognize Li Si's face in the photo library and returns the processed audio. Also, because the SU-03T voice command takes priority, the audio data recorded by MAX9814 has a lower priority. The ESP32-WROVER main program only processes the photo data, not the recorded audio. MAX98357 plays the reply audio, "Hello, what is your name?" Li Si replied: "I am Li Si"; If SU-03T cannot recognize the voice command, MAX9814 starts recording audio and sends the processed audio data to S1; S1 binds the photo to the person's name and returns the processed audio; The MAX98357 plays the audio: "Hello, John, nice to meet you." At the same time, the MAX7219 displays the mouth movement effect.
[0059] Continuous dialogue Wang Wu said to the device: "Please introduce Shengding Technology Company"; If SU-03T cannot recognize the voice command, MAX9814 starts recording audio and sends the processed audio data to S1; S1 performs processing and returns the processed audio; MAX98357 plays the reply audio: "Shengding Technology is located in Changsha City, Hunan Province..."; at the same time, MAX7219 displays the mouth movement effect.
[0060] When Wang Wu says "stop", the device can interrupt the playback; Wang Wu can ask follow-up questions on the previous questions, or ask him to sing a song, etc. 8. Equipment packaging A data processing method storage medium for an intelligent robot includes computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in any of the above methods.
[0061] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. All equivalent structural changes made using the contents of the present invention's specification and drawings, or directly / indirectly applied in other related technical fields, are included in the patent protection scope of the present invention.
Claims
1. An intelligent robot, It is characterized in that It includes a stream processing control module and a behavior control module, a language large model module, an object recognition module, an audio module, an audio recognition module, a camera module and a display module, all of which are connected to the stream processing control module; the stream processing control module is used to control other modules and perform stream data processing, the audio module is used to sample and play sound, the audio recognition module is used to recognize audio, the camera module is used to shoot image data, and the object recognition module is used to recognize different objects and organisms in the image data; the language large model module is used to perform multi-language recognition, question analysis and answering; the audio playback module is used to play answers, the display module is used to display answers and facial expression simulation, and the behavior control module is used to control the movement of the motion mechanism.
2. The intelligent robot according to claim 1, It is characterized in that It includes a shell, a motion mechanism and a server, the shell covers the motion mechanism, the stream processing control module, audio module, audio recognition module, camera module and display module are arranged on the shell, the behavior control module, language large model module and object recognition module are arranged on the server, and the behavior control module is used to control the connection of the motion mechanism.
3. The intelligent robot according to claim 1, It is characterized in that The audio module includes a sound sensor, an audio collector and an audio player. The sound sensor is used to detect whether the sound reaches a preset value, the audio collector is used to collect the sound, and the audio player is used to play the sound.
4. A data processing method for an intelligent robot, It is characterized in that The steps include: When the sound is detected, the audio module samples the sound; The audio recognition module determines whether the audio data collected by the audio module is a preset instruction; If not, the audio module starts audio collection; The stream processing control module sends the collected audio samples to the remote server, and the language model of the remote server processes the audio samples and returns the processing results.
5. The data processing method of the intelligent robot according to claim 4, It is characterized in that The stream processing control module sends the collected audio samples to the remote server, and the language model of the remote server processes the audio samples and returns the processing results, including: The stream processing control module encodes the collected audio samples through base64, converts them into JSON strings, and sends them to the remote server through the http protocol; the stream processing control module encodes the binary data through base64, converts them into JSON strings, and sends them to the remote server through the http protocol; The remote server's language model performs multi-language recognition, question analysis and answering, and stores the questions and answers in a linked list of the current session ID as context for the next round of question processing; Returns a remotely accessible audio address as the processing result.
6. A data processing method for an intelligent robot as claimed in claim 4, It is characterized in that After the step of the audio recognition module determining whether the audio data collected by the audio module is a preset instruction, the following steps are included: Determining whether the voice is a preset recognition instruction; If so, the camera module is started and the captured image data is sent to the remote server, and the object recognition module processes the image and returns the processing result.
7. A data processing method for an intelligent robot as claimed in claim 6, It is characterized in that The step of starting the camera module and sending the captured image data to the remote server, and having the object recognition module perform image processing and return the processing result, includes the following steps: Initialize basic variables, including file name, baud rate setting, camera parameter setting, photo size, and buffer size; The camera module starts capturing the surrounding environment, or faces, or plants for taking photos; Checking whether the quality of the photo meets a preset condition; If yes, the data is written into the buffer, encoded with base64, and the processed screen data is sent to the stream processing control module; The stream processing control module includes a picture buffer to receive the picture data, and after the picture buffer is filled, the data is immediately formatted into a JSON string and sent to a remote server in the form of an http protocol; The remote server returns the processing result.
8. A data processing method for an intelligent robot as claimed in claim 4, It is characterized in that After the step of the audio recognition module determining whether the audio data collected by the audio module is a preset instruction, the following steps are included: Determining whether the voice is a preset control instruction; If yes, the instruction code corresponding to the control instruction is sent to the remote server, which is processed by the behavior control module and returns the processing result.
9. The data processing method of the intelligent robot according to any one of claims 4 to 8, It is characterized in that The processing result includes audio data and emotional data, the audio data is played through the audio module, and the emotional data is displayed through the display module.
10. A data processing method and storage medium for an intelligent robot, It is characterized in that The method comprises computer instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the method according to any one of claims 4 to 9.
Citation Information
Patent Citations
Cloud end interaction system and multi-sensing type intelligent robot and sensing interaction method thereof
CN107511832A
Control system and method of artificial intelligence drive robot
CN108297098A
Method for interrupting dialogue of intelligent voice robot based on VAD algorithm
CN109509471A
Interactive intelligent voice home control device and control method based on open source hardware
CN110265012A
Service robot interaction method and system based on multiple modes and storage medium
CN113299287A
