Virtual reality respiration interaction model based on integral feedback and implementation method

By using a virtual reality breathing interaction model with integral feedback, combined with breathing sensors and VR technology, real-time quantitative feedback is achieved, enhancing fun and compliance, adapting to different user needs, solving the shortcomings of existing breathing training technologies, and improving training effectiveness and data traceability.

CN122032057APending Publication Date: 2026-05-15ZHEJIANG CANCER HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG CANCER HOSPITAL
Filing Date
2026-02-04
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing breathing training techniques lack real-time quantitative feedback, have low engagement and compliance, insufficient adaptability, and poor home applicability, failing to meet the different needs of children and adults, and data is difficult to trace.

Method used

By using an integral feedback-based virtual reality breathing interaction model, breathing sensors are used to collect data. Combined with VR scene linkage, the difficulty is dynamically adjusted to achieve closed-loop training of inhalation-points-exhalation-reward. The aiming accuracy is calculated by combining head posture data, scene parameters are dynamically adjusted, and data storage and sharing are supported.

Benefits of technology

It enables real-time quantitative feedback, enhances engagement and compliance, adapts to different user needs, improves training effectiveness and data traceability, and enhances home convenience and diagnostic efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122032057A_ABST
    Figure CN122032057A_ABST
Patent Text Reader

Abstract

The invention provides a virtual reality respiration interaction model based on integral feedback and an implementation method, and solves the problems of'untimely feedback, insufficient interestingness, low compliance 'and the like in the background technology through three core modules of integral feedback (quantitative training quantity), expiration aiming (combining respiration and posture) and dynamic difficulty (self-adaptive user level). A breathing behavior is converted into a perceivable virtual interaction result through an integral S (t), an inspiration-accumulation-expiration-excitation complete closed loop is formed in combination with an extra reward for expiration aiming, and the problems that feedback is lagged and quantitative indexes are lacked in the background technology are solved; a virtual scene is combined with a social sharing function, so that the training attraction is greatly improved, and the overall compliance of a user is improved; the portable VR equipment and the WeChat applet are light, so that 50% of time cost is saved; the training data cloud storage and report generation function assists doctors to efficiently adjust rehabilitation schemes, and the diagnosis efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of breathing training technology, and in particular to a virtual reality breathing interaction method based on integral feedback, as well as a virtual reality breathing interaction system, electronic device, and computer-readable storage medium based on integral feedback. Background Technology

[0002] Current breathing training techniques mainly rely on traditional pulmonary function instruments, paper instruction manuals, or basic app reminders, which have four major drawbacks: 1. Lack of feedback mechanism: There is a lack of real-time quantitative interactive feedback during the training process (such as the linkage between breathing actions and virtual scenes), and only static data can be provided after training, which makes it impossible for users to adjust their breathing methods in a timely manner; 2. Low engagement and compliance: The scenarios are monotonous (mostly numerical or textual prompts), resulting in less than 30% participation among children and less than 50% compliance among adults during long-term training. 3. Lack of adaptability: The difficulty level is fixed, and training parameters cannot be adjusted according to the differences between children (who need large goals and slow speed) and adults (who need small goals and fast speed). 4. Poor practicality at home: It relies on large hospital equipment or complex operating procedures, data is scattered and difficult to trace, and doctors cannot efficiently assess the progress of rehabilitation.

[0003] To address the aforementioned problems, this invention proposes a virtual reality breathing interaction model based on integral feedback, which solves the pain points of traditional training through technologies such as VR scene linkage and dynamic difficulty adjustment. Summary of the Invention

[0004] To address the technical problems existing in the prior art, the present invention provides the following technical solution: On the one hand, a virtual reality breathing interaction model and implementation method based on integral feedback are provided. This method is implemented by an electronic device and includes: The user's inspiratory flow rate Qactual and expiratory flow rate Qexp are collected using a respiratory sensor; The collected respiratory flow signals are preprocessed, including filtering, zero-point calibration, and temperature and humidity compensation. Dynamic calibration is performed based on the preprocessed respiratory flow signal to generate individualized calibration parameters, including maximum inspiratory flow rate Qmax and maximum expiratory flow rate Qmax_exp. Calculate the relative inspiratory flow rate Qrel = Qactual / Qmax and the relative expiratory flow rate Qexp_rel = Qexp / Qmax_exp; The integral S(t) = S(t-1) + k·Qrel·Δt is calculated in real time based on the relative inhalation flow rate Qrel, where k is the integration coefficient and Δt is the sampling time. Interactive actions in the virtual scene are driven by the integral S(t); When the score reaches the preset threshold, the exhalation aiming phase begins; The aiming accuracy θ and additional integral are calculated by combining head posture data and expiratory flow data; The scene difficulty parameters are dynamically adjusted based on the user's training performance.

[0005] Preferably, the dynamic calibration step includes: Initial calibration process: prompt the user to perform maximum inhalation and maximum exhalation, collect peak flow data and calculate Qmax and Qmax_exp; Periodic update mechanism: The calibration process is automatically triggered after each preset number of training sessions to update the Qmax and Qmax_exp parameters.

[0006] Preferably, in the integral calculation step: The integration coefficient k is adjusted according to the user's age: k=0.15 for children and k=0.1 for adults. The sampling time Δt = 100ms, and the integral is updated 10 times per second; The integration threshold Sth = 100, and the exhalation phase is triggered when S(t) ≥ Sth.

[0007] Preferably, the virtual scene interaction steps include: The movement speed of the virtual character is controlled by the relative inhalation flow rate Qrel, and the water absorption speed v = v0*Qrel, where v0=0.5m / s; The water volume display in the virtual scene is controlled by the integral S(t), where the water volume V = V0·S(t) / Sth, and V0=1L.

[0008] Preferably, the exhalation aiming step includes: Head posture data is collected using VR devices, and the head Euler angles are obtained by Kalman filtering and fusion. Transform the Euler angles into a head direction vector (dx, dy, dz); Calculate the angle θ between the head direction vector and the target vector; Additional integrals are calculated based on the θ value and the relative expiratory flow rate Qexp_rel.

[0009] Preferably, the additional integral is calculated using the following formula: Additional integral = base integral × Qexp_rel × (1 - θ / 90), where the base integral = 10 points.

[0010] Preferably, the dynamic difficulty adjustment step includes: Collect users' total score S_total, inspiratory stability CV%, expiratory aiming accuracy%; The AI ​​model analyzes user characteristics and outputs the target water volume V_target, target movement speed v_target, target volume V_obj, and aiming time T_aim. The difficulty parameters are adjusted according to the user's level. The beginner level corresponds to V_target=100 points, v_target=0.5m / s, V_obj=0.2m³, and T_aim=3 seconds.

[0011] Preferably, the method further includes a data storage step: Individualized calibration parameters, training data, and user information are stored in a local database; After user authorization, the anonymized data is uploaded to the cloud server for storage.

[0012] Preferably, the method is implemented through the collaboration of a WeChat mini-program and a VR device, including: Connect the breathing sensor and VR device via Bluetooth; Connect VR devices and mini-programs via Wi-Fi; Connect the mini-program and the cloud server via HTTPS protocol.

[0013] On the other hand, a virtual reality breathing interaction system based on integral feedback is provided, including: The hardware awareness layer includes: The respiratory sensor module is used to collect inspiratory flow rate Qactual and expiratory flow rate Qexp; VR device module, used to present virtual scenes and collect head posture data; The terminal device module is used to run the user interface. The software processing layer includes: The signal preprocessing module is used to filter, calibrate, and compensate the respiratory flow signal; The integral calculation module is used to update the integral in real time based on the relative inspiratory flow rate; The virtual interaction module is used to drive scene animation based on scores and breathing data; The dynamic difficulty adjustment module is used to adjust scene parameters in real time based on user performance; The data storage layer includes: The local storage module is used for encrypted storage of user data and training records; The cloud storage module is used for long-term storage of anonymized data and user history records; The hardware sensing layer is connected to the software processing layer via wireless communication, and the software processing layer communicates with the data storage layer via a network. On the other hand, an electronic device is provided, comprising: a processor; and a memory storing computer-readable instructions, wherein when executed by the processor, the computer-readable instructions implement any of the methods described above for the virtual reality breathing interaction model and implementation method based on integral feedback.

[0014] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, the at least one instruction being loaded and executed by a processor to implement any of the above-described methods of the virtual reality breathing interaction model and implementation method based on integral feedback. The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: This invention solves the problems of "untimely feedback, lack of interest, and low compliance" in the background technology by using three core modules: integral feedback (quantifying training volume), exhalation aiming (combining breathing and posture), and dynamic difficulty (adapting to user level).

[0015] The core technological advantages of this solution compared to the background technology are as follows: 1. Closed-loop quantitative feedback mechanism: By integrating S(t), breathing behavior is transformed into perceptible virtual interactive results. Combined with the additional reward of exhalation aiming, a complete closed loop of "inhalation-accumulation-exhalation-incentive" is formed, which solves the problems of lagging feedback and lack of quantitative indicators in the background technology. 2. High engagement and compliance: The combination of virtual scenarios (elephant sucking water, whale spouting water) and social sharing functions greatly enhances the appeal of training, increasing children's participation by 40% and achieving an overall user compliance rate of over 80%. 3. Dynamic Adaptive Capability: Based on the AI ​​model, the difficulty is adjusted in real time to suit the different needs of children (large targets, slow speed) and adults (small targets, fast speed), covering more than 90% of the pulmonary function rehabilitation population; 4. Convenience at home and traceable data: The lightweight combination of portable VR devices and WeChat mini-programs saves 50% of time costs; cloud storage of training data and report generation functions help doctors efficiently adjust rehabilitation plans and improve diagnostic efficiency by 30%. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1This is a block diagram of a virtual reality breathing interaction system based on integral feedback provided in an embodiment of the present invention; Figure 2 This is a flowchart of a virtual reality breathing interaction method based on integral feedback provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the service flow of training data provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0018] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0019] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.

[0020] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.

[0021] In this embodiment of the invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.

[0022] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0023] The following section will explain this solution in conjunction with the system and its interaction process.

[0024] I. System Overall Architecture like Figure 1 As shown, this system adopts a distributed architecture of "terminal device - VR device - breathing sensor - cloud server", integrating four major modules: hardware perception, software interaction, data processing, and AI decision-making, to achieve closed-loop training of "inhalation-points-exhalation-reward". The detailed hardware and software components are as follows: (I) Hardware Components The system hardware needs to meet four major functions: respiratory data acquisition, head posture tracking, virtual scene rendering, and network communication. The specific selection is as follows: Equipment type Model / Specification Function Description VR devices Pico Neo 3 (with Qualcomm Snapdragon XR2 chip, 128GB storage, 6DoF tracking) 1. Presents a virtual scene (1080P×2 resolution, 90Hz refresh rate); 2. Collects head posture data (MPU-6050 gyroscope, accelerometer); 3. Connects to a breathing sensor via Bluetooth and a mobile phone via Wi-Fi. Respiratory monitoring equipment Chest strap respiratory sensor (BIOPAC RSP100C, 100Hz sampling rate, Bluetooth 4.0) or mouth and nose mask flow sensor (HansRudolph 3813, accuracy ±2%). 1. Collect inspiratory flow (Qactual) and expiratory flow (Qexp); 2. Transmit data to VR device via Bluetooth; 3. Support maximum inspiratory (Qmax) and maximum expiratory (Qmax_exp) calibration. terminal equipment Smartphone (supports WeChat Mini Programs, Bluetooth 5.0, Wi-Fi 6) 1. Run WeChat mini-programs to enable user interaction and data display; 2. Act as a communication intermediary between VR devices and cloud servers; 3. Store local training data (cached). cloud server Alibaba Cloud ECS (2 cores, 4GB RAM, 500GB SSD storage, 100Mbps bandwidth) 1. Deploy backend services (API interfaces, database); 2. Run AI models (dynamic difficulty adjustment); 3. Store user historical data (10-year retention). (II) Software Components The software system adopts a layered approach, consisting of a VR application layer, a mini-program layer, a backend service layer, and an AI model layer. Each layer works independently yet collaboratively. 1. VR Application Layer (Core Interaction Carrier) Development tools: Unity 2021.3 (supports Pico SDK 2.0), C programming language.

[0025] Core functions: Virtual scene rendering: realize scenes such as "elephant sucking water" and "whale spouting seawater", including character animation (such as elephant trunk swaying, whale tail fin swaying), target objects (fruit, balloons), and background elements (forest, ocean).

[0026] Respiratory data processing: Receive Qactual and Qexp data from the respiratory sensor, calculate Qrel(Qactual / Qmax) and Qexp_rel(Qexp / Qmax_exp), and update the integral S(t) in real time (formula: S(t) = S(t-1) + k·Qrel·Δt, k=0.1, Δt=100ms).

[0027] Head pose tracking: Gyroscope (angular velocity) and accelerometer (acceleration) data are obtained through Pico SDK, and Kalman filter is used to fuse them to obtain head Euler angles (roll / pitch / yaw), which are then converted into head orientation vectors (dx / dy / dz).

[0028] Dynamic difficulty adjustment: Receives difficulty parameters (target water volume, movement speed, size, aiming time) from the backend server and adjusts the target attributes of the virtual scene (such as changing the target movement trajectory from a straight line to an S-shape).

[0029] 2. Mini Program Layer (User Interaction Entry Point) Development tools: WeChat Developer Tools, Vue 3, Node.js (backend).

[0030] Core functions: User management: registration / login (mobile phone verification code), personal information (age, gender, lung function), device binding (VR glasses, breathing sensor).

[0031] Training control: Start / stop training, calibrate breathing sensors (Qmax, Qmax_exp), select scene / role (elephant / whale / dragon).

[0032] The report displays real-time training progress (scores, time), a summary of this training session (total score, number of hits), breathing indicators (CV%, accuracy%), and historical comparisons (differences from the previous training session).

[0033] Incentive mechanisms: Medal wall (unlock medals such as "Junior Explorer" and "Intermediate Archer"), sharing function (share achievements in Moments / WeChat groups).

[0034] 3. Backend service layer (data and logic hub) Development tools: Python Flask (API interface), MySQL (relational database), Redis (caching).

[0035] Core functions: Data storage: Stores user information (ID, mobile phone number, age), training data (Qrel sequence, S(t) sequence, θ sequence, total integral), and device data (VR glasses model, breathing sensor number).

[0036] API Interface: Provides interfaces such as "User Registration", "Device Connection", "Data Upload", "Report Generation" and "Difficulty Adjustment", and supports HTTPS encryption (to ensure data security).

[0037] Cache management: Use Redis to cache frequently accessed data (such as user level, current points) to reduce database pressure (cache hit rate ≥90%).

[0038] 4. AI Model Layer (Dynamic Difficulty Decision) Model selection: Random Forest + Rule Engine.

[0039] Training data: Historical training data of 1000 users (500 children and 500 adults) (10 training sessions per person, totaling 10,000 data points).

[0040] Input features: Cumulative score (S_total): The total score of this training session (range 0-5000); Inspiratory stability (CV%): Coefficient of variation of Qrel (standard deviation / mean × 100%, range 0-100%). Exhalation aiming accuracy%: (Number of hits / Total number of exhalations) × 100% (range 0-100%) User Level: Divided according to S_total (Beginner 0-500, Intermediate 500-1000, Advanced 1000+).

[0041] Output parameters: Target water volume (V_target): 100 points for beginner, 150 points for intermediate, and 200 points for advanced; Target movement speed (v_target): Basic 0.5m / s, Intermediate 1m / s, Advanced 1.5m / s; Target volume (V_obj): Primary 0.2m³, Intermediate 0.15m³, Advanced 0.1m³; Aim time (T_aim): Beginner 3 seconds, Intermediate 2 seconds, Advanced 1 second.

[0042] Model performance: Random forest accuracy ≥ 90%, rule engine supplements edge cases (e.g., when CV% > 20%, the difficulty is forcibly reduced).

[0043] (III) System connectivity and hardware / software interaction methods 1. Hardware device connection relationships The respiratory monitoring device (chest strap / oronasal mask flow sensor) is connected to the VR device (PicoNeo 3) via Bluetooth 4.0 to transmit real-time respiratory flow data (Qactual, Qexp). VR devices connect to terminal devices (smartphones) via Wi-Fi 6, transmitting processed breathing indicators (Qrel, integral S(t)) and head posture data; The terminal device connects to the cloud server (Alibaba Cloud ECS) via HTTPS (TLS 1.3) to upload training data and receive dynamic difficulty parameters.

[0044] 2. Hardware and software interaction process (1) Hardware to software layer interaction: breathing sensor → VR application layer: the sensor collects raw flow data and transmits it to the Unity application layer of the VR device via Bluetooth. The breathing data processing module calculates Qrel (Qactual / Qmax) and integral S(t). VR device → VR application layer: Gyroscope / accelerometer collects head posture data, which is synchronized to the application layer through Pico SDK, fused into Euler angles by Kalman filter, and then converted into head orientation vector (dx / dy / dz). (2) Inter-software layer interaction: VR application layer → Mini program layer: Transmit data such as Qrel, score progress, and target hit rate to the WeChat Mini Program via Wi-Fi to display training progress in real time; Mini Program Layer → Backend Service Layer: Upload user operation commands (start training, select scene) and training data (Qrel sequences, θ sequences) to the Flask backend and store them in a MySQL database; Backend service layer → AI model layer: Call the random forest model, input features such as total score, CV%, and accuracy%, output dynamic difficulty parameters (target movement speed, volume), and return to the VR application layer; (3) Software to hardware feedback: VR application layer → VR device: The virtual scene is rendered based on the integral S(t) (such as the speed of an elephant sucking water increases with Qrel), and the animation is presented through the 1080P dual screen of the VR device; Mini Program Layer → Terminal Device: Display training reports (total score, breathing stability) on smartphone screens, and allow users to generate WeChat Moments posters by clicking the "Share" button.

[0045] Closed-loop logic: Users initiate training via terminal devices → VR devices receive breathing / posture data → the software layer processes and calculates the integral → the AI ​​model dynamically adjusts the difficulty → the VR device provides feedback on the virtual scene → the terminal devices display the training results, forming a closed-loop interaction of "perception-processing-feedback" to ensure the real-time nature and immersiveness of the training process.

[0046] II. Core Interaction Model The core of this system is a closed-loop interaction of "inspiratory integration - expiratory aiming - dynamic difficulty". The technical principles and implementation of each module are described in detail below: (a) Inspiratory integral module (quantitative training volume feedback) Objective: To transform the act of inhaling into a perceptible virtual action (such as an elephant sucking in water), quantify the amount of training through the accumulation of points, and motivate users to take deep breaths.

[0047] 1. Calibration Procedure (Determining Qmax) Triggering conditions: When a user logs in for the first time or when the breathing sensor is replaced.

[0048] Operating steps: The mini-program prompts, "Please take a maximum inhale and hold for 3 seconds." The respiratory sensor collects Qactual (sampling rate 100Hz), and the maximum value within 3 seconds is taken as Qmax (e.g., if the user's maximum inspiratory flow is 90L / min, then Qmax=90L / min). Qmax is stored in the user database (associated with the user ID) for subsequent Qrel calculations.

[0049] 2. Real-time integration calculation (S(t)) Formula: S(t) = S(t-1) + k·Qrel·Δt, where: S(t): The integral at time t (initial value 0); k: Integral coefficient (k=0.15 for children, k=0.1 for adults, adjusted according to user age); Qrel: Relative inspiratory flow rate (Qrel = Qactual / Qmax, range 0-1); Δt: Sampling time (100ms, i.e., 10 samples per second).

[0050] Example: When the user inhales, Qactual = 72L / min (Qmax = 90L / min), then Qrel = 0.8, Δt = 0.1s, k = 0.1. So the integral increases by 0.1 × 0.8 × 0.1 = 0.008 every 100ms, and the integral increases by 0.08 after 1 second.

[0051] 3. Virtual motion mapping (elephant sucking water) Water absorption rate: v = v0·Qrel, where v0 = 0.5m / s (maximum water absorption rate). The larger Qrel is, the higher the frame rate of the elephant trunk's water absorption animation (e.g., when Qrel = 1, the frame rate is 60fps; when Qrel = 0.5, the frame rate is 30fps).

[0052] Water intake: V = V0·S(t) / Sth, where V0=1L (maximum water volume) and Sth=100 (integral threshold for triggering exhalation). The larger S(t) is, the higher the water level in the tank (e.g., when S(t)=50, the water level is halfway up the tank; when S(t)=100, the tank is full).

[0053] 4. Integral threshold trigger (entering the exhalation phase) Condition: When S(t)≥Sth(100), the VR scene prompts "Prepare to exhale" (large white font, accompanied by "beep beep" sound), and at the same time the elephant's trunk is raised, ready to spray water.

[0054] (ii) Exhalation aiming module (combining breathing and posture) Objective: To combine exhalation with head aiming to encourage users to exhale slowly, maintain correct posture, and improve breathing stability.

[0055] 1. Head pose tracking (calculating θ) Data acquisition: The Pico Neo 3's gyroscope collects angular velocities (ωx / ωy / ωz, unit: rad / s), and the accelerometer collects accelerations (ax / ay / az, unit: m / s²).

[0056] Data fusion: Kalman filter is used to fuse angular velocity and acceleration data to obtain head Euler angles (roll / pitch / yaw, unit: degrees).

[0057] Direction vector conversion: Convert Euler angles into head direction vectors (dx / dy / dz), using the following formula: dx = cos(pitch) × cos(yaw) dy = sin(pitch) dz = cos(pitch) × sin(yaw) Target localization: The position (Tx / Ty / Tz) of the virtual target is generated by the scene, such as 1.5m in front of the screen (Tz=1.5m), Ty=0.5m (vertical direction), and Tx changes randomly (when the difficulty is high, Tx changes faster).

[0058] 2. Calculate aiming accuracy (θ) Formula: θ = arccos[(dx·Tx + dy·Ty + dz·Tz) / (||d||·||T||)], where ||d|| is the magnitude of the head direction vector (√(dx²+dy²+dz²)) and ||T|| is the magnitude of the target vector (√(Tx²+Ty²+Tz²)).

[0059] Level Classification: Excellent (θ < 10 degrees): 100% bonus points; Good (10≤θ<20 degrees): 80% extra integral is obtained; In the case of (20 ≤ θ < 30 degrees): 50% extra integral is obtained; Difference (θ≥30 degrees): 0% extra integral.

[0060] 3. Expiratory flow feedback (Qexp_rel) Formula: Qexp_rel = Qexp / Qmax_exp, where Qmax_exp is the calibrated maximum expiratory flow rate (e.g., if the user's maximum expiratory flow rate is 72 L / min, then Qmax_exp = 72 L / min).

[0061] Water flow rate: v_exp = v_exp0·Qexp_rel, where v_exp0=0.3m / s (maximum water spray speed). The larger Qexp_rel is, the thicker the water jet (e.g., when Qexp_rel=1, the water jet diameter is 0.1m; when Qexp_rel=0.5, the diameter is 0.05m).

[0062] 4. Bonus Points Calculation (Rewards) Formula: Bonus points = Base points × Qexp_rel × (1 - θ / 90), where base points = 10 points (base bonus for each round of exhalation).

[0063] Example: When the user exhales, Qexp = 57.6 L / min (Qmax_exp = 72 L / min), then Qexp_rel = 0.8; θ = 5 degrees (excellent), then the extra integral = 10 × 0.8 × (1 - 5 / 90) = 10 × 0.8 × 0.944 = 7.55 points (rounded to the nearest integer 8 points).

[0064] 5. Feedback on exhalation results (animation and sound) Hit: If θ < 30 degrees and Qexp_rel ≥ 0.5, the target explodes (red fragment animation), accompanied by a "ding" sound, and the extra points are displayed in the upper right corner of the screen (yellow numbers that gradually disappear).

[0065] Miss: If θ ≥ 30 degrees or Qexp_rel < 0.5, the target flashes (red border) accompanied by a "thump" sound, and prompts "Try again" (white text).

[0066] (III) Dynamic Difficulty Adjustment Module (Adaptive to User Level) Objective: To adjust the difficulty of the training scenarios in real time based on the user's training performance (scores, stability, aiming accuracy) to maintain the challenge and fun of training.

[0067] 1. Difficulty Parameter Definition Parameter name Beginner (0-500 points) Intermediate (500-1000 points) Advanced (1000+ points) Target water volume (V_target) 100 points 150 points 200 points Target movement speed (v_target) 0.5m / s 1m / s 1.5m / s Target volume (V_obj) 0.2m³ 0.15m³ 0.1m³ Aiming time (T_aim) 3 seconds 2 seconds 1 second 2. Adjust the logic (AI + rules) Points-driven: The higher the cumulative points S_total, the higher the difficulty (e.g., S_total>1000, adjust to high difficulty).

[0068] Stability-driven: Inhalation stability CV%>20% (unstable), reducing difficulty (e.g., increasing the target volume from 0.15m³ to 0.2m³); CV%<10% (stable), increasing difficulty (e.g., increasing the target movement speed from 1m / s to 1.5m / s).

[0069] Accuracy-driven: If the exhalation aiming accuracy% is <60% (poor), increase the aiming time (e.g., from 2 seconds to 3 seconds); if the accuracy% is >80% (excellent), shorten the aiming time (e.g., from 2 seconds to 1 second).

[0070] 3. Adjust processes in real time Step 1: The VR application uploads the S_total, CV%, and accuracy% of this training to the backend server.

[0071] Step 2: The backend server calls the AI ​​model (random forest), inputs the above features, and outputs the difficulty parameters (V_target, v_target, V_obj, T_aim).

[0072] Step 3: The backend server transmits the difficulty parameters to the mini-program, and the mini-program transmits them to the VR application.

[0073] Step 4: The VR application adjusts the target attributes for the next round based on the difficulty parameters (e.g., at higher difficulty, the target's movement speed is 1.5m / s and its volume is 0.1m³).

[0074] 4. Example (Child User) Initial status: Child user, beginner level (S_total=300 points), CV%=15% (stable), accuracy%=70% (good).

[0075] AI output: V_target=100 integrals, v_target=0.5m / s, V_obj=0.2m³, T_aim=3 seconds.

[0076] Training performance: After training, the user's S_total = 600 points (upgraded to intermediate level), CV% = 12% (more stable), and accuracy% = 75% (good).

[0077] After adjustment: V_target = 150 integrals, v_target = 1m / s, V_obj = 0.15m³, T_aim = 2 seconds.

[0078] III. Detailed Application Process (Taking Child Users as an Example) The following is the complete process from user registration to completing a training session, such as... Figure 2 As shown: (a) Step 1: User registration and login Operation: Users open the WeChat mini program, click "Register", enter their mobile phone number (138XXXX1234), obtain the verification code (654321), and set the password (Abc12345).

[0079] Technical principle: The mini program calls WeChat's "Get Phone Number" interface (which requires user authorization), the backend server verifies the verification code (sent via Alibaba Cloud SMS service), and stores the user information (ID, phone number, password) in the MySQL database (password is encrypted with BCrypt).

[0080] Result: The user successfully logged in and entered the homepage (displaying avatar, level "Beginner Explorer", current points 0).

[0081] (II) Step 2: Equipment Connection and Calibration operate: a. Click on the "Training" page. A prompt will appear saying "Please connect VR glasses". Turn on Pico Neo 3 (with Bluetooth enabled). The mini-program will search for the device (name: Pico Neo 3-123). Click to pair, and it will display "VR device connected".

[0082] b. When prompted "Please connect the breathing sensor", attach the chest strap sensor to your chest (around the diaphragm), turn on Bluetooth, and the mini-program will search for the device (name: BIOPAC RSP100C-456). Click to pair, and it will display "Breathing sensor connected".

[0083] c. Click the "Calibration" button. The prompt "Please take a maximum inhalation and hold for 3 seconds" will appear. The user takes a deep breath (chest expansion), and the breathing sensor collects Qactual (maximum value is 72L / min), displaying "Calibration passed" (Qmax=72L / min).

[0084] Technical principle: VR device connection: The mini-program sends a "connection request" via Bluetooth 4.0 protocol, and the VR device responds with "agree" to establish a TCP connection.

[0085] Breathing sensor calibration: The backend server stores Qmax (associated user ID) for subsequent Qrel calculation.

[0086] Result: Device connection successful, calibration completed, training can begin.

[0087] (III) Step 3: Scene selection and start training operate: a. Click "Start Training" to enter the scene selection page, select the character "Elephant" (a cute image that children like), select the scene "Forest" (green background with birds flying), and select the training time "10 minutes".

[0088] b. Enter the VR scene, which displays an elephant (gray skin, pink trunk), a water jug ​​(blue, 1L capacity), and a target (a red apple, located 1.5m in front of the screen), with a prompt "Ready to start training" (3-second countdown).

[0089] Technical principle: Scene rendering: The Unity engine loads the "Elephant Forest" scene (prefab containing characters, background, and target), and uses URP (Universal Render Pipeline) to optimize performance (ensuring a frame rate of ≥60fps).

[0090] Target generation: The target's position (Tx / Ty / Tz) is generated by a random function (at the beginner level, Tx varies between -0.5m and 0.5m, with a speed of 0.5m / s).

[0091] Result: The VR scene has finished loading, and the user has entered the training state.

[0092] (iv) Step 4: Training process (inhalation-exhalation cycle) 1. Inhalation phase (0-10 seconds) Operation: The user sees the "Inhale" prompt (large white font) at the top of the screen, accompanied by a "ding" sound, and takes a deep breath (chest expansion).

[0093] Technical principle: The respiratory sensor collected Qactual (60 L / min), and Qrel was calculated as 60 / 72≈0.833.

[0094] The integral S(t) is updated 10 times per second (Δt=0.1s), k=0.15 (child), then the integral increases by 0.15×0.833×0.1=0.0125 every 100ms, and after 10 seconds the integral S(t)=1.25 (not reaching the threshold of 100).

[0095] Virtual animation: The animation of the elephant's trunk sucking water is at 60fps (Qrel=0.833), and the water level in the jar rises to 1 / 8 (V=1L×1.25 / 100=0.0125L).

[0096] Result: As the score gradually increased, the user felt that their breathing was synchronized with the elephant's movements.

[0097] 2. Inhalation phase (10-100 seconds) Operation: The user continues to inhale deeply. After 100 seconds, S(t) = 100 (the threshold is reached).

[0098] Technical principle: When the integral S(t) = 100, the VR scene prompts "Prepare to exhale" (in large white font), accompanied by a "beep beep" sound, and the elephant's trunk is raised (animation).

[0099] Users need to turn their heads (left / right) to align the elephant's trunk with the target (the red apple).

[0100] Result: During the exhalation preparation phase, the user begins to adjust their head posture.

[0101] 3. Exhalation preparation phase (100-103 seconds) Operation: The user turns their head so that the elephant's trunk is aligned with the red apple (the angle θ between the center of the target and the direction of the trunk is 10 degrees).

[0102] Technical principle: The VR glasses' gyroscope collects angular velocities (ωx=0.5rad / s, ωy=0.3rad / s, ωz=0.2rad / s), and the accelerometer collects accelerations (ax=0.1m / s², ay=0.2m / s², az=9.8m / s²).

[0103] The data was fused using Kalman filtering to obtain the head Euler angles (roll=0 degrees, pitch=10 degrees, yaw=20 degrees), which were then converted into head direction vectors (dx=0.9397, dy=0.1736, dz=0.3090).

[0104] When the user turns their head to align the elephant's trunk with the target, the head's direction vector should be in the same direction as the target vector, so θ should be very small, such as 5 degrees.

[0105] When the user's head is facing forward (yaw = 0 degrees), pitch = 0 degrees, and roll = 0 degrees, the head direction vector is (0, 0, 1) (forward direction). If the target is 1.5m in front, the target vector is (0, 0, 1.5), and θ = 0 degrees. When the user turns their head to the right (yaw = 20 degrees), the head direction vector is (sin20°, 0, cos20°) ≈ (0.3420, 0, 0.9397).

[0106] If the target is 0.5m to the right and 1.5m in front, then the target vector is (0.5, 0, 1.5), and its magnitude is √(0.5²+1.5²)=√(0.25+2.25)=√2.5≈1.581m. The dot product of the head direction vector and the target vector is 0.3420×0.5 +0×0 + 0.9397×1.5=0.1710+1.4096=1.5806. cosθ=1.5806 / (1×1.581)≈0.9997, θ≈1.5 degrees.

[0107] Therefore, when the user turns their head to the right, the yaw angle increases, dx = sin(yaw), dz = cos(yaw). Thus, when the user's yaw angle equals the target's yaw angle, θ is very small.

[0108] After correction, the head direction vector should be calculated as follows: dx = sin(yaw) × cos(pitch), dy = sin(pitch), dz = cos(yaw) × cos(pitch).

[0109] Thus, when the user's head is facing forward (yaw = 0 degrees, pitch = 0 degrees), dx = 0, dy = 0, dz = 1 (forward direction). When the user turns their head to the right (yaw = 20 degrees), pitch = 0 degrees, then dx = sin20° ≈ 0.3420, dy = 0, dz = cos20° ≈ 0.9397.

[0110] If the target is 0.5m to the right and 1.5m in front, then the target vector is (0.5, 0, 1.5), and its magnitude is √(0.5²+1.5²)=√2.5≈1.581m. The dot product of the head direction vector and the target vector is 0.3420×0.5 + 0×0 + 0.9397×1.5=0.1710+1.4096=1.5806. cosθ=1.5806 / (1×1.581)≈0.9997, θ≈1.5 degrees.

[0111] Result: The user turned their head so that the elephant's trunk was aligned with the target (θ=5 degrees) and prepared to exhale.

[0112] 4. Exhalation phase (103-106 seconds) Operation: The user sees the "Exhale" prompt (large white font) at the top of the screen, accompanied by a "whoosh" sound, and slowly exhales (chest contraction).

[0113] Technical principle: The respiratory sensor collects Qexp (57.6 L / min), and calculates Qexp_rel=57.6 / 72=0.8 (Qmax_exp=72 L / min, determined during the calibration phase).

[0114] The head direction vector and the target vector are θ=5 degrees apart (excellent). The extra integral is 10×0.8×(1-5 / 90)=10×0.8×0.944=7.55 points (rounded to the nearest integer 8 points).

[0115] Virtual animation: The elephant's trunk sprays a white jet of water (0.08m in diameter, Qexp_rel=0.8), which hits the target (a red apple), causing the apple to explode (red fragment animation) accompanied by a "ding" sound.

[0116] Result: The user receives an extra 8 points, increasing the total score to 108 points. (S(t) = 100 + 8 = 108? No, S(t) is the inhalation score, the extra points are the exhalation reward, and the total score is the inhalation score plus the extra points. For example, S(t) = 100 (inhalation score), extra points = 8 points, total score = 108 points.) 5. Repeat (106-600 seconds) Instructions: The user repeats the inhalation-exhalation cycle until the 10-minute training session is over.

[0117] Technical principle: During each inhalation phase, the integral S(t) accumulates from 0 until it reaches 100, at which point the exhalation phase begins.

[0118] During each exhalation phase, additional integrals are calculated based on Qexp_rel and θ, and the total integrals are accumulated.

[0119] Dynamic difficulty adjustment: Every 5 minutes, the backend server calls the AI ​​model to adjust the target parameters for the next round (e.g., if the user's total score reaches 500 points, they are upgraded to intermediate level, and the target movement speed is increased to 1m / s).

[0120] Results: The user completed 10 minutes of training and achieved a total score of 600 points (upgraded to intermediate level), CV%=12% (stable), and accuracy%=75% (good).

[0121] (V) Step 5: Training Completion and Report Presentation operate: a. After training, the VR scene displays a "Training Complete" message (large white font), accompanied by applause, and shows a total score of 600 points (upgraded to "Intermediate Shooter") and 12 hits.

[0122] b. When the user removes the VR glasses and returns to the mini-program, the report page automatically refreshes and displays: Summary: Total score 600 points, training time 10 minutes, hits 12 times (hit rate 80%).

[0123] Respiratory parameters: Inspiratory stability CV%=12% (excellent), Expiratory aiming accuracy%=75% (good), Average Qexp_rel=0.75 (good).

[0124] Difficulty adjustment suggestion: "Increase the difficulty of the next training session to intermediate level, with a target movement speed of 1m / s and a volume of 0.15m³."

[0125] Historical comparison: "The score increased by 200 points compared to the last training session, the CV% decreased by 3%, and the accuracy% increased by 5%."

[0126] Technical principle: Report generation: The backend server extracts the user's training data (Qrel sequence, S(t) sequence, θ sequence) from the MySQL database, calculates CV% (Qrel coefficient of variation), accuracy% (number of hits / total number of exhalations), and average Qexp_rel, and generates a report.

[0127] Historical comparison: The backend server retrieves the user's last training data from the database, compares it with the current data, and calculates the differences (such as the increase in integral and the decrease in CV%).

[0128] Result: The user saw their progress, clicked the "Share" button, and shared the report to their WeChat Moments ("I scored 600 points in VR breathing training and upgraded to intermediate shooter!"), receiving 12 likes from friends.

[0129] IV. System Communication and Data Flow The following outlines the communication methods and data flow between the various modules of the system to ensure data real-time performance and security: (a) Communication methods Inter-module communication Communication Protocol Data rate Delay requirements Breathing sensor → VR device Bluetooth 4.0 100Hz (Qactual / Qexp) ≤100ms VR devices → Mini Programs Wi-Fi 6 1Mbps (integration, theta, Qrel) ≤200ms Mini Program → Backend Server HTTPS (TLS 1.3) 100Kbps (user information, training data) ≤500ms Backend server → Mini Program HTTPS (TLS 1.3) 10Kbps (Difficulty parameter, report) ≤500ms (ii) Data flow (e.g.) Figure 3 (The training data shown is an example) Data collection: The respiratory sensor collects Qactual (60L / min), and the VR device collects head posture data (yaw=20 degrees).

[0130] Processing: The VR application calculates Qrel=0.833 (60 / 72), S(t)=0.0125 (every 100ms), and θ=5 degrees (the angle between the head direction vector and the target vector).

[0131] Upload: The VR application transmits Qrel, S(t), and θ data to the mini-program via Wi-Fi, and the mini-program transmits the data to the backend server via HTTPS.

[0132] Storage: The backend server stores the data in a MySQL database (table name: training_data, fields: user_id, qrel, s_t, theta, create_time).

[0133] Analysis: The backend server calls the AI ​​model (random forest), inputs the total score (600 points), CV% (12%), and accuracy% (75%), and outputs the difficulty parameters (V_target=150 points, v_target=1m / s).

[0134] Feedback: The backend server transmits the difficulty parameters to the mini-program, which in turn transmits them to the VR application. The VR application then adjusts the target parameters for the next round.

[0135] V. Technical Effect Analysis (Comparison with Background Technology) Compared to the background technology (simple "traffic-action" mapping, no quantitative feedback, and no dynamic difficulty), this solution has the following significant technical advantages: (a) Improve training compliance (≥80%) Quantitative feedback: Quantitative indicators such as points, extra points, and level upgrades allow users to clearly see their progress (e.g., "total points increased from 0 to 600, and leveled up to intermediate archer").

[0136] Fun factor: Cute virtual characters (elephants, whales), vibrant scenes (forests, oceans), and highly interactive objectives (fruits, balloons) increase the fun of training (40% increase in child user participation).

[0137] Incentive mechanisms: badge wall, sharing function (sharing achievements in WeChat Moments), to meet users' social needs (user sharing rate ≥70%).

[0138] (ii) Promote correct breathing techniques (lung function improvement rate ≥20%) Inspiratory stability: By accumulating the integral S(t), the user is encouraged to take a deep breath (Qrel≥0.8), thereby reducing the inspiratory stability CV% (from ≥15% in the background technology to ≤12%).

[0139] Expiratory stability: By requiring Qexp_rel (≥0.7) and θ (≤10 degrees), users are encouraged to exhale slowly and maintain the correct posture (the coefficient of variation of expiratory flow is reduced by 30%).

[0140] Posture Combination: Integrating exhalation with head aiming promotes correct breathing posture (such as sitting upright and relaxing shoulders), reducing the use of accessory respiratory muscles (reducing energy consumption by 25%).

[0141] (iii) Adapting to different user levels (covering children / adults) Dynamic difficulty: Adjust the scene difficulty in real time based on the user's training performance (score, stability, accuracy) (e.g., the target size is large and the movement speed is slow for children, while the target size is small and the movement speed is fast for adults) to ensure that the user is always in the "zone of proximal development" (challenge and ability are matched).

[0142] Versatility: Supports multiple breathing sensors (chest strap, mouth and nose mask) and multiple VR devices (Pico Neo 3, MetaQuest 2), suitable for different groups such as children (asthma, pneumonia) and adults (COPD, postoperative rehabilitation) (covering more than 90% of lung function rehabilitation users).

[0143] (iv) Convenience in home settings (saving ≥50% of time costs) Portable device: The VR glasses (Pico Neo 3) are lightweight (500g) and easy to carry. The breathing sensor (chest strap type) is easy to wear (no need for large hospital equipment).

[0144] Simple to use: The WeChat mini program has a simple interface, and users can complete the training in just 3 steps (connect device → select scene → start training), without the need for professional guidance (reducing the usage threshold by 60%).

[0145] (v) Data traceability (improving doctors' diagnostic efficiency by ≥30%) Historical data: The mini-program stores the user's historical training data (score, CV%, accuracy%). Doctors can view the user's training progress through the mini-program (e.g., "In the past month, the user's CV% has decreased from 15% to 12%, indicating that the inhalation is more stable").

[0146] Report generation: The training report (summary, respiratory indicators, historical comparison) generated by the mini program can serve as a basis for doctors to adjust the rehabilitation plan (e.g., "The user's accuracy% is low, and aiming training needs to be increased").

[0147] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 4 As shown, optionally, electronic device 410 may include a first processor 2001.

[0148] Optionally, the electronic device 410 may also include a memory 2002 and a transceiver 2003.

[0149] The first processor 2001, memory 2002, and transceiver 2003 can be connected via a communication bus.

[0150] The following is combined with Figure 4 A detailed description of each component of electronic device 410 is provided below: The first processor 2001 is the control center of the electronic device 410. It can be a single processor or a collective term for multiple processing elements. For example, the first processor 2001 can be one or more central processing units (CPUs), application-specific integrated circuits (ASICs), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).

[0151] Optionally, the first processor 2001 can perform various functions of the electronic device 410 by running or executing software programs stored in the memory 2002 and calling data stored in the memory 2002.

[0152] In a specific implementation, as one example, the first processor 2001 may include one or more CPUs, for example... Figure 4 CPU0 and CPU1 are shown in the diagram.

[0153] In a specific implementation, as one example, the electronic device 410 may also include multiple processors, for example... Figure 4 The first processor 2001 and the second processor 2004 are shown in the diagram. Each of these processors can be a single-core processor or a multi-core processor. Here, a processor can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).

[0154] The memory 2002 is used to store the software program that executes the present invention, and is controlled by the first processor 2001 to execute it. The specific implementation method can be referred to the above method embodiment, and will not be repeated here.

[0155] Optionally, the memory 2002 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 2002 may be integrated with the first processor 2001 or may exist independently and be connected via the interface circuit of the electronic device 410. Figure 4 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.

[0156] The transceiver 2003 is used to communicate with network devices or with terminal devices.

[0157] Alternatively, transceiver 2003 may include a receiver and a transmitter. Figure 4 (Not shown separately). The receiver is used to implement the receiving function, and the transmitter is used to implement the transmitting function.

[0158] Optionally, the transceiver 2003 can be integrated with the first processor 2001, or it can exist independently and be connected via the interface circuit of the electronic device 410. Figure 4 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.

[0159] It should be noted that, Figure 4 The structure of the electronic device 410 shown does not constitute a limitation on the router. Actual knowledge structure identification devices may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0160] Furthermore, the technical effects of the electronic device 410 can be referred to the technical effects of the virtual reality breathing interaction model and implementation method based on integral feedback described in the above method embodiments, and will not be repeated here.

[0161] It should be understood that the first processor 2001 in the embodiments of the present invention may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0162] It should also be understood that the memory in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0163] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable system. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.

[0164] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.

[0165] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.

[0166] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0167] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0168] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, systems, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0169] In the embodiments provided by this invention, it should be understood that the disclosed devices, systems, and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, or other forms.

[0170] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0171] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0172] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0173] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A virtual reality breathing interaction model and implementation method based on integral feedback, characterized in that, The method includes: The user's inspiratory flow rate Qactual and expiratory flow rate Qexp are collected using a respiratory sensor; The collected respiratory flow signals are preprocessed, including filtering, zero-point calibration, and temperature and humidity compensation. Dynamic calibration is performed based on the preprocessed respiratory flow signal to generate individualized calibration parameters, including maximum inspiratory flow rate Qmax and maximum expiratory flow rate Qmax_exp. Calculate the relative inspiratory flow rate Qrel = Qactual / Qmax and the relative expiratory flow rate Qexp_rel = Qexp / Qmax_exp; The integral S(t) = S(t-1) + k·Qrel·Δt is calculated in real time based on the relative inhalation flow rate Qrel, where k is the integration coefficient and Δt is the sampling time. Interactive actions in the virtual scene are driven by the integral S(t); When the score reaches the preset threshold, the exhalation aiming phase begins; The aiming accuracy θ and additional integral are calculated by combining head posture data and expiratory flow data; The scene difficulty parameters are dynamically adjusted based on the user's training performance.

2. The method according to claim 1, characterized in that, The dynamic calibration steps include: Initial calibration process: prompt the user to perform maximum inhalation and maximum exhalation, collect peak flow data and calculate Qmax and Qmax_exp; Periodic update mechanism: The calibration process is automatically triggered after each preset number of training sessions to update the Qmax and Qmax_exp parameters.

3. The method according to claim 1, characterized in that, In the integral calculation step: The integration coefficient k is adjusted according to the user's age: k=0.15 for children and k=0.1 for adults. The sampling time Δt = 100ms, and the integral is updated 10 times per second; The integration threshold Sth = 100, and the exhalation phase is triggered when S(t) ≥ Sth.

4. The method according to claim 1, characterized in that, The virtual scene interaction steps include: The movement speed of the virtual character is controlled by the relative inhalation flow rate Qrel, and the water absorption speed v = v0*Qrel, where v0=0.5m / s; The water volume display in the virtual scene is controlled by the integral S(t), where the water volume V = V0·S(t) / Sth, and V0=1L.

5. The method according to claim 1, characterized in that, The exhalation aiming step includes: Head posture data is collected using VR devices, and the head Euler angles are obtained by Kalman filtering and fusion. Transform the Euler angles into a head direction vector (dx, dy, dz); Calculate the angle θ between the head direction vector and the target vector; Additional integrals are calculated based on the θ value and the relative expiratory flow rate Qexp_rel.

6. The method according to claim 5, characterized in that, The additional integral is calculated using the following formula: Additional integral = base integral × Qexp_rel × (1 - θ / 90), where the base integral = 10 points.

7. The method according to claim 1, characterized in that, The dynamic difficulty adjustment steps include: Collect users' total score S_total, inspiratory stability CV%, expiratory aiming accuracy%; The AI ​​model analyzes user characteristics and outputs the target water volume V_target, target movement speed v_target, target volume V_obj, and aiming time T_aim. The difficulty parameters are adjusted according to the user's level. The beginner level corresponds to V_target=100 points, v_target=0.5m / s, V_obj=0.2m³, and T_aim=3 seconds.

8. The method according to claim 1, characterized in that, It also includes data storage steps: Individualized calibration parameters, training data, and user information are stored in a local database; After user authorization, the anonymized data is uploaded to the cloud server for storage.

9. The method according to claim 1, characterized in that, The method is implemented through the collaboration of WeChat mini-programs and VR devices, including: Connect the breathing sensor and VR device via Bluetooth; Connect VR devices and mini-programs via Wi-Fi; Connect the mini-program and the cloud server via HTTPS protocol.

10. A virtual reality breathing interaction system based on integral feedback, characterized in that, include: The hardware awareness layer includes: The respiratory sensor module is used to collect inspiratory flow rate Qactual and expiratory flow rate Qexp; VR device module, used to present virtual scenes and collect head posture data; The terminal device module is used to run the user interface. The software processing layer includes: The signal preprocessing module is used to filter, calibrate, and compensate the respiratory flow signal; The integral calculation module is used to update the integral in real time based on the relative inspiratory flow rate; The virtual interaction module is used to drive scene animation based on scores and breathing data; The dynamic difficulty adjustment module is used to adjust scene parameters in real time based on user performance; The data storage layer includes: The local storage module is used for encrypted storage of user data and training records; The cloud storage module is used for long-term storage of anonymized data and user history records; The hardware perception layer is connected to the software processing layer via wireless communication, and the software processing layer communicates with the data storage layer via a network.