Calculation method for stable participation duration of child role game
By obtaining and processing the real -time coordinate data of children in the role game, the mutual distance and stable duration between children can be calculated, and the problems of identifying the stability of the game and participating in the length of the participation are solved, and the efficient children's behavior analysis and game quality assessment have been achieved.
Patent Information
- Application Number
- CN202411359776.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-24
AI Technical Summary
In complex environments, it is still challenging to accurately calculate the duration of children's stable participation in character games to determine the stability of the game, especially the difficulty of identifying the real start and end time of the game.
By obtaining the real -time coordinate data of all children in the game time period, data pre -processing and screening are performed, the mutual distance between children is calculated, and the stable period of the game is determined through smooth processing and statistical characteristics analysis, and the average distance is stable time.
It achieves efficient processing of children's behavioral data, accurately identifies the duration of children's stable participation in role games, avoids privacy issues, and provides an effective indicator for game quality assessment.
Smart Images

Figure CN119345700A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data and behavior analysis, and in particular to a method for calculating the stable participation time of a children's role-playing game. Background Art
[0002] Kindergarten role-playing refers to a series of game behaviors that are carried out by two or more children together, focusing on a certain theme and plot, using imagination and imitation to differentiate roles and play roles (such as doll house, small hospital, small supermarket games, etc.), and creatively reflecting real life. Role-playing is of great value to the language, cognition, creativity and social development of children. Among them, group, cooperation and interactivity are important characteristics of this type of game mode. With the increasing importance of children's game analysis in education and behavior research, accurately understanding children's behavior patterns in role-playing interactions is crucial for game quality assessment and optimization of educational methods. However, traditional qualitative observation methods are highly subjective and difficult to accurately reflect the real state of the game. In recent years, the development of deep learning and computer vision technology has made data-driven analysis of children's behavior possible, but it is still challenging to accurately calculate the stable participation time of children in role-playing in complex environments to determine the stability of the game, especially to accurately identify the real start and end time of role-playing games.
[0003] Based on this, we proposed a new calculation method that can more accurately identify the game status and duration, only collect location coordinate data, avoid privacy issues, and has significant advantages in accuracy and privacy protection. Summary of the invention
[0004] The purpose of the present invention is to overcome the above problems or at least partially solve the above problems, and to propose a method for calculating the stable participation time of children's role-playing games.
[0005] To achieve the above object, the present invention provides the following technical solution: a method for calculating the stable participation time of a child role-playing game, comprising the following steps:
[0006] S1. Acquire the real-time coordinate data of all children in the game time period. The coordinates are defined by a certain point in the room as the coordinate origin. The child coordinates are acquired at fixed time intervals, such as every 1 second. Methods for acquiring the real-time coordinates of the children include but are not limited to ultra-wideband positioning technology, etc.;
[0007] S2. Preprocessing the acquired real-time coordinate data of all children, including but not limited to removing errors from the collected data;
[0008] Furthermore, one form of data error is that the data coordinates exceed the scope of the game field, which is generally handled by removing the data;
[0009] Furthermore, another form of data error is that the difference in the coordinates of the child within the range of the time difference between the previous and next adjacent collections exceeds the normal range, that is, the normal movement speed of the child is less than the ratio of the difference between the adjacent coordinates and the difference between the adjacent moments. Generally, the data is removed;
[0010] S3, according to the pre-calibrated game area coordinate range, filter out the coordinate data of the children participating in a certain role-playing game;
[0011] Furthermore, a child who participated in a certain role-playing game refers to a child whose coordinate values in the coordinate sequence appeared within the coordinate range of the game area during the entire data collection period;
[0012] S4. Excluding children who have not actually participated in the game based on the screened children's coordinate data;
[0013] Furthermore, children who do not actually participate in the game refer to those who appear in the game area briefly during the game time period, and their stay time in the game area is less than the threshold, or the ratio of their total stay time to the total game time is less than the threshold;
[0014] Furthermore, the threshold of the length of stay or the ratio of the total length of stay to the total length of the game needs to be determined based on the combined analysis of multiple game collection data;
[0015] S5. According to the children's coordinate data selected in the previous step, calculate the mutual distance between the children at each sampling moment, that is, the distance value between each child and all other children. The distance here is not limited to Euclidean distance calculation;
[0016] S6, using the above mutual distance values, according to the distance changes at the adjacent moments, remove all distance values corresponding to the moment when the distance suddenly increases significantly, and then perform smoothing on the distance data;
[0017] Furthermore, the distance between the adjacent moments suddenly increases significantly, which means that the distance between the previous moments and the next moments is larger than that between the previous moments and the next moments. The number of the previous and next moments needs to be determined based on the combined analysis of multiple game collection data;
[0018] Furthermore, the purpose of data smoothing is to facilitate the subsequent calculation of statistical features and reduce the impact of data fluctuations on the determination of stable duration.
[0019] S7. Calculate the statistical characteristics of the distance value after the above processing, including but not limited to the mean, variance, etc., and find changes in the statistical characteristics, such as changes in the first-order rate of change.
[0020] Furthermore, the sudden and substantial increase in the distance between adjacent moments generally corresponds to the child who plays the main role in the game temporarily leaving the game area and then returning. This behavior is generally not regarded as the end of a stable game;
[0021] Furthermore, the time when the children enter the stable period of the game and the time when they exit the stable period of the game are determined, and finally the average stable time of participating in the game is calculated;
[0022] Furthermore, the statistical characteristics change, which means that the distance between the children participating in the game generally changes from a stable smaller value to an unstable larger value.
[0023] Compared with the prior art, the present invention has the following beneficial effects: it can efficiently process children's behavior data, only collect and analyze location coordinate data, avoid privacy issues, and accurately identify the stable participation time of children in role-playing games, and use this as one of the evaluation indicators of game quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a schematic diagram of the structure of the present invention;
[0025] Figure 2 It is a structural schematic diagram of the present invention. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] See also Figure 1-2 The present invention provides a technical solution: a method for calculating the stable participation time of a children's role-playing game, comprising the following steps:
[0028] S1. Obtain the real-time coordinate data of all children during the game period;
[0029] During the specific implementation, the coordinate origin is defined, and the UWB positioning device is used to obtain the coordinate data of each child at fixed time intervals (every 1 second), ensuring that all coordinate data during the entire game can be collected continuously and accurately. The acquired data includes time (time), each child's ID (id) and the three-dimensional coordinate information (x, y, z) of the corresponding time point.
[0030] S2, preprocessing the acquired real-time coordinate data of all children;
[0031] In the specific implementation, the acquired data is preprocessed, including data formatting, data deduplication, and outlier processing. The specific implementation steps are as follows:
[0032] First, adjust the column names of the acquired data to ensure that the column names are time, id, x, y, and z. At the same time, use the function to deduplicate the acquired data and ensure that there is still enough data for the average distance stability duration calculation after deduplication.
[0033] By analyzing the behavioral characteristics of children, the movement threshold is set to 1.5 (i.e. 1.5m). The movement threshold refers to the maximum movement distance within the child's ability within one second. The data whose movement distance exceeds the movement threshold within one second is called an abnormal value, and the abnormal value of the previous row is filled with the normal value of the next row for processing.
[0034] Remove the coordinate data that exceeds the game area. The specific steps are as follows:
[0035] All game areas are digitally encoded, all coordinate data of the children are converted into corresponding area numbers, and a new column is added after the data column to store the area number corresponding to each coordinate data. If the area number value of a row is 0, it means that the child is not in the game area at this time, and the coordinate data of this row is removed from the data.
[0036] The data after the above processing is the data used for the subsequent calculation of the average stable time. This process aims to ensure the accuracy and effectiveness of the data and lay the foundation for subsequent analysis.
[0037] S3, according to the pre-calibrated game area coordinate range, filter out the coordinate data and game time period of the children participating in a certain role-playing game;
[0038] In specific implementation, by filtering different values of the area number column in the data processed in the previous step, the coordinate data of the children participating in a specified role-playing game can be filtered out.
[0039] Get the time period when children interact more intensively (i.e., the game time period). The specific implementation steps are as follows:
[0040] According to the change of the child's x,y coordinates, when the child's x,y coordinates begin to fluctuate significantly, this time point can be regarded as the start time of the game; and when the child's x,y coordinates no longer fluctuate, this time point can be regarded as the end time of the game. According to the start and end time, the time period of the entire game is determined, and combined with the selected child coordinate data, it is filtered and then stored as time series data.
[0041] The above steps help to accurately locate and process the data within the time period in subsequent analysis.
[0042] S4. Excluding children who have not actually participated in the game based on the screened children's coordinate data;
[0043] In the data obtained above, the total number of coordinate data of different children is counted.
[0044] Set a threshold. If the total number of coordinate data of a child with a certain ID is less than the threshold, delete all coordinate data corresponding to the ID. Ensure that only children who actually participate in the game are analyzed, thereby eliminating the interference of irrelevant data.
[0045] S5. Calculate the mutual distance between children at each sampling moment according to the children's coordinate data selected in the previous step, and delete NaN values;
[0046] Calculate the average distance of children. The specific steps are as follows:
[0047] A custom function is used to calculate the average distance between children. The function accepts a list parameter containing coordinate points. The data filtered out in step 14 is passed to the function in the subsequent use.
[0048] First, check the number of coordinate points in the list parameter. If the number is greater than 1, perform subsequent calculations; otherwise, return NaN. If the number of coordinate points in the list parameter is greater than 1, use the built-in function to calculate the pairwise distances between all points in the list parameter and return the average of these distances. If the number of coordinate points in the list parameter is not greater than 1, return NaN (indicating an invalid or incalculable value).
[0049] Group the data by the time column, select the x and y columns of each group, apply the anonymous function to each time group, pass the x and y coordinates of each group as an array to the custom function that calculates the average distance, and convert each time group into an array containing the x and y coordinates corresponding to each time point.
[0050] Remove NaN values from the average distance calculation results, which may be generated in the call to the custom average distance calculation function because there are not enough coordinates at some time points to calculate the average distance. Reset the index so that the result data frame has a continuous default integer index, and then rename the calculated average distance column.
[0051] Through the above steps, we can obtain data containing the average distance at each time point, which is used to evaluate the interactive relationship between children and their relative positions in the game, so as to facilitate further analysis and use.
[0052] S6, using the above mutual distance values, according to the distance changes at the adjacent moments, remove all distance values corresponding to the moment when the distance suddenly increases significantly, and then perform smoothing on the distance data;
[0053] Set the window size, use the adaptive window size method, calculate the standard deviation (std) of the average distance at each time point, and determine the window size based on the standard deviation. The larger the standard deviation, the greater the data fluctuation, and the smaller the window should be; the smaller the standard deviation, the more stable the data, and the larger the window should be;
[0054] Set the initial window size to a fixed value (such as 5 time points), and slide the window for calculation at each time point. For each sliding window, calculate the standard deviation of the average distance in the window. If the standard deviation exceeds the preset threshold, reduce the window size (such as reducing 1 time point); if the standard deviation is lower than the preset threshold, increase the window size (such as adding 1 time point). Calculate the average distance in the window based on the adjusted window size and record it;
[0055] Repeat the above steps until the sliding window traverses the entire time series and generates smoothed average distance data with adaptive window size. The final smoothed average distance data is used for subsequent stability analysis.
[0056] S7, calculating the statistical characteristics of the distance value after the above processing, confirming the time when the child enters the stable period of the game, and the time when the child exits the stable period of the game, and calculating the average distance stable time of the child participating in a certain role-playing game;
[0057] Set a stability threshold (i.e., the stability threshold ε of the average distance). This threshold can be set according to actual needs and game rules. The stability threshold means that when the distance between children is less than the threshold within a certain period of time in the game, it is considered to be in a stable state;
[0058] Calculate the mean and variance of the children's distance values and monitor the changes in these statistical features. When the first-order rate of change (i.e., the rate of change of the mean or variance) changes significantly, mark it as the moment of entering or exiting the stable period. Based on these moments, determine whether the children are in the stable period of the game;
[0059] Confirm the time when the child enters the stable period of the game and the time when the child exits the stable period of the game. The specific implementation steps are as follows: take the first stable time point (less than the stable threshold ε) as the start time of the stable period of the game, compare the average data after the first stable time point appears with the stable threshold ε, remove all time points greater than the threshold and their corresponding average distance data, and fill them with NaN;
[0060] The distance between the previous and next adjacent moments suddenly increases significantly, which generally corresponds to the child who plays the main role of the game temporarily leaving the game area and then returning. This behavior is generally not regarded as the end of a stable game. A time threshold μ is set, and the start time of the first NaN time period whose duration exceeds the time threshold μ is taken as the end time of the stable period of the game by calculating the NaN value time period.
[0061] Calculate the difference between the start time and the end time of the stable period of the game, which is the stable participation time of the children during the role-playing game.
[0062] Through these steps, the present invention can accurately calculate the stable participation duration of children during role-playing games, and provide technical support for the analysis and research of children's game behaviors.
[0063] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for calculating the stable participation time of a children's role-playing game, characterized in that: The following steps are involved: S1. Acquire the real-time coordinate data of all children in the game time period, wherein the coordinates are defined by a certain point in the room as the coordinate origin, and the child coordinates are acquired at fixed time intervals; S2. Preprocessing the acquired real-time coordinate data of all children. The data preprocessing includes but is not limited to removing errors from the collected data. S3, according to the calibrated game area coordinate range, filter out the coordinate data of the children participating in a certain role-playing game; S4. Excluding children who have not actually participated in the game based on the screened children's coordinate data; S5, calculating the mutual distance between the children at each sampling moment according to the coordinate data of the children excluded and filtered out in S4, that is, the distance value between each child and all other children; S6, using the mutual distance values between the children in S5, according to the distance changes at adjacent moments, removing all distance values corresponding to the moment when the distance suddenly increases significantly, and then smoothing the distance data; S7. Calculate statistical characteristics of the distance value processed in S6, including but not limited to the mean and variance, and find changes in the statistical characteristics.
2. The method for calculating the stable participation time of a role-playing game for young children according to claim 1, characterized in that: In S2, one form of data error is that the data coordinates exceed the range of the game field.
3. The method for calculating the stable participation time of a role-playing game for young children according to claim 2, characterized in that: In S2, another form of data error is that the difference in child coordinates within the range of adjacent acquisition time differences exceeds the normal range, that is, the normal movement speed of a child is less than the ratio of the adjacent coordinate difference to the adjacent time difference.
4. The method for calculating the stable participation time of a role-playing game for young children according to claim 3, characterized in that: In S3, a child who participates in a role-playing game refers to a child whose coordinate sequence has coordinate values that appear within the coordinate range of the game area during the entire data collection period.
5. The method for calculating the stable participation time of a role-playing game for young children according to claim 4, characterized in that: In S4, the child who does not actually participate in the game refers to a child who briefly appears in the game area during the game time period, and the length of time he stays in the game area is less than a threshold, or the ratio of the total length of time he stays in the game to the total length of time of the game is less than a threshold.
6. A method for calculating the stable participation time of a children's role-playing game according to claim 5, characterized in that: In the above S6, the distance between the adjacent moments suddenly increases significantly, which means that the distance values are larger than those of the previous moments and the next moments.
7. A method for calculating the stable participation time of a role-playing game for children according to claim 6, characterized in that: In S7, the change in the statistical feature refers to the change in the distance between the children participating in the game from a stable smaller value to an unstable larger value.