Pre-school children dangerous behavior early warning system and intervention method based on image recognition
By using image recognition and behavior analysis modules, the system accurately distinguishes between normal play and dangerous physical conflicts among preschool children. By combining the intensity and duration of the movements with emotional matching scores, the system solves the problem of misjudgment in existing systems, achieves efficient early warning and intervention for dangerous behaviors, and reduces the risk of accidental injuries to children.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU PRESCHOOL TEACHERS COLLEGE
- Filing Date
- 2026-03-13
- Publication Date
- 2026-06-09
AI Technical Summary
Existing image recognition-based early warning systems for dangerous behaviors in preschool children struggle to accurately distinguish between normal play and dangerous physical conflicts, resulting in a high misjudgment rate and failing to meet the security needs of preschool education institutions.
The system employs an image recognition and behavior analysis module, including child target detection, action intensity analysis, action duration analysis, and emotion matching and comprehensive risk scoring. By weighting action intensity, duration, and emotion matching scores, and combining them with thresholds to determine the nature of the behavior, it identifies high-risk behaviors such as falls and climbing.
It significantly improves the accuracy of behavior recognition, enables rapid response and efficient intervention to dangerous behaviors, and reduces the risk of accidental injury to children.
Smart Images

Figure CN122176798A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of dangerous behavior early warning technology, and in particular to a preschool children dangerous behavior early warning system and intervention method based on image recognition. Background Technology
[0002] Preschool children are generally curious but lack self-protection awareness, making them prone to dangerous behaviors such as falls, climbing, and physical conflicts during daily activities, which seriously threaten their personal safety. Currently, preschool education institutions mainly rely on teacher supervision and video surveillance for child safety protection. With the development of image recognition technology, image recognition-based early warning systems for dangerous behaviors of children have emerged. These systems collect video data through cameras and combine target detection, posture recognition, and other technologies to identify dangerous behaviors of children. However, existing systems generally have a core problem: they are difficult to accurately distinguish between normal playful behavior and dangerous physical conflict behavior of preschool children. The two types of behavior are highly similar in appearance, such as pushing and shoving in play versus pushing and hitting in conflict, or hugging in play versus suppressing in conflict. This can easily lead to misjudgment by the system, seriously reducing the accuracy and practicality of the early warning system and failing to meet the actual security needs of preschool education institutions.
[0003] Therefore, this invention proposes an image recognition-based early warning system and intervention method for dangerous behaviors in preschool children, accurately distinguishing between normal play and dangerous physical conflicts, thus solving the misjudgment problem of traditional systems. Through a professional model, target detection, posture analysis, and emotion recognition are performed. A comprehensive risk value is obtained by weighting the intensity of the action, its duration, and the emotion matching score. Combined with threshold judgment, this system can directly identify high-risk behaviors such as falls and climbing, significantly improving recognition accuracy. Summary of the Invention
[0004] The technical problem to be solved: It is difficult to accurately distinguish between normal playful behavior and dangerous physical conflict behavior of preschool children. The two types of behavior are highly similar in appearance, such as pushing and shoving in play and shoving and hitting in conflict, or hugging in play and suppressing in conflict. This can easily lead to misjudgment by the system, which seriously reduces the accuracy and practicality of the early warning system and fails to meet the actual security needs of preschool education institutions.
[0005] To address the shortcomings of existing technologies, this invention provides an image recognition-based early warning system and intervention method for dangerous behaviors in preschool children, thereby solving the technical problems mentioned in the background section.
[0006] To achieve the above objectives, the present invention provides the following technical solution: The image recognition-based early warning system for dangerous behaviors of preschool children includes a video acquisition module, an image recognition and behavior analysis module, a danger warning and alarm module, and a system management and data storage module. The video acquisition module serves as the system's data input terminal, used to collect real-time video stream data of preschool children's activities, providing high-quality raw data support for the image recognition and behavior analysis modules. The image recognition and behavior analysis module is used to accurately process the video frames transmitted by the video acquisition module, so as to accurately distinguish between children's normal play and dangerous physical conflicts. At the same time, it identifies other dangerous behaviors, sets comprehensive risk values and risk thresholds, and determines whether a child is engaged in dangerous behavior. The danger warning and alarm module is used to receive the behavior judgment results output by the image recognition and behavior analysis module, such as high-risk behavior or no-risk behavior. Based on the risk level, it generates corresponding warning information and pushes it to the monitoring personnel in various ways to realize rapid response and on-site intervention for dangerous behaviors. At the same time, it records warning-related information to provide a basis for subsequent traceability. The system management and data storage module is used to realize the overall management of the system, parameter configuration, data storage and query, and to provide comprehensive risk values. It provides support for computational optimization and stable system operation, while ensuring compliant data retention for subsequent traceability, review, and model optimization.
[0007] In one possible implementation, the image recognition and behavior analysis module includes a child target detection submodule, a motion intensity analysis submodule, a motion persistence analysis submodule, and an emotion matching and comprehensive risk scoring submodule.
[0008] In one possible implementation, the child target detection submodule performs child target detection on video frames, accurately identifies child targets in the frames, eliminates interference from adults and cluttered backgrounds, outputs the bounding box coordinates of each child target, and marks the unique ID of each child target. If multiple child targets are detected, each child target is subjected to independent motion analysis and risk scoring.
[0009] In one possible implementation, the motion intensity analysis submodule extracts key points of human posture for each child target, selects a core key point, calculates the pixel displacement distance of each core key point in consecutive video frames, sets the motion intensity scoring formula, and sets the motion intensity score for each child target.
[0010] In one possible implementation, a motion intensity score is calculated for each child's target, using a motion intensity scoring formula, to quantify the intensity of the motion.
[0011] In one possible implementation, the action persistence analysis submodule performs temporal modeling on the action intensity score. When the action intensity score is ≥0.5, it is judged as an aggressive action. An action persistence score formula is set.
[0012] In one possible implementation, a motion duration score formula is used to calculate the motion duration score for each child target, quantifying the duration of aggressive actions.
[0013] In one possible implementation, the emotion matching and comprehensive risk scoring submodule identifies the facial expressions of each child target, categorizes emotions into positive, negative, and neutral emotions, and sets an emotion matching score and an emotion matching score formula.
[0014] In one possible implementation, the image recognition and behavior analysis module performs a weighted sum of action intensity score, action duration score, and emotion matching score. By combining the risk value and risk threshold, it distinguishes between normal play and dangerous physical conflicts among children, and integrates them into the final behavior judgment result.
[0015] An intervention method based on image recognition for early warning of dangerous behaviors in preschool children includes the following steps: S1: The video acquisition module continuously acquires real-time video streams of the children's activity area. After preprocessing, the video frames are transmitted to the image recognition and behavior analysis module. The image recognition and behavior analysis module determines whether the children's behavior is dangerous physical conflict or normal play. At the same time, it directly identifies other high-risk behaviors and synchronizes the risk information of all high-risk behaviors to the danger warning and alarm module. S2: The danger warning and alarm module classifies the warning into three levels according to the degree of danger based on the received risk information, and activates the corresponding level's multi-channel push mechanism to ensure that the monitoring personnel receive the warning information as soon as possible; S3: After receiving the warning information, the guardian shall initiate the graded on-site handling procedure according to the warning level to ensure that dangerous behavior is stopped and intervened in a timely and effective manner, and to minimize the risk of accidental injury to children. S4: The system management and data storage module ensures compliant retention of all data related to this dangerous behavior, including video data, scoring data, early warnings, and handling records, which are stored long-term.
[0016] Beneficial effects compared to existing technologies: 1. In this solution, the image recognition and behavior analysis module accurately distinguishes between children’s normal play and dangerous physical conflicts, solving the problem of misjudgment in traditional systems. Through professional models, it completes target detection, posture analysis, and emotion recognition. It weights the intensity of the action, duration, and emotion matching score to obtain a comprehensive risk value. Combined with threshold judgment, it can also directly identify high-risk behaviors such as falls and climbing, greatly improving the accuracy of recognition. 2. In this solution, the danger warning and alarm module enables rapid response to dangerous behaviors. It sets three levels of warning according to the degree of danger and matches them with multi-channel push notifications. It also formulates differentiated handling procedures and response time limits accordingly. If the problem is not handled in time, the alarm will be automatically upgraded. It also retains the data of the whole process, making the intervention more efficient and standardized, and minimizing the risk of accidental injury to children. Attached Figure Description
[0017] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, the preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0018] Figure 1 This is a schematic diagram of the system framework of the present invention; Figure 2 This is a schematic diagram of the method flow of the present invention. Detailed Implementation
[0019] Preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. However, the present invention can also be implemented in various different forms, and therefore the present invention is not limited to the embodiments described below.
[0020] The technical solution in this application embodiment is to solve the problems mentioned in the background art, and the overall idea is as follows:
[0021] Example: Please refer to Figure 1 and Figure 2 As shown in the figure, this embodiment introduces a preschool children's dangerous behavior early warning system based on image recognition, including a video acquisition module, an image recognition and behavior analysis module, a danger early warning and alarm module, and a system management and data storage module.
[0022] The video acquisition module serves as the system's data input, collecting real-time video stream data of preschool children's activities. This provides high-quality raw data support for subsequent image recognition, behavior analysis, and risk scoring, while also adapting to the environmental requirements of different scenarios and reducing the impact of environmental interference on subsequent analysis.
[0023] The image recognition and behavior analysis module is the core processing unit of the system. It is used to accurately process the video frames transmitted by the video acquisition module, so as to accurately distinguish between children's normal play and dangerous physical conflicts. At the same time, it can identify other dangerous behaviors such as falling, climbing, and entering dangerous areas. The image recognition and behavior analysis module includes a child target detection submodule, a motion intensity analysis submodule, a motion persistence analysis submodule, and an emotion matching and comprehensive risk scoring submodule.
[0024] The child target detection submodule uses the YOLOv9 model to detect child targets in the preprocessed video frames, accurately identify child targets in the frames, eliminate background interference such as adults and clutter, output the bounding box coordinates of each child target, and mark the unique ID of each child target for subsequent action tracking and feature extraction. If multiple child targets are detected, each child target is analyzed and risk scored independently to avoid misjudgment caused by confusion of multiple child actions.
[0025] The motion intensity analysis submodule employs the OpenPose pose estimation algorithm to extract key points of human posture for each child target. Eight to ten core key points are selected, such as both wrists, elbows, knees, and ankles. These key points accurately reflect upper limb movements, such as punching and scratching, and lower limb movements, such as kicking and stomping. By calculating the pixel displacement distance of each core key point in two consecutive video frames, a motion intensity scoring formula is established, and the motion intensity score for each child target is set as follows: ;
[0026] The formula for scoring exercise intensity is: ; For each child's target, a score is given for the intensity of the action, with a value range of [0,1]. The closer to 1, the more intense the action, such as aggressive actions like scratching, kicking, and pushing. The closer to 0, the gentler the action, such as playful actions like hugging, holding hands, and light touching. A coefficient is calculated for the average value to eliminate the impact of differences in the number of key points on the results; The number of key human posture points involved in the calculation is 8-10. The summation symbol indicates that the displacement ratios of N key points are accumulated. The key point number, with values ranging from 1 to... ; Let be the pixel displacement distance of the i-th keypoint in two consecutive video frames. The calculation method is as follows: ; , For the first Frame number The x / y coordinates of the key points , For the first Frame number The x and y coordinates of each key point; The maximum displacement threshold for a single key point is set to 50 pixels based on experience. This is used to normalize the displacement distance to the [0,1] range and avoid numerical deviations caused by differences in camera shooting distance and image resolution. Using the motion intensity scoring formula, calculate the motion intensity score S for each child's target. a Quantify the intensity of the action.
[0027] The motion persistence analysis submodule employs a combination of ST-GCN and LSTM temporal sliding window schemes to score motion intensity. Perform time series modeling, when A value ≥0.5 is considered an aggressive action, and the actual duration of the aggressive action is set to... Set the formula for continuous scoring of actions;
[0028] The formula for scoring the duration of an action is: ; The action duration is scored, with a value range of [0,1]. The closer to 1, the longer the aggressive action lasts, and the closer to 0, the shorter the duration. This is a minimum value function, which limits the upper limit of the score to 1 to prevent the score from overflowing the [0,1] interval due to the duration of aggressive actions being too long; The actual duration of the detected aggressive action, in seconds, is calculated by the system frame by frame from the start to the end of the action. The time threshold is set at 3 seconds based on experience. According to research on preschool children's behavior, more than 90% of normal playful aggressive actions last for less than 3 seconds, while aggressive actions in dangerous conflicts last for more than 3 seconds. This is the core time limit for distinguishing between play and conflict. Using the action persistence score formula, calculate the action persistence score S for each child's goal. t Quantify the duration of aggressive actions.
[0029] The emotion matching and comprehensive risk scoring submodule uses the ResNet-18 lightweight facial emotion recognition model to identify the facial expressions of each child target and output the probability of emotions such as anger, sadness, and happiness. Emotions are categorized into positive, negative, and neutral emotions, with the probability of negative emotions set as follows: Set the emotion matching score formula;
[0030] The formula for emotion matching score is: ; The emotion matching score ranges from [0,1]. The closer to 1, the higher the match between the action and the negative emotion, such as a high probability of conflict. The closer to 0, the less negative emotion there is, such as a high probability of playfulness. This represents the probability of negative emotions detected in children by the system, with a value range of [0,1]. For the emotion weight, the empirical value is set to 1 to ensure the emotion matching score. Probability of negative emotions Quantitative consistency, maximizing the auxiliary role of the emotional dimension in judging dangerous behavior; Additionally, an optional integrated MFCC+LSTM fine-tuned voice emotion recognition model can be used to identify negative sounds such as children crying and screaming, thereby helping to improve the accuracy of emotion matching.
[0031] The image recognition and behavior analysis module scores the intensity of the action. Continuous scoring of actions Emotion matching score Perform a weighted summation and set a comprehensive risk value. Set risk thresholds This submodule distinguishes between normal play and dangerous physical conflicts among children. It also integrates the results of identifying other dangerous behaviors, such as falls, climbing, and trespassing into dangerous areas, into a final behavioral assessment. The comprehensive risk value calculation formula is set as follows: ; The comprehensive risk value, ranging from [0,1], is the final indicator for judging the nature of the behavior; The weight for action intensity is set to 0.5, which is the highest weight, because action intensity is the core feature that distinguishes the two types of behavior. The action is assigned a sustained weight of 0.3, with the next weight being less significant, to help verify the danger of the action. The emotion matching weight is set to 0.2, the lowest weight, and is used as a supplementary feature; Determine the overall risk value Then, risk thresholds will be set. =0.6, the determination rule is as follows: like ≥0.6: Determined as "dangerous physical conflict" and marked as high-risk behavior; If R < 0.6: it is judged as "normal playfulness" and marked as risk-free behavior; Meanwhile, the image recognition and behavior analysis module will also identify other dangerous behaviors such as falling, climbing, and entering dangerous areas, and directly mark them as high-risk behaviors without participating in the calculation of the overall risk value.
[0032] The danger warning and alarm module receives the behavior judgment results output by the image recognition and behavior analysis module, such as high-risk behavior or no-risk behavior. It generates corresponding warning information according to the risk level and pushes it to the monitoring personnel in various ways to realize rapid response and on-site intervention for dangerous behaviors. At the same time, it records the warning-related information to provide a basis for subsequent traceability.
[0033] The system management and data storage module is used to realize the overall management of the system, parameter configuration, data storage and query, to support the optimization of comprehensive risk value calculation and the stable operation of the system, while ensuring the compliant retention of data for subsequent traceability, review and model optimization.
[0034] Please see Figure 2 An intervention method for early warning of dangerous behaviors in preschool children based on image recognition includes the following steps: S1: The video acquisition module continuously collects real-time video streams from children's activity areas such as kindergarten classrooms, activity areas, corridors, and playgrounds. After preprocessing such as noise reduction and cropping, the video frames are transmitted to the image recognition and behavior analysis module. The image recognition and behavior analysis module calculates the child's action intensity score, action duration score, and emotion matching score, and obtains a comprehensive risk value through weighted summation. The risk threshold is used to determine whether the child's behavior is a dangerous physical conflict or normal play. At the same time, it directly identifies other high-risk behaviors such as falling, climbing to high places, and entering dangerous areas. The risk information such as the behavior type, location, real-time video clip, and child target ID of all high-risk behaviors are synchronized to the danger warning and alarm module to achieve accurate locking of risk behaviors. S2: The hazard warning and alarm module classifies warnings into three levels according to the severity of the hazard based on the received risk information, and activates the corresponding multi-channel push mechanism to ensure that monitoring personnel receive the warning information as soon as possible. 1. Emergency Warning: In response to serious dangerous behaviors such as dangerous physical conflicts, falls, climbing to high places, and entering dangerous areas, the sound and light alarms in the activity area and teachers' offices will be triggered immediately. At the same time, a warning pop-up window will appear on the teachers' mobile APP and the security room monitoring terminal, with real-time video clips of the incident. The warning information will also be pushed to the teachers on duty, security personnel and park management personnel via SMS. The warning information includes the risk type, precise location and time of the incident. 2. Warning and alert: For actions with high intensity (0.4≤ <0.5), duration close to threshold (2≤ Actions lasting less than 3 seconds but not meeting the danger assessment criteria will only trigger pop-up notifications on the teacher's app and monitoring terminal, without any audio or visual alarms, to remind teachers to pay close attention. 3. Warning and alert: For normal play with vigorous movements (0.3≤ <0.4), only displays text reminders in the teacher's app, requiring no additional response and avoiding disruption to normal teaching; All warning messages come with a one-click location function, allowing monitoring personnel to quickly view real-time monitoring footage of the incident area via their terminals, providing precise guidance for on-site response.
[0035] S3: After receiving the warning information, the guardian shall initiate the graded on-site handling procedure according to the warning level to ensure that dangerous behavior is stopped and intervened in a timely and effective manner, and to minimize the risk of accidental injury to children.
[0036] Emergency Warning and Response: On-duty teachers must arrive at the incident area within 15 seconds, with security personnel providing support simultaneously. Upon arrival, teachers must immediately stop dangerous behavior, such as separating conflicting children, helping fallen children up, and moving children climbing or entering dangerous areas to a safe location. Teachers should quickly check the children's physical condition; for minor injuries such as bumps and scrapes, use the school's first-aid kit for initial treatment. For serious injuries, contact the school doctor immediately and notify the child's parents simultaneously. If necessary, initiate the emergency medical transport procedure. During the response, a record of the situation must be kept, including the cause of the incident, the children involved, the measures taken, and the child's injuries.
[0037] Warning and alert response: The teacher on duty must pay attention to the children's behavior in the area within 30 seconds and guide the children's intense play into a gentler way of playing through verbal reminders, physical guidance, etc., in order to avoid the risk of escalation. At the same time, the teacher should record the characteristics of the children's behavior for subsequent close monitoring.
[0038] Warning and Response: Teachers can verbally remind the children in question during breaks to regulate their play behavior; no on-site intervention is required.
[0039] After on-site handling is completed, monitoring personnel must confirm the warning handling status on the system terminal, mark it as "handled," and upload the handling record to form a closed-loop management of the warning response. If the emergency warning is not confirmed and handled within 30 seconds after it is issued, the system will automatically escalate the alarm and push it to a higher level of park management personnel to ensure that no risky behavior is missed in handling;
[0040] S4: The system management and data storage module retains all data related to this dangerous behavior in compliance with regulations, including video clips before and after the incident, warning records, handling records, and information on children's injuries. Video data is stored for no less than 30 days, while scoring data, warnings, and handling records are stored long-term.
[0041] Finally, it should be noted that the above embodiments are merely examples for clearly illustrating the present invention and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A preschool children's dangerous behavior early warning system based on image recognition, characterized in that, It includes a video acquisition module, an image recognition and behavior analysis module, a hazard warning and alarm module, and a system management and data storage module; The video acquisition module serves as the system's data input, used to collect real-time video stream data of preschool children's activities, providing high-quality raw data support for the image recognition and behavior analysis modules. The image recognition and behavior analysis module is used to accurately process the video frames transmitted by the video acquisition module, so as to accurately distinguish between children's normal play and dangerous physical conflicts. At the same time, it identifies other dangerous behaviors, sets comprehensive risk values and risk thresholds, and determines whether a child is engaged in dangerous behavior. The danger warning and alarm module is used to receive the behavior judgment results output by the image recognition and behavior analysis module, such as high-risk behavior or no-risk behavior. Based on the risk level, it generates corresponding warning information and pushes it to the monitoring personnel in various ways to realize rapid response and on-site intervention for dangerous behaviors. At the same time, it records warning-related information to provide a basis for subsequent traceability. The system management and data storage module is used to realize the overall management of the system, parameter configuration, data storage and query, and to provide comprehensive risk values. It provides support for computational optimization and stable system operation, while ensuring compliant data retention for subsequent traceability, review, and model optimization.
2. The image recognition-based early warning system for dangerous behaviors in preschool children as described in claim 1, characterized in that, The image recognition and behavior analysis module includes a child target detection submodule, a movement intensity analysis submodule, a movement persistence analysis submodule, and an emotion matching and comprehensive risk scoring submodule.
3. The image recognition-based early warning system for dangerous behaviors in preschool children as described in claim 1, characterized in that, The child target detection submodule performs child target detection on video frames, accurately identifies child targets in the frames, eliminates interference from adults and cluttered backgrounds, outputs the bounding box coordinates of each child target, and marks the unique ID of each child target. If multiple child targets are detected, independent motion analysis and risk scoring are performed on each child target.
4. The image recognition-based early warning system for dangerous behaviors in preschool children as described in claim 1, characterized in that, The motion intensity analysis submodule extracts key points of human posture for each child target, selects 8-10 core key points, calculates the pixel displacement distance of each core key point in two consecutive video frames, sets the motion intensity scoring formula, and sets the motion intensity score for each child target.
5. The image recognition-based early warning system for dangerous behaviors in preschool children as described in claim 4, characterized in that, By combining the action intensity scoring formula, the action intensity score of each child's target is calculated, quantifying the intensity of the action.
6. The image recognition-based early warning system for dangerous behaviors in preschool children as described in claim 1, characterized in that, The action persistence analysis submodule performs time-series modeling on the action intensity score. When the action intensity score is ≥0.5, it is judged as an aggressive action, and an action persistence score formula is set.
7. The image recognition-based early warning system for dangerous behaviors in preschool children as described in claim 6, characterized in that, By combining the action duration score formula, the action duration score for each child target is calculated, quantifying the duration of aggressive actions.
8. The image recognition-based early warning system for dangerous behaviors in preschool children as described in claim 1, characterized in that, The emotion matching and comprehensive risk scoring submodule identifies the facial expressions of each child target, categorizes emotions into positive, negative, and neutral emotions, and sets emotion matching scores and formulas.
9. The image recognition-based early warning system for dangerous behaviors in preschool children as described in claim 1, characterized in that, The image recognition and behavior analysis module weights and sums the action intensity score, action duration score, and emotion matching score. By combining the risk value and risk threshold, it distinguishes between normal play and dangerous physical conflicts among children and integrates them into the final behavior judgment result.
10. An intervention method for early warning of dangerous behaviors in preschool children based on image recognition, implementing the system as described in any one of claims 1 to 9, characterized in that, Includes the following steps: S1: The video acquisition module continuously acquires real-time video streams of the children's activity area. After preprocessing, the video frames are transmitted to the image recognition and behavior analysis module. The image recognition and behavior analysis module determines whether the children's behavior is dangerous physical conflict or normal play. At the same time, it directly identifies other high-risk behaviors and synchronizes the risk information of all high-risk behaviors to the danger warning and alarm module. S2: The danger warning and alarm module classifies the warning into three levels according to the degree of danger based on the received risk information, and activates the corresponding level's multi-channel push mechanism to ensure that the monitoring personnel receive the warning information as soon as possible; S3: After receiving the warning information, the guardian shall initiate the graded on-site handling procedure according to the warning level to ensure that dangerous behavior is stopped and intervened in a timely and effective manner, and to minimize the risk of accidental injury to children. S4: The system management and data storage module ensures compliant retention of all data related to this dangerous behavior throughout the entire process, including long-term storage of video data, scoring data, warnings, and handling records.