Intelligent man-machine interaction method, system and device and medium
Through real-time video stream preprocessing and AI visual model analysis, combined with WebRTC and WebSocket, intelligent human-computer interaction is realized, solving the problems of low efficiency and insufficient scalability of traditional interaction methods, and improving user experience and system intelligence.
Patent Information
- Application Number
- CN202410754396.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-08-23
AI Technical Summary
Traditional human-computer interaction methods are inefficient, unintuitive to operate, weak in experience, and have insufficient scalability, making it difficult to meet the interaction needs of modern smart devices.
By acquiring the real-time video stream for preprocessing and frame extraction, the data is transmitted to the backend server, and the AI visual model is used for analysis. It combines WebRTC and WebSocket to realize intelligent interaction of the real-time video stream, including human movement and face recognition, to achieve action interaction.
It improves user experience and interaction effects, achieves low latency, high real-time and intelligent interaction, has strong scalability, and is suitable for smart homes, medical imaging and other fields.
Smart Images

Figure CN118535019A
Abstract
Description
Technical Field
[0001] This document relates to the field of human-computer interaction technology, and in particular to an intelligent human-computer interaction method, system, device and medium. Background Art
[0002] With the rapid development of the Internet and the popularization of smart devices, human-computer interaction technology has gradually become an indispensable part of people's daily lives. Traditional human-computer interaction methods mainly rely on input devices such as keyboards, mice and touch screens, but this method has many limitations, such as the interaction method is not smart enough, the efficiency is not agile enough, the operation is not intuitive enough, the experience is not strong enough and the scalability is not high. Summary of the invention
[0003] One or more embodiments of this specification provide a smart human-computer interaction method, including:
[0004] Acquire a real-time video stream, pre-process the real-time video stream, extract multiple frames of data and transmit them to a backend server;
[0005] Based on the extracted multiple frames of data, each frame of the picture data is parsed through an AI visual model to obtain a parsing result, wherein the parsing result includes human body movements;
[0006] The parsing results are packaged and transmitted to the front-end server, and the front-end server implements action interaction based on the parsing results returned by the back-end server.
[0007] Furthermore, the specific method of obtaining the real-time video stream, pre-processing the real-time video stream, extracting multiple frames of data and transmitting them to the background server is as follows:
[0008] The front-end server obtains the real-time video stream of the external streaming device through the WebRTC interface;
[0009] Preprocess the acquired video stream, including segmentation, compression and transcoding;
[0010] Extract frames of the pre-processed video stream multiple times according to a preset interval, and compress the extracted frame data;
[0011] The compressed image data is transmitted to the background server through websocket, and the websocket downstream return result is monitored.
[0012] Furthermore, after preprocessing the acquired video stream, the processed video stream data is displayed in real time on a visualization large-screen device through canvas.
[0013] Furthermore, the interval time is set to 1000 milliseconds.
[0014] Furthermore, based on the extracted multiple frames of data, each frame of the picture data is parsed through an AI visual model to obtain a parsing result, wherein the parsing result includes a human body movement. The specific method is:
[0015] Input multiple frames of data into the AI vision model, and use the target detection algorithm to detect the human body in the data frame and locate the human body in the picture;
[0016] The human body posture estimation algorithm is used to estimate the key point positions of the human body, and action recognition and face recognition are performed based on the human body posture data in continuous frames.
[0017] Furthermore, the analysis result is packaged and transmitted to the front-end server, and the front-end server implements the action interaction according to the analysis result returned by the back-end server. The specific method is:
[0018] After the parsing is successful, the backend server will encapsulate the parsing result in JSON format, including the status code, message msg and actual data data;
[0019] The encapsulated parsing results are transmitted to the front-end server in real time through WebSocket. The front-end WebSocket server checks the status code and message to determine whether the request is successful. If successful, it parses the data part to obtain the specific parsing results.
[0020] The front-end server implements action interaction based on the analysis results.
[0021] Furthermore, when the analysis of each frame of picture data through the AI visual model fails, the real-time video stream is continued to be pre-processed and multiple frames of data are extracted for analysis.
[0022] One or more embodiments of this specification provide a smart human-computer interaction system, including:
[0023] Data acquisition module: used to acquire real-time video stream, extract multiple frames of data after pre-processing the real-time video stream and transmit them to the backend server;
[0024] Data parsing module: used to parse each frame of the extracted multi-frame data through an AI visual model to obtain parsing results, which include human body movements;
[0025] Interaction module: used to encapsulate the analysis results and transmit them to the front-end server. The front-end server implements action interaction based on the analysis results returned by the back-end server.
[0026] One or more embodiments of the present specification provide an electronic device, including:
[0027] processor; and,
[0028] A memory arranged to store computer executable instructions, which, when executed, enable the processor to implement the steps of the intelligent human-computer interaction method as described above.
[0029] One or more embodiments of the present specification provide a storage medium for storing computer-executable instructions, which, when executed, implement the steps of the intelligent human-computer interaction method described above.
[0030] By adopting the embodiments of the present invention, real-time video stream acquisition, processing and interaction can be achieved, with low latency and high real-time performance, thereby improving user experience and interaction effects; the video stream data is parsed and processed by the AI visual model, thereby realizing intelligent interaction functions, and intelligent business instruction interactions can be made according to the parsing results, thereby improving the intelligence level of the system; video frame data is transmitted to the background service in real time through WebSocket, and combined with the processing of the AI visual model, efficient data interaction and processing are achieved, thereby improving the efficiency and performance of the system; video stream acquisition is achieved based on the WebRTC interface, and it can be integrated with different streaming media devices and systems, has strong scalability, and is suitable for different scenarios and application requirements; it has strong commercial application potential, and can be widely used in smart homes, medical imaging, interactive games and other fields, meeting the real-time video interaction needs in different fields.
[0031] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate one or more embodiments of this specification 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 recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0033] Figure 1 A flowchart of an intelligent human-computer interaction method provided for one or more embodiments of this specification;
[0034] Figure 2 An execution block diagram of an intelligent human-computer interaction method provided for one or more embodiments of this specification;
[0035] Figure 3A flowchart of an execution of an intelligent human-computer interaction method provided for one or more embodiments of this specification;
[0036] Figure 4 A schematic diagram of the composition of an intelligent human-computer interaction system provided for one or more embodiments of this specification;
[0037] Figure 5 A schematic diagram of the structure of an electronic device provided for one or more embodiments of this specification. DETAILED DESCRIPTION
[0038] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0039] Method Embodiment
[0040] According to an embodiment of the present invention, a smart human-computer interaction method is provided. Figure 1 A flowchart of an intelligent human-computer interaction method provided in one or more embodiments of this specification, such as Figure 1 As shown, the intelligent human-computer interaction method according to an embodiment of the present invention specifically includes:
[0041] S1 obtains real-time video stream, extracts multiple frames of data and transmits them to the backend server after preprocessing the real-time video stream;
[0042] S2. Based on the extracted multi-frame data, each frame of the picture data is parsed by the AI visual model to obtain the parsing result, which includes human body movements;
[0043] S3. The parsing results are packaged and transmitted to the front-end server, and the front-end server implements action interaction according to the parsing results returned by the back-end server.
[0044] Figure 2 This is a block diagram of an execution method of a smart human-computer interaction provided in one or more embodiments of this specification. Figure 3 A flowchart of an intelligent human-computer interaction method provided in one or more embodiments of this specification, such as Figure 2 , 3 As shown, the specific execution process of the intelligent human-computer interaction method is as follows:
[0045] The front-end server obtains the real-time video stream of the external streaming media device through the WebRTC interface. In this embodiment, the external streaming media device includes a USB camera, and the obtained real-time video stream is preprocessed, and the preprocessing includes slicing, compressing and transcoding the real-time video stream. After the obtained video stream is preprocessed, the processed video stream data is displayed in real time on a visual large-screen device through canvas. The preprocessed video stream is framed multiple times according to the preset interval time, and the extracted picture data is compressed. In this embodiment, the frame extraction interval time is set to 1000 milliseconds. The compressed picture data is transmitted to the background server through websocket, and the websocket downstream return result is monitored.
[0046] The extracted multi-frame data is transmitted to the AI vision model of the backend server, and the target detection algorithm is used to detect the human body in the data frame, locate the position of the human body in the picture and the face data, and obtain the analysis results of the AI vision model. Specifically:
[0047] The multi-frame data is preprocessed as necessary, such as denoising, scaling, and normalization, so as to be input into the AI visual model. If necessary, the video frame can be converted into a grayscale image or a color space conversion, such as from RGB to HSV. Use target detection algorithms, such as YOLO, SSD, and Faster R-CNN, to detect the human body in the frame and locate the position of the human body in the frame. After the human body is detected, use human posture estimation algorithms, such as OpenPose, DeepPose, and HRNet, to estimate the key points of the human body. The key points can be the positions of joints, and the key points can represent the various parts of the human body, such as the head, hands, and feet, and their relative positions. Based on the human posture data in continuous frames, action recognition can be achieved by using recurrent neural networks (RNNs), long short-term memory networks (LSTMs), 3D convolutional neural networks (3DCNNs), or graph neural networks (GNNs), etc., to learn the change pattern of human posture over time, so as to identify specific actions; use specialized face detection algorithms, such as MTCNN and Dlib's face detector, to perform face recognition on video frames. The analysis results can be post-processed, such as removing noise, smoothing, filling missing data, etc. Optimization algorithms, such as genetic algorithms and particle swarm optimization, can also be used to optimize the implementation method of the action to meet specific standards or requirements.
[0048] After successful parsing, the background server will encapsulate the parsing result in JSON format, including the status code code, message msg and actual data data; the encapsulated parsing result will be transmitted to the front-end server in real time via WebSocket. The front-end WebSocket server will check the status code and message to determine whether the request is successful. If successful, it will parse the data part to obtain the specific parsing result; when the AI visual model fails to parse each frame of the picture data and no human movements or faces are parsed, continue to obtain and parse the multi-frame data extracted from the pre-processed real-time video stream.
[0049] The analysis results are transmitted to the front-end server in real time, and the front-end server implements action interaction based on the returned analysis results.
[0050] The beneficial effects of the present invention are as follows:
[0051] By adopting the embodiments of the present invention, real-time video stream acquisition, processing and interaction can be achieved, with low latency and high real-time performance, thereby improving user experience and interaction effects; the video stream data is parsed and processed by the AI visual model, thereby realizing intelligent interaction functions, and intelligent business instruction interactions can be made according to the parsing results, thereby improving the intelligence level of the system; video frame data is transmitted to the background service in real time through WebSocket, and combined with the processing of the AI visual model, efficient data interaction and processing are achieved, thereby improving the efficiency and performance of the system; video stream acquisition is achieved based on the WebRTC interface, and it can be integrated with different streaming media devices and systems, has strong scalability, and is suitable for different scenarios and application requirements; it has strong commercial application potential, and can be widely used in smart homes, medical imaging, interactive games and other fields, meeting the real-time video interaction needs in different fields.
[0052] System Example
[0053] According to an embodiment of the present invention, a smart human-computer interaction system is provided. Figure 4 A schematic diagram of a smart human-computer interaction system provided in one or more embodiments of this specification is shown in FIG. Figure 4 As shown, the intelligent human-computer interaction system according to an embodiment of the present invention specifically includes:
[0054] Data acquisition module 40: used to acquire real-time video stream, extract multiple frames of data after pre-processing the real-time video stream and transmit them to the backend server;
[0055] Data parsing module 42: used to parse each frame of picture data through an AI visual model based on the extracted multiple frames of data to obtain parsing results, wherein the parsing results include human body movements;
[0056] Interaction module 44: used to encapsulate the analysis results and transmit them to the front-end server, and the front-end server implements action interaction according to the analysis results returned by the back-end server.
[0057] The embodiment of the present invention is a system embodiment corresponding to the above-mentioned method embodiment. The specific operations of each module can be understood by referring to the description of the method embodiment, which will not be repeated here.
[0058] Device Example 1
[0059] An embodiment of the present invention provides an electronic device, such as Figure 5 As shown, it includes: a memory 50, a processor 52, and a computer program stored in the memory 50 and executable on the processor 52. When the computer program is executed by the processor 52, the following method steps are implemented:
[0060] S1 obtains real-time video stream, extracts multiple frames of data and transmits them to the backend server after preprocessing the real-time video stream;
[0061] S2. Based on the extracted multi-frame data, each frame of the picture data is parsed by the AI visual model to obtain the parsing result, which includes human body movements;
[0062] S3. The parsing results are packaged and transmitted to the front-end server, and the front-end server implements action interaction according to the parsing results returned by the back-end server.
[0063] Device Example 2
[0064] An embodiment of the present invention provides a computer-readable storage medium, on which a program for implementing information transmission is stored. When the program is executed by the processor 52, the following method steps are implemented:
[0065] S1 obtains real-time video stream, extracts multiple frames of data and transmits them to the backend server after preprocessing the real-time video stream;
[0066] S2. Based on the extracted multi-frame data, each frame of the picture data is parsed by the AI visual model to obtain the parsing result, which includes human body movements;
[0067] S3. The parsing results are packaged and transmitted to the front-end server, and the front-end server implements action interaction according to the parsing results returned by the back-end server.
[0068] The computer-readable storage medium in this embodiment includes, but is not limited to, ROM, RAM, magnetic disk or optical disk, etc.
[0069] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A smart human-computer interaction method, characterized in that: include: Acquire a real-time video stream, pre-process the real-time video stream, extract multiple frames of data and transmit them to a backend server; Based on the extracted multiple frames of data, each frame of the picture data is parsed through an AI visual model to obtain a parsing result, wherein the parsing result includes human body movements; The parsing results are packaged and transmitted to the front-end server, and the front-end server implements action interaction based on the parsing results returned by the back-end server.
2. The method according to claim 1, characterized in that: The specific method of obtaining the real-time video stream, pre-processing the real-time video stream, extracting multiple frames of data and transmitting them to the backend server is as follows: The front-end server obtains the real-time video stream of the external streaming device through the WebRTC interface; Preprocess the acquired video stream, including segmentation, compression and transcoding; Extracting frames of the pre-processed video stream multiple times according to a preset interval, and compressing the extracted frame data; The compressed image data is transmitted to the background server through websocket, and the websocket downstream return result is monitored.
3. The method according to claim 2, characterized in that After preprocessing the acquired video stream, the processed video stream data is displayed in real time on a visualization large-screen device through canvas.
4. The method according to claim 2, characterized in that: The interval time is set to 1000 milliseconds.
5. The method according to claim 1, characterized in that: Based on the extracted multiple frames of data, each frame of the picture data is parsed through the AI visual model to obtain the parsing result, and the parsing result includes the human body movement. The specific method is: Input multiple frames of data into the AI vision model, and use the target detection algorithm to detect the human body in the data frame and locate the human body in the picture; The human body posture estimation algorithm is used to estimate the key point positions of the human body, and action recognition and face recognition are performed based on the human body posture data in continuous frames.
6. The method according to claim 1, characterized in that The analysis result is packaged and transmitted to the front-end server. The front-end server implements action interaction according to the analysis result returned by the back-end server. The specific method is: After the parsing is successful, the backend server will encapsulate the parsing result in JSON format, including the status code, message msg and actual data data; The encapsulated parsing results are transmitted to the front-end server in real time through WebSocket. The front-end WebSocket server checks the status code and message to determine whether the request is successful. If successful, it parses the data part to obtain the specific parsing results. The front-end server implements action interaction based on the analysis results.
7. The method according to claim 2, characterized in that When the analysis of each frame of picture data through the AI visual model fails, the real-time video stream is continued to be pre-processed and multiple frames of data are extracted for analysis.
8. An intelligent human-computer interaction system, characterized in that: include: Data acquisition module: used to acquire real-time video stream, extract multiple frames of data after pre-processing the real-time video stream and transmit them to the backend server; Data parsing module: used to parse each frame of the extracted multi-frame data through an AI visual model to obtain parsing results, which include human body movements; Interaction module: used to encapsulate the analysis results and transmit them to the front-end server. The front-end server implements action interaction based on the analysis results returned by the back-end server.
9. An electronic device, characterized in that: include: processor; as well as, A memory arranged to store computer executable instructions, wherein the computer executable instructions, when executed, enable the processor to implement the steps of the intelligent human-computer interaction method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: Used to store computer executable instructions, which, when executed, implement the steps of the intelligent human-computer interaction method as described in any one of claims 1-7.
