Online classroom interaction system based on business and video separation technology
By separating the video capability service layer and the business layer in the online classroom system, the problem of high network pressure in rural schools was solved, smooth online live streaming was achieved, the system's flexibility and user experience were improved, and maintenance costs and failure risks were reduced.
Patent Information
- Application Number
- CN202511306475.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2026-01-23
AI Technical Summary
In traditional online classroom systems, rural schools face excessive network pressure, leading to difficulties in smooth online live-streaming courses and impacting teaching quality and student learning.
The online classroom interaction system adopts a technology based on the separation of business and video. The video capability service layer and the business layer are separated. The video stream is pushed through OSS object storage or CDN accelerated private network, and business requests are processed through the business layer, thereby achieving decoupling of video and business.
It enhances system flexibility and scalability, reduces system maintenance costs and failure risks, optimizes user experience and service quality, enables online live courses to run smoothly, and ensures teaching quality.
Smart Images

Figure CN121397245A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of online classroom technology, and in particular to an online classroom interactive system based on business and video separation technology. Background Technology
[0002] Currently, as the functions and services of online classrooms gradually strengthen, network communication has become a core factor. However, the significant differences in network infrastructure between urban and rural areas directly restrict the effectiveness of the technology. Traditional online classroom systems deeply integrate services and video, and manage them uniformly, leading to the following problems: Over time, as the volume of services and video increases, the network pressure on rural schools will become increasingly heavy. The basic network communication in rural areas and townships can no longer smoothly support live online courses, the teaching quality of schools cannot be guaranteed, and students' online learning is severely affected.
[0003] Therefore, an online classroom interaction system based on the separation of business and video technologies was developed to solve the above problems. Summary of the Invention
[0004] This invention proposes an online classroom interaction system based on service and video separation technology to solve the problem that existing basic network communication can no longer smoothly conduct online live courses.
[0005] The present invention achieves the above objectives through the following technical solutions: This invention discloses an online classroom interaction system based on business and video separation technology, comprising: The video capability service layer is used to receive online classroom video streams, upload the video streams to OSS objects for storage as teaching materials in the resource center, or push video streams based on CDN-accelerated private networks to achieve online live streaming. The business layer receives business requests from the client, calls the video capability service layer to perform corresponding business logic processing based on the business requests, and sends the business logic processing results back to the client.
[0006] The beneficial effects of this invention are as follows: The online classroom interaction system proposed in this invention, based on the separation of business and video technology, breaks the traditional "strong coupling of business and video" model, improves the system's flexibility and scalability, reduces system maintenance costs and failure risks, optimizes user experience and service quality, enables online live courses to proceed smoothly, and ensures the teaching quality of schools. Attached Figure Description
[0007] Figure 1 This is a system architecture diagram of the online classroom interactive system based on the separation technology of business and video in this application. Detailed Implementation
[0008] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0009] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0010] Early online classrooms primarily operated on a "pre-recorded lessons + simple live streaming" model, with the core requirement being the delivery of teaching content, rather than interactive or personalized features. Deep integration of business and video functions efficiently met the "closed-loop process" requirement at this stage. Furthermore, the early online classroom business logic was simple and heavily reliant on video processes; a deeply integrated monolithic architecture could achieve a "teaching closed loop" at a lower cost, avoiding redundant designs that were "decoupling for the sake of decoupling." Secondly, early video cloud services had limited functionality: live streaming only supported the RTMP protocol, lacking low-latency WebRTC or SRT; transcoding services required manual parameter configuration (such as resolution and bitrate), unable to dynamically adapt to different network environments; CDN node coverage was limited, resulting in high video loading latency in edge areas. A separate architecture required building a dedicated video processing cluster, far exceeding the cost of a monolithic architecture. Therefore, the applicant developed an online classroom interaction system based on business and video separation technology to address the problems of the aforementioned traditional technologies.
[0011] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0012] like Figure 1 As shown, an online classroom interaction system based on business and video separation technology includes: This invention discloses an online classroom interaction system based on business and video separation technology, comprising: The video capability service layer is used to receive online classroom video streams and upload them to OSS object storage or push them to a CDN-accelerated private network. The business layer receives business requests from the client, calls the video capability service layer to perform corresponding business logic processing based on the business requests, and sends the business logic processing results back to the client.
[0013] In one embodiment, uploading a video stream to OSS object storage includes: An asynchronous segmented upload mode is adopted, and video data is buffered using a memory queue; The video stream file is divided into slices every 30-60 seconds, with each slice starting with a key IDR frame.
[0014] In one embodiment, the video capability service layer pushes video streams based on the RTMP protocol.
[0015] In one embodiment, pushing video streams based on a CDN-accelerated private network includes: For videos that are accessed frequently, i.e., the number of accesses exceeds a preset threshold, the complete video or segmented video is cached to the edge node in advance; For live streams, only the content of the most recent few seconds is cached to CDN edge nodes; Through intelligent DNS resolution, terminal requests are routed to the nearest edge node; if a node's bandwidth is insufficient, it automatically switches to an adjacent node. By adapting to multiple protocols, RTMP streams can be converted to HLS / HTTP-FLV.
[0016] In one embodiment, when the business request is an authentication request, the video capability service layer is invoked to perform corresponding business logic processing based on the business request, including: Perform identity verification, permission checks, and parameter parsing on authentication requests; After verifying the student's identity and course permissions, the course metadata is queried. The course metadata includes the teacher ID, live / recorded broadcast status, and current video stream address. By invoking the video capability service layer, a pull stream request is sent to the video capability service layer. The pull stream request includes the course ID, userId, and stream type, where the stream type is live or recorded. The video capability service layer returns the corresponding video stream address to the business layer according to the stream type and triggers the streaming preparation. After the video capability service layer returns the streaming address, the business layer returns the streaming address to the client, and the client starts playing the video stream through the player.
[0017] In one embodiment, when the business request is a request to receive uploaded courseware, the video capability service layer is invoked to perform corresponding business logic processing based on the business request, including: Verify the file format and size of the courseware to be uploaded; Once the verification is successful, courseware metadata is generated based on the uploaded courseware and associated with the current course; If the courseware needs to embed video playback, the business layer calls the video capability service layer to download and transcode the video associated with the course. The video capability service layer calls the OSS object to store the uploaded courseware and returns the storage address of the video stream. The business layer binds the courseware information to the storage address of the video stream. For example, the courseware for the third chapter of the third grade, second class Chinese lesson is bound to the video of the teacher's class on that day.
[0018] In one embodiment, when the business request is a classroom interaction request, the video capability service layer is invoked to perform corresponding business logic processing based on the business request, including: Verify whether the user has the necessary permissions, and generate interactive events based on the recorded interaction time and student ID information; The video capability service layer is invoked, and an interactive overlay request is sent to the video capability service layer. The request is initiated by the classroom terminal to the classroom where the class is being held. The interactive overlay request carries interactive event data and current video stream information. According to the interactive overlay request, the video capability service layer overlays an interactive identifier at a specified position in the video stream and pushes the overlaid video stream to all clients through the streaming media server. The video capability service layer returns the overlaid video stream address and confirmation information to the business layer. The confirmation information indicates that the request has been approved. The business layer records the interaction event to the database and notifies other clients that an interaction event has occurred.
[0019] In one embodiment, a push module is also included, which is used to push the collected online classroom video stream to the video capability service layer based on an intelligent matching algorithm.
[0020] In one embodiment, the collected online classroom video stream is pushed to the video capability service layer based on an intelligent matching algorithm, including: Acquire matching data, which includes basic school information, real-time network status data, and student ability level data. Basic school information includes geographical location, network infrastructure, and educational resource tags. Real-time network status data includes network latency, bandwidth utilization, and packet loss rate. Student ability level data includes academic performance, interactive participation, and device compatibility. The standardized scores and weights of each type of matching data are calculated based on the preset index quantification and weight allocation rules. The combined score of each live course and the schools watching the course is calculated based on the standardized scores and weights of each type of matching data. The combinations were sorted from highest to lowest score, excluding combinations with network latency > 1000ms and bandwidth redundancy < 10%. The top 3 combinations with the highest scores were selected as the final combinations. The correspondence between the combinations of broadcast and receiver calibration and the video stream is shown in Table 1 below: Table 1 Scoring Combinations Video bitrate Triggering conditions Combination of 80-100 points 1080p@30fps Highest image quality Combination of 60-79 720p@30fps Balance image quality and smoothness Combination of 40-59 480p@30fps Ensure basic smoothness Combinations below 40 points 360p@25fps (alternative stream) Extremely weak network as a safety net Specifically, the intelligent alliance matching algorithm (based on Nacos service discovery) automatically matches the optimal broadcaster school (i.e., the school broadcasting the course) and receiving schools (i.e., the schools watching the course) based on the school's geographical location, network conditions, and student level. It dynamically adjusts the streaming servers to reduce cross-regional transmission latency. Specific implementation methods: The core data dimensions and collection methods are shown in Table 2 below: Table 2
[0021] The quantification and weight allocation of the indicators are shown in Table 3 below: Table 3
[0022] Matching score calculation: The combined score formula for each broadcaster's school and receiving school is as follows: Score = ∑i=1n(wi×si) Where: wi: weight of the i-th sub-indicator (total of 100%); si: standardized score of the i-th sub-indicator (0-10 points).
[0023] The final matching and filtering steps include: Candidate pool generation: Based on Nacos service discovery, obtain all registered broadcaster schools and receiving schools; Score sorting: Calculate the matching score for each pair (broadcaster school, receiver school) and sort them from highest to lowest score; Dynamic filtering: Exclude combinations that do not meet the basic conditions, such as network latency > 1000ms and bandwidth redundancy < 10%. Final Match: Select the top 3 highest-scoring combinations, which will be confirmed manually or automatically by the system.
[0024] In one embodiment, the video capability service layer and the service layer transmit data through an education-specific interactive protocol. This protocol uses Simulcast technology to generate multiple video streams with different resolutions / bitrates for layered transmission. Based on the standard WebRTC RTCP protocol, the education-specific interactive protocol adds a feedback field specific to educational scenarios and separates the video stream, audio stream, and interactive commands into independent channels. Simulcast is a commonly used technology in real-time communication, allowing the sender to simultaneously transmit multiple video streams with different resolutions and bitrates to adapt to different network conditions and the requirements of the receiving device.
[0025] The following test results demonstrate the beneficial effects of this system: 1. The test environment is shown in Table 4 below: Table 4 Terminal Category Equipment Number System Version / Configuration Instructions CPU Memory bandwidth Application server + streaming media server 1 s6.2xlarge.4, Centos7.8, 64-bit 32G 16 cores 64G 600M database 2 MySQL 8.0 16G 16 cores 64G 600M 2. Testing tools Load testing tool: OBS 31.0.3.
[0026] 3. The test conclusions are as follows: 3.1: The performance parameters for the 9 streaming operations in the 3 classroom live streaming rooms are as follows: CPU utilization = 3.7%; Memory usage = 38.9%; The server's CPU and memory usage meet performance requirements, and the live stream plays smoothly without buffering.
[0027] 4.2: The performance parameters of the 33 streaming operations in the 11 classroom live streaming rooms are as follows: CPU utilization = 20%; Memory usage = 38.3%; The server's CPU and memory usage meet the performance requirements, and the live stream plays normally without buffering.
[0028] 4.3: The performance parameters for the 60 streaming operations in 20 classroom live broadcast rooms are as follows: CPU utilization = 38.9%; Memory usage = 38.7%; The server's CPU and memory usage meet performance requirements, and the live stream playback is normal and smooth. However, the disk space for storing recorded videos is nearing its limit.
[0029] 4.4: The performance parameters for the 91 streaming operations in the 31 classroom live streaming rooms are as follows: CPU utilization = 52.3%; Memory usage = 40.3; The server's CPU and memory usage meet the performance requirements, and the live stream plays normally without buffering.
[0030] 4.5: Under the recording function, the performance parameters for 5 minutes of operation across 10 classroom live streaming rooms and 30 streaming sessions are as follows: CPU utilization = 7% (11.3% / 16 cores); Memory usage = 40.3%; Disk space = 74% (total disk space 40G); The server's CPU utilization, memory utilization, and disk read speed meet the performance requirements, and the live stream plays normally without lag.
[0031] 4.6: Under the recording function, the performance parameters for 60 live streams from 20 classrooms over 5 minutes are as follows: CPU utilization = 48.5% (77.7% / 16 cores); Memory usage = 38.3%; Disk space = 87% (total disk space 40G); The server's CPU utilization, memory utilization, and disk read speed meet the performance requirements, and the live stream plays normally without lag.
[0032] 4.7: Under the recording function, the performance parameters of the 90 streaming operations in 30 classroom live broadcast rooms are as follows: CPU utilization = 76.4% (122.3% / 16 cores); Memory usage = 39.1%; Disk space = 100% (total disk space 40G); The server's CPU utilization, memory utilization, and disk read speed meet the performance requirements, and the live stream plays smoothly.
[0033] To handle high concurrency, this system employs load balancing, with Nginx handling the load distribution of HTTP requests to the application server cluster, thereby improving request throughput. The load balancing methods used in this system primarily include: (1) Real-time health monitoring mechanism based on Nacos Extend the Nacos health check interface to collect the following data from ZLMediaKit nodes: CPU / memory utilization, Current number of push / pull streams and network bandwidth utilization.
[0034] (2) Dynamic weight calculation algorithm Python implementation: "def calculate_weight(node): # Calculate the node score comprehensively (the lower the weight value, the higher the priority); load_score = 0.7*node.cpu_usage + 0.3*node.mem_usage; geo_score = geo_distance(user_ip, node.location) * 0.2; return load_score + geo_score".
[0035] (3) Streaming task migration strategy When a node load exceeds a threshold (e.g., CPU > 80%), Spring Cloud Gateway is notified via Nacos. New user requests are automatically assigned to low-load nodes, and existing connections are gradually migrated (based on FFmpeg push).
[0036] The system of this invention is divided into a teaching video cloud business layer and a video service capability layer, which are deployed independently. The teaching video cloud business layer is responsible for overall business logic processing, providing users with live video streaming, on-demand video, and interactive services by calling relevant interfaces of the video service capability layer. The teaching video cloud business layer mainly includes functions such as user management, course management, remote interactive teaching and research functions, and data statistics. The application services adopt a microservice architecture, with each service deployed in a cluster, and the whole system can be deployed locally or in the cloud. The database uses MySQL for master-slave deployment. External load balancing is uniformly achieved through an Nginx server. The video capability service layer mainly includes functions such as video uploading, transcoding, storage, live streaming, and on-demand playback, achieving decoupling between the business layer and the capability layer. During live streaming, the host pushes the stream to the live streaming media server, and the video is distributed through CDN and played on the client. During video interaction, each client pushes the stream to the video interaction server cluster, and the WebRTC streaming media service processes the stream and pushes it to each client participating in the interaction. The live and interactive recorded videos are stored uniformly, and the stored video files are accessed directly through CDN during on-demand playback.
[0037] "Separation of business logic and video processing" refers to a technical architecture design that decouples business logic (such as user management, course scheduling, interactive functions, and data statistics) from video processing (such as streaming, transcoding, playback, and image quality optimization) into independent modules, which are then deployed and maintained separately. This separation breaks the traditional "strong coupling between business logic and video processing," bringing multi-dimensional optimization value to online classrooms, specifically in the following aspects: I. Enhance system flexibility and scalability In traditional architectures, business logic and video processing are highly intertwined (for example, business function upgrades may require simultaneous modifications to the video streaming logic), making system expansion difficult. Separation allows both to evolve independently, significantly improving flexibility. The video processing module can focus on core audio and video technologies (such as low-latency transmission, robust network coding, and multi-bitrate adaptive processing) without needing to consider the complexity of the business logic. For example, in low-bandwidth rural scenarios, the video module can independently deploy H.265 / AV1 encoding and FEC (forward error correction) algorithms, while the business module retains its original functionality without adjustment.
[0038] II. Reduce system maintenance costs and failure risks The coupling of business processes and video can easily lead to maintenance challenges where a small change can have far-reaching consequences. Separating them significantly improves fault isolation and maintainability. When video playback stutters or business functions malfunction, the problematic module can be quickly located: video issues only require checking the streaming media server, CDN nodes, or encoding parameters; business issues focus on the database, API calls, or permission logic. This is because video processing (such as high-concurrency streaming and 4K transcoding) demands extremely high computing and bandwidth resources, while business logic (such as user login and data querying) relies more heavily on CPU and memory. After separation, independent scaling can be performed based on actual load.
[0039] III. Optimize user experience and service quality The separation of business logic and video enables the system to more precisely guarantee the core user experience, especially in complex scenarios such as weak networks and high concurrency. The video module can independently implement a "quality-first" strategy: when the network fluctuates, it prioritizes video smoothness (e.g., reducing resolution but maintaining frame rate) rather than sacrificing image quality to meet business functions; updates to business logic will not interfere with video stream transmission. For example, while students are watching a live stream, the business module silently completes system updates in the background, with no interruption or delay in video or audio, and users are almost unaware of the system upgrade. The separated architecture supports the transmission of "video stream" and "business commands" through different channels: the video stream is transmitted via the low-latency UDP protocol, while business commands are transmitted via the highly reliable TCP protocol. For example, when students are watching a live stream on their mobile devices, the video is played via mobile data, while the "submit answer" command is sent via Wi-Fi, avoiding the dual problems of "video buffering + operation failure" caused by a single network fluctuation.
[0040] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. An online classroom interaction system based on traffic and video separation techniques, characterized in that, The application relates to a video capability service layer and a business layer. The video capability service layer is used for receiving an online class video stream, uploading the video stream to an OSS object storage to become a teaching material of a resource center, or pushing the video stream based on a CDN acceleration private network to realize online live broadcast. The business layer is used for receiving a service request sent by a client, calling the video capability service layer according to the service request to perform corresponding service logic processing, and sending a service logic processing result to the client.
2. The online classroom interactive system based on the separation of service and video technology according to claim 1, characterized in that, The video stream is uploaded to the OSS object storage, which comprises the following steps: An asynchronous segmented uploading mode is adopted, and a memory queue is used to buffer video data. The video stream file is divided into slices every 30-60 seconds, and each slice starts with a key IDR frame.
3. The online classroom interactive system based on the separation of service and video technology according to claim 1, characterized in that, The video capability service layer pushes the video stream based on an RTMP protocol.
4. The online classroom interactive system based on the separation of service and video technology according to claim 1, characterized in that, The video stream is pushed based on a CDN acceleration private network, which comprises the following steps: For a high-frequency access video, that is, a video with an access frequency exceeding a preset threshold, a complete video or a segmented video is cached to an edge node in advance. For a real-time live broadcast stream, only the content of the last several seconds is cached to a CDN edge node. A terminal request is routed to the nearest edge node through DNS intelligent resolution, and if the bandwidth of a certain node is insufficient, the terminal request is automatically switched to an adjacent node. RTMP flow is converted into HLS / HTTP-FLV through multi-protocol adaptation.
5. The online classroom interactive system based on the separation of service and video technology according to claim 1, characterized in that, When the service request is an identity authentication request, the video capability service layer is called according to the service request to perform corresponding service logic processing, which comprises the following steps: Identity information verification, permission verification and parameter analysis are performed on the identity authentication request. After the student identity and course permission are verified, course metadata is queried, the course metadata comprising a teacher ID, a live broadcast / recording broadcast state and a current video stream address. A pull stream request is sent to the video capability service layer by calling the video capability service layer, the pull stream request comprising a course ID, a user ID and a stream type, and the stream type being live broadcast or recording broadcast. The video capability service layer returns a corresponding video stream address to the business layer according to the stream type, and triggers pull stream preparation.
6. The online classroom interactive system based on the separation of service and video technology according to claim 1, characterized in that, After the video capability service layer returns the pull stream address, the business layer returns the pull stream address to the client, and the client starts playing the video stream through a player. When the service request is a receiving uploading courseware request, the video capability service layer is called according to the service request to perform corresponding service logic processing, which comprises the following steps: The file format and size of the uploading courseware are verified. After the verification, courseware metadata is generated according to the uploading courseware, and the courseware metadata is associated to the current course. If the courseware needs to embed video playing, the video capability service layer is called by the business layer to download and transcode the video associated to the courseware, the video capability service layer calls the courseware uploaded to the OSS object storage, and returns a storage address of the video stream.
7. The online classroom interactive system based on the separation of service and video technology according to claim 1, characterized in that, The business layer binds the courseware information and the storage address of the video stream. When the service request is a classroom interaction request, the video capability service layer is called according to the service request to perform corresponding service logic processing, which comprises the following steps: The user is verified to have the permission, and an interaction event is generated according to the recorded interaction time and student ID information. The video capability service layer is called to send an interactive superposition request to the video capability service layer, the interactive superposition request carrying interactive event data and current video stream information, the video capability service layer superposing interactive identifiers at specified positions of the video stream according to the interactive superposition request, and pushing the superposed video stream to all clients through the streaming media server; The video capability service layer returns the superposed video stream address and confirmation information to the service layer, the service layer records the interactive event to the database, and notifies other clients that there is an interactive event.
8. The online classroom interactive system based on the separation of service and video technology according to claim 1, characterized in that, Further comprising a pushing module, the pushing module being configured to push the collected online classroom video stream to the video capability service layer based on an intelligent matching algorithm.
9. The online classroom interactive system based on the separation of service and video technology according to claim 8, characterized in that, Pushing the collected online classroom video stream to the video capability service layer based on an intelligent matching algorithm, comprising: Obtaining matching data, the matching data including school basic information, real-time network state data, and student ability level data, the school basic information including geographical position, network infrastructure, and education resource tags, the real-time network state data including network delay, bandwidth utilization rate, and packet loss rate, and the student ability level data including academic record, interactive participation, and device adaptability; Calculating the standardized scores and weights of each type of matching data according to preset index quantification and weight distribution rules; Calculating the combination score of each live course and the school watching the course according to the standardized scores and weights of each type of matching data; Ranking the combinations from high to low according to the scores, excluding combinations with network delay > 1000 ms and bandwidth redundancy rate < 10%, and taking the top 3 combinations with the highest scores as the final combinations.
10. The online classroom interactive system based on the separation of service and video technology according to claim 1, characterized in that, The video capability service layer and the service layer perform data transmission through an education special interactive protocol, the education special interactive protocol being configured to generate multiple video streams with different resolutions / rates through Simulcast technology for hierarchical transmission, the education special interactive protocol adding an education scene special feedback field on the basis of the RTCP protocol of standard WebRTC, and separating the video stream, the audio stream, and the interactive instruction into independent channels.