Intelligent cervical vertebra angle identification method and device, electronic equipment and readable storage medium
By combining forward and backward filtering, standardization and normalization, as well as the use of variational autoencoders and deep learning models, the data quality and recognition accuracy of intelligent cervical vertebra angle recognition technology are improved, and the existing technology is solved. It solves the problems of reduced recognition accuracy and unintuitive feedback, and achieves the effect of users correcting their posture in time.
Patent Information
- Application Number
- CN202410939674.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-09-06
AI Technical Summary
Existing intelligent cervical vertebra angle recognition technology has deficiencies in data preprocessing and model recognition accuracy. In particular, the recognition accuracy decreases when complex posture changes occur, and the feedback method is not intuitive enough, which affects users' timely posture correction.
Use recursive iterative Gaussian filtering that combines forward and backward filtering to reduce noise complexity and improve data quality; improve the accuracy of feature extraction through standardization and normalization; use variational autoencoders and deep learning models Train feature data to improve model recognition accuracy and provide real-time feedback warnings through electronic devices.
Significantly improves the quality of data collection and model recognition accuracy, ensuring that users can receive effective prompts in a timely manner, correct the angle of the cervical spine, and prevent the occurrence of cervical spondylosis.
Smart Images

Figure CN118606633A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular to an intelligent cervical vertebra angle recognition method, device, electronic device and computer-readable storage medium. Background Art
[0002] With the continuous development of science and technology, computer vision and machine learning technologies have been widely used in various fields. Especially in the field of medical health, these technologies are also used to monitor and analyze the user's posture and body shape to prevent the occurrence of some chronic diseases. Among them, intelligent recognition of the cervical angle during writing and reading is an important research direction. The mathematical model established by machine learning technology can monitor and analyze the user's posture in real time, which can help users maintain the correct posture and prevent the occurrence of cervical spondylosis. However, the existing technology may have deficiencies in data preprocessing, resulting in low data quality and affecting the accuracy of the model. Secondly, the existing mathematical model may not be able to handle complex postures and body shapes well, especially when the user's body posture changes significantly, the recognition accuracy of the mathematical model may decrease. In addition, the existing technology may not be intuitive and effective in providing feedback or warnings, and the user may not get effective prompts in time, so as to effectively correct his posture. Therefore, how to improve the quality of data acquisition and the accuracy of mathematical model recognition so that users can correct their posture in time according to effective prompts has become an urgent problem to be solved. Summary of the invention
[0003] The present application provides an intelligent cervical vertebra angle recognition method, device, electronic device and readable storage medium to improve the quality of data collection and the accuracy of mathematical model recognition, so that users can correct their posture in time according to effective prompts.
[0004] In a first aspect, the present application provides an intelligent cervical vertebra angle recognition method, the method comprising: Acquire target data, wherein the target data includes first posture data and second posture data; Performing forward filtering on the target data to obtain first filtered data corresponding to the target data; Performing a backward filtering process on the first filtered data to obtain second filtered data corresponding to the first filtered data; performing standardization processing and normalization processing on the second filtered data in sequence to obtain preprocessed data corresponding to the target data; Performing a feature extraction operation on the preprocessed data to determine feature data corresponding to the preprocessed data; Training the feature data and feature labels corresponding to the feature data to obtain a target data model between the feature data and the feature labels; According to the target data model, angle information of the cervical vertebra is identified.
[0005] In a second aspect, the present application also provides an intelligent cervical vertebra angle recognition device, the device comprising: A target data acquisition module, used to acquire target data, wherein the target data includes first posture data and second posture data; A first filter data determination module, configured to perform forward filtering on the target data to obtain first filter data corresponding to the target data; A second filter data determination module, configured to perform a back-filtering process on the first filter data to obtain second filter data corresponding to the first filter data; A pre-processed data determination module, used to sequentially perform standardization processing and normalization processing on the second filtered data to obtain pre-processed data corresponding to the target data; A feature data determination module, used to perform a feature extraction operation on the preprocessed data to determine feature data corresponding to the preprocessed data; A target data model determination module, used for training the feature data and the feature labels corresponding to the feature data to obtain a target data model between the feature data and the feature labels; The angle information recognition module is used to recognize the angle information of the cervical vertebra according to the target data model.
[0006] In a third aspect, the present application also provides an electronic device, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the intelligent cervical angle recognition method as described above when executing the computer program.
[0007] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the intelligent cervical angle recognition method as described above.
[0008] The present application discloses an intelligent cervical angle recognition method, device, electronic device and readable storage medium, the intelligent cervical angle recognition method includes: obtaining target data, the target data includes first posture data and second posture data; performing forward filtering on the target data to obtain first filtered data corresponding to the target data; performing backward filtering on the first filtered data to obtain second filtered data corresponding to the first filtered data; performing standardization and normalization on the second filtered data in sequence to obtain pre-processed data corresponding to the target data; performing feature extraction operations on the pre-processed data to determine the feature data corresponding to the pre-processed data; training the feature data and the feature labels corresponding to the feature data to obtain a target data model between the feature data and the feature labels; and identifying the angle information of the cervical vertebra according to the target data model. In the intelligent cervical angle recognition method, by obtaining the target data and performing forward filtering and backward filtering on the target data in sequence, the noise of the target data is reduced. Compared with the traditional noise removal method with higher complexity, the recursive iterative Gaussian filtering greatly reduces the complexity of calculation and can remove the noise of the target data more quickly. Then, through preprocessing operations and feature extraction operations, feature data is obtained, which improves the quality of data collection. Further, the obtained feature data and the labels corresponding to the feature data are trained to obtain the target data model, which improves the accuracy of mathematical model recognition. Finally, according to the target data model, the angle information of the cervical vertebra is identified, and the angle information of the user's cervical vertebra can be identified in time, so that the user can adjust the angle information of the cervical vertebra in time, thereby achieving the purpose of effectively preventing the occurrence of cervical spondylosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0010] FIG1 is a schematic flow chart of an intelligent cervical vertebra angle recognition method provided in an embodiment of the present application; Figure 2 is a schematic block diagram of an intelligent cervical vertebra angle recognition device provided in an embodiment of the present application; FIG3 is a schematic block diagram of the structure of an electronic device provided in an embodiment of the present application; FIG4 is a schematic block diagram of a filtering process provided by an embodiment of the present application; Figure 5 is a schematic block diagram of the structure of a convolutional neural network provided in an embodiment of the present application; FIG6 is a schematic block diagram of the structure of a recurrent neural network provided in an embodiment of the present application. DETAILED DESCRIPTION
[0011] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0012] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0013] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0014] It should be further understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0015] The embodiments of the present application provide an intelligent cervical vertebra angle recognition method, device, electronic device and readable storage medium. The intelligent cervical vertebra angle recognition method can be applied to a server, wherein the server can be an independent server or a server cluster.
[0016] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0017] Please refer to Figure 1 , Figure 1 A schematic flow chart of an intelligent cervical vertebra angle recognition method provided in an embodiment of the present invention.
[0018] like Figure 1 As shown, the intelligent cervical vertebra angle recognition method includes steps S101 to S107.
[0019] S101. Acquire target data, where the target data includes first posture data and second posture data.
[0020] Specifically, the first posture data is the angle information of the cervical spine, and the second posture data is the posture information of the body.
[0021] Specifically, the target data is the user's body posture and the cervical vertebrae angles corresponding to different body postures.
[0022] For example, the user's body posture when writing, reading or doing other activities can be captured in real time by a camera. According to different body postures, the cervical vertebra angles corresponding to different body postures are obtained, and then the target data is obtained.
[0023] Exemplarily, the target data may also be acquired through a sensor, wherein the sensor may be any one of an angle sensor, a position sensor, and the like.
[0024] It should be noted that the above-mentioned method of obtaining target data through cameras and sensors is merely an exemplary description of the embodiments of the present application. In actual applications, any suitable method can be selected to obtain target data according to specific circumstances, and the present application does not impose any restrictions on this.
[0025] S102: Perform forward filtering on the target data to obtain first filtered data corresponding to the target data.
[0026] Exemplarily, after the target data is obtained, the target data is input to a signal input port of a preset filter, forward filtering is performed in the preset filter, and first filtered data after the forward filtering is obtained.
[0027] In some embodiments, the expression corresponding to the forward filtering process is: ; in, represents the first filtered data, represents the target data, represents the first coefficient, represents the second coefficient, represents the third coefficient, represents the fourth coefficient, represents the current coefficient, .
[0028] Based on the expression corresponding to the forward filtering process, the forward filtering process of the target signal can be realized.
[0029] It should be noted that the preset filter may be any suitable filter with a recursive iteration function, and this application does not impose any limitation on this.
[0030] S103: Perform a backward filtering process on the first filtered data to obtain second filtered data corresponding to the first filtered data.
[0031] Exemplarily, after the target data is forward filtered by a preset filter to obtain first filtered data, the first filtered data is further backward filtered in the preset filter to obtain second filtered data after the backward filtering.
[0032] In some embodiments, the expression corresponding to the back-filtering process is: ; in, Represents the second filtered data.
[0033] The specific process of filtering the target data can be referred to Figure 4 .
[0034] S104, performing standardization processing and normalization processing on the second filtered data in sequence to obtain preprocessed data corresponding to the target data.
[0035] Specifically, after performing a back-filtering process on the second filtered data to obtain the second filtered data, Then, the second filtered data is standardized and normalized to obtain preprocessed data corresponding to the target data.
[0036] In some embodiments, the step of sequentially performing standardization and normalization processing on the second filtered data to obtain preprocessed data corresponding to the target data includes: the expression corresponding to the standardization processing is: ; in, is the standardized data after the standardization process, The second filtered data is the mean of the second filtered data, σ is the standard deviation of the second filtered data; The normalization process includes: determining a preset data interval, scaling the standardized data to the preset data interval, and obtaining the preprocessed data corresponding to the standardized data.
[0037] Specifically, according to the expression corresponding to the standardization processing, the specific process of obtaining the second filtered data for standardization processing is as follows: first, according to all the second filtered data, the mean of all the second filtered data is determined. Then, the standard deviation σ of the second filtered data is determined according to the standard deviation calculation formula. The standard deviation calculation formula is: ; in, , ...... Respectively represent the second filtering data, Indicates the number of second filtered data.
[0038] According to the expression corresponding to the standardization process, the second filtered data , ...... Substitute into the expression corresponding to the normalization process to obtain the second filtered data , ...... The corresponding standardized data after standardization , ...... .
[0039] Next, the standardized data is continuously scaled to obtain the pre-processed data corresponding to the standardized data. Specifically, a preset interval is determined, and the preset interval can be set to any appropriate preset interval such as [0, 1], [0, 2], etc.
[0040] Taking the preset interval [0,1] as an example, if the standardized data after standardization is [10, 12, 8, 7, 14], then after scaling the above standardized data within the preset interval [0,1], the obtained preprocessed data is [0.5, 0.6, 0.4, 0.35, 0.7].
[0041] After the target data is subjected to denoising, standardization and scaling in turn, higher quality preprocessed data can be finally obtained.
[0042] It should be noted that the specific values of the above preset intervals can be reasonably set as needed, and this application does not impose any restrictions on this.
[0043] S105: Perform a feature extraction operation on the preprocessed data to determine feature data corresponding to the preprocessed data.
[0044] Specifically, a feature extraction operation may be performed on the preprocessed data based on a variational auto-encoder (VAE) to determine feature data corresponding to the preprocessed data.
[0045] Among them, VAE consists of two parts: encoder and decoder. The encoder is used to map the preprocessed data into the latent space and generate the mean vector l-μ and variance vector l-σ of the latent variables (LV). The decoder is used to receive the latent variables, map the latent variables back to the original data space, and generate reconstructed data, that is, the output of the decoder is the reconstructed preprocessed data.
[0046] In some embodiments, performing a feature extraction operation on the preprocessed data to determine feature data corresponding to the preprocessed data includes: mapping the preprocessed data to a latent space according to a preset feature extraction model to generate a latent vector, and using the latent vector as the feature data; the expression corresponding to the preset feature extraction model is: ; Where F represents the feature extraction function, which preprocesses the data Mapped into the feature space, represents preprocessed data, Represents the encoding function in the preset feature extraction model, which preprocesses the data Mapped into the latent space, Represents the potential vector, i.e., feature data.
[0047] The preset feature extraction model is an encoder, which is any suitable encoder for outputting the mean vector l-μ and variance vector l-σ of the latent variables.
[0048] Exemplarily, the preset feature extraction model maps the received preprocessed data into the latent space to generate the mean vector l-μ and variance vector l-σ of the latent variables. Then, the decoder in the VAE can receive The mean vector l-μ and the variance vector l-σ are mapped to the original data space to generate reconstructed data. In other words, the decoder outputs the reconstructed preprocessed data corresponding to the mean vector l-μ and the variance vector l-σ.
[0049] Furthermore, after obtaining the reconstructed preprocessed data corresponding to the decoder output mean vector l-μ and variance vector l-σ, the decoder outputs reconstructed data close to the original preprocessed data through the loss function design step.
[0050] Specifically, the loss function design steps include two parts: reconstruction loss (RL) and KL (Kullback–Leibler) divergence regularization. The first part: reconstruction loss, in this step, is used to measure the difference between the reconstructed data and the original preprocessed data. Specifically, any suitable loss function such as mean square error or mean absolute error can be used. The second part: KL divergence regularization is used to make the distribution of the mean vector l-μ and variance vector l-σ generated by the encoder close to the standard normal distribution. Specifically, KL divergence can be used as a regularization term to learn the mean vector l-μ and variance vector l-σ generated by the encoder to better represent the data. Furthermore, the reconstructed data of the original preprocessed data obtained after decoding is used to train the designed variational autoencoder model. During the training process, the loss function used in the reconstruction loss step is continuously optimized so that the encoder can learn the appropriate latent representation of the mean vector l-μ and the variance vector l-σ of the latent variables, and output the optimized mean vector l-μ and the variance vector l-σ of the latent variables to the decoder, so that the decoder generates reconstructed data close to the preprocessed data.
[0051] After the training is completed, the encoder part is used to perform feature extraction operations from the preprocessed data. Specifically, the expression corresponding to the preset feature extraction model can be: Perform feature extraction on the preprocessed data. F represents the feature extraction function. Mapped into the feature space, represents preprocessed data, Represents the encoding function in the preset feature extraction model, which preprocesses the data Mapped into the latent space, Represents the potential vector, i.e., feature data.
[0052] Therefore, based on the above steps, the variational autoencoder can perform feature extraction operations on the preprocessed data and obtain corresponding feature data. These feature data can be used to train the target data model and then identify the angle information of the cervical vertebra.
[0053] S106, training the feature data and the feature labels corresponding to the feature data to obtain a target data model between the feature data and the feature labels. The mean vector l-μ of the latent variable can be regarded as a feature representation of the preprocessed data, and l-σ represents the distribution characteristics of the preprocessed data in the latent space.
[0054] Exemplarily, the feature data and the feature labels corresponding to the feature data may be trained by a machine learning algorithm to obtain a target data model between the feature data and the feature labels. For example, machine learning algorithms include supervised learning, unsupervised learning, semi-supervised learning, weakly supervised learning, etc.
[0055] Exemplarily, the feature data and the feature labels corresponding to the feature data may be trained by means of logistic regression in supervised learning to obtain a target data model between the feature data and the feature labels.
[0056] In some embodiments, the training of the feature data and the feature labels corresponding to the feature data to obtain a target data model between the feature data and the feature labels includes: The feature data and the feature labels corresponding to the feature data are trained based on a logistic regression method to obtain a candidate data model; the trained candidate data model is evaluated according to a preset loss function to obtain a loss value of the candidate data model after evaluation; if the loss value is greater than a preset loss threshold, the candidate data model is updated until the loss value is less than or equal to the preset loss threshold, and the corresponding candidate data model is the target data model; if the loss value is less than or equal to the preset loss threshold, the candidate data model is directly determined as the target data model; Among them, the expression corresponding to the preset loss function is: ; represents the loss value, represents the logistic regression value, represents the probability value after logistic regression, and m represents the logistic regression value and / or the number of probability values after logistic regression.
[0057] For example, the expressions corresponding to the logistic regression method are: Linear regression expression: ,in, Represents the linear regression value corresponding to the feature data, Respectively represent the corresponding weights, and c represents the bias value. Based on this formula, linear regression calculation can be performed on the feature data to obtain the linear regression value corresponding to the feature data and the feature label corresponding to the feature data.
[0058] Next, a logistic regression calculation is performed on the linear regression value corresponding to the feature data and the feature label corresponding to the feature data according to the Sigmoid function to obtain a logistic regression value, wherein the expression of the Sigmoid function is: , represents the linear regression value, Represents the logistic regression value obtained according to the Sigmoid function, and the logistic regression values obtained according to the Sigmoid function are all in the interval [0,1].
[0059] Then, determine the logistic regression threshold, which can be any suitable value in the interval [0,1]. Assign the obtained logistic regression value according to the determined logistic regression threshold. For example, assuming that the logistic regression threshold is 0.5, then according to the assignment rule, assign a logistic regression value greater than 0.5 to 1, and assign a logistic regression value less than or equal to 0.5 to 0. Then assign all logistic regression values according to the assignment rule to obtain the probability value after logistic regression, and the corresponding candidate data model is now established.
[0060] It should be noted that the above-mentioned logistic regression threshold of 0.5 and the assignment rules are exemplary illustrations in the embodiments of this application. The specific value of the logistic regression threshold and the corresponding assignment rules can be reasonably set according to the actual application scenario, and this application does not impose any restrictions on this.
[0061] Assume that the user's head is the coordinate origin, the positive direction of the x-axis is vertically upward from the user's head as the coordinate origin, and the positive direction of the y-axis is horizontally forward from the user's head as the coordinate origin to establish a coordinate system. When the user's cervical spine is bent, the angle between the user's cervical spine and the positive direction of the x-axis is the feature data corresponding to the cervical angle. For example, if the feature label is the feature data of cervical angle [30°, 15°, 20°, 45°], the collected cervical angles of the user are 30°, 15°, 20°, and 45° respectively. Then, the logistic regression value is assigned according to the above linear regression expression, Sigmoid function and appropriate assignment rules, and finally the probability value after logistic regression is obtained. At this time, the candidate data model corresponding to the feature label of cervical angle and the feature data of cervical angle is established.
[0062] It should be noted that the candidate feature model can also be obtained based on multiple feature data such as feature labels such as head posture, shoulder position, etc., and feature data corresponding to the head posture and feature data corresponding to the shoulder position, and this application does not impose any restrictions on this.
[0063] After the candidate data model is established, the trained candidate data model can be evaluated using a preset loss function to obtain a loss value of the evaluated candidate data model.
[0064] For example, if the logistic regression values obtained based on the Sigmoid function are: 0.4, 0.8, 0.4, 0.5, the corresponding logistic regression threshold is 0.5, and the assignment rule is to assign a logistic regression value greater than 0.5 to 1, and a logistic regression value less than or equal to 0.5 to 0. Then all logistic regression values are assigned according to the assignment rule, and the probability values after logistic regression are 0, 1, 0, 0. Then, according to the preset loss function, the calculated loss value is -1.80.
[0065] If the preset loss threshold is set to -2, then the loss value -1.80 is greater than the preset loss threshold. The candidate data model does not meet the requirements and needs to be updated again. When updating the candidate data model again, the loss value after evaluating the candidate data model can be reduced by recollecting the target data, modifying the weights in the linear regression expression, and determining the appropriate logistic regression threshold, until the loss value is less than or equal to the preset loss threshold, and the corresponding candidate data model is the target data model.
[0066] On the contrary, if the preset loss threshold is set to -1, the loss value is less than the preset loss threshold, and the candidate data model under the loss value can be directly determined as the target data model.
[0067] In addition, a mathematical model may be established based on machine learning or deep learning technology, and the feature data and the feature labels corresponding to the feature data may be trained within the data model to obtain a target data model between the feature data and the feature labels.
[0068] In some embodiments, the feature data and the feature labels corresponding to the feature data are trained to obtain a target data model between the feature data and the feature labels, including: establishing a candidate data model based on a preset deep learning framework; within the candidate data model, the feature data and the feature labels corresponding to the feature data are trained to obtain the target data model between the feature data and the feature labels.
[0069] Exemplarily, the preset deep learning framework includes a first feature extraction layer, a second feature extraction layer and a fusion layer. The first feature extraction layer is a convolutional neural network (CNN), the second feature extraction layer is a recurrent neural network (RNN), and both the first feature extraction layer and the second feature extraction layer are used to extract feature data again. The fusion layer is used to fuse the feature data extracted again by the first feature extraction layer and the second feature extraction layer to obtain a candidate data model.
[0070] Specifically, please refer to Figure 5 , in the first feature extraction layer, i.e., the convolutional neural network part, it includes: input layer, multi-layer convolution layer, pooling layer, batch normalization layer, activation function layer, and fully connected layer. Among them, the input layer is used to receive preprocessed feature data; the multi-layer convolution layer is used to extract the spatial features of the feature data through convolution operation; the pooling layer is used to downsample the output of the multi-layer convolution layer to reduce the amount of feature data to improve computing efficiency; the batch normalization layer is used to accelerate the training process and improve the stability of the candidate data model; The activation function layer is used to introduce nonlinearity according to the activation function to enhance the expressiveness of the candidate data model, where the activation function can be any of ReLU, Sigmoid or Tanh; the fully connected layer is used to convert the spatial features output by the convolutional layer into a one-dimensional vector.
[0071] For more details, please refer to Figure 6 , in the second feature extraction layer, i.e., the recurrent neural network part, it includes: input layer, multi-layer recurrent layer, batch normalization layer, activation function layer, and fully connected layer. Among them, the input layer is used to receive the preprocessed cervical angle data and body posture data sequence; the multi-layer recurrent layer is used to capture the time series information and long-term dependencies of the feature data, wherein the multi-layer recurrent layer can adopt the long short-term memory network (Long Short-Term, MemoryLSTM) or the gate recurrent unit (GRU); the batch normalization layer is used to accelerate training and improve the stability of the candidate data model; the activation function layer is used to introduce nonlinearity and enhance the expression ability of the candidate data model; the fully connected layer is used to convert the time series information and long-term dependencies of the feature data output by the multi-layer recurrent layer into a fixed-length feature vector.
[0072] Finally, in the fusion layer, the one-dimensional vector obtained by the first feature extraction layer and the fixed-length feature vector obtained by the second feature extraction layer are fused to obtain the fused candidate data model. The expression corresponding to the fusion layer is: ; in, Represents the attention weight corresponding to the CNN network, Represents the attention weight corresponding to the RNN network, represents a one-dimensional vector, represents a fixed-length feature vector, Represents the feature vector corresponding to the fused candidate data model, represents the number of one-dimensional vectors, The number of fixed-length feature vectors.
[0073] After obtaining the feature vector corresponding to the candidate data model, within the candidate data model, the feature data and the feature labels corresponding to the feature data are trained according to the feature vector corresponding to the candidate data model to obtain the target data model between the feature data and the feature labels.
[0074] S107: Identify angle information of the cervical vertebra according to the target data model.
[0075] Specifically, the expression of the target data model can be S(s)=T(t), where T represents the target function in the target data model, t represents the angle of the cervical vertebra detected in real time, S represents the angle information function, and s represents the preset angle after training.
[0076] It should be noted that s represents the preset angle after training, which may be a fixed angle value or an angle value within a certain threshold range.
[0077] For example, to facilitate determination of the angle of the cervical vertebra, a suitable coordinate system may be established. If the user's location is taken as the coordinate origin, the user's forward direction is the positive direction of the x-axis, and the value upward from the user's location is the positive direction of the y-axis, the angle of the cervical vertebra may be determined based on the established coordinate system.
[0078] It should be noted that the above method of determining the coordinate system is only for illustrative purposes. In practical applications, an appropriate coordinate system can be established according to actual needs, and this application does not impose any restrictions on this.
[0079] In some embodiments, identifying the angle information of the cervical vertebra according to the target data model includes: applying the target data model to an electronic device; acquiring a target image captured by a camera system of the electronic device, and identifying the angle information in the target image.
[0080] The electronic device may be a smart phone, a camera, etc.
[0081] Exemplarily, taking the application of the target data model to a smartphone as an example, the specific process of identifying the angle information of the cervical vertebra according to the target data model is described in detail. After the target data model is applied to a smartphone, within the shooting range of the smartphone, the shooting system on the smartphone monitors the angle information of the user's cervical vertebra when working or doing other activities in real time. The shooting system of the smartphone transmits the captured angle information of the user's cervical vertebra to the target data model of the smartphone, and the target data model of the smartphone identifies the angle information of the cervical vertebra according to the corresponding expression S (s) = T (t).
[0082] In some embodiments, after the target data model is applied to the electronic device, it also includes: determining preset angle information, wherein the preset angle information is obtained by training in the target data model; if the angle information is not within the threshold range of the preset angle information, the electronic device issues a prompt message to remind the user to adjust the posture; if the angle information is within the threshold range of the preset angle information, the electronic device does not issue the prompt message.
[0083] For example, if after training the feature data of the cervical angle and the feature label of the cervical angle, the cervical angle of 45° is the maximum cervical curvature, then the target data model corresponding to the preset angle information of the cervical angle of [0, 45°] is added to the electronic device.
[0084] Exemplarily, if the preset angle information is an angle interval within a certain range, specifically [0°-45°], then according to the coordinate system determined above, when the shooting system of the smartphone captures the angle information of the user's cervical spine, the angle sensor connected to the shooting system detects that the cervical angle of the cervical spine is 30°, where the cervical angle of 30° is based on the angle between the y-axis and the x-axis in the coordinate system. The cervical angle of 30° is sent to the target data model of the smartphone. After data analysis of the target data model, the shooting system captures the angle information of the user's cervical spine of 30° within the range of the preset angle information. Then the sensing system of the smartphone does not make any sound.
[0085] On the contrary, if the smartphone's camera system captures the angle information of the user's cervical vertebra and transmits the angle information to the angle sensor and the obtained angle of the cervical vertebra is 50°, then the cervical vertebra angle of 50° will also be transmitted to the target data model. After data analysis and comparison by the target data model, it is found that the cervical vertebra angle of 50° at this time exceeds the angle range of the preset angle information. In this case, the target data model sends an abnormal information to the smartphone's sensing system. After receiving the abnormal information of the angle information, the smartphone's sensing system sends a voice prompt or feedback warning.
[0086] Among them, the voice prompt can be "The current cervical vertebrae angle is too large, please adjust your sitting posture and cervical vertebrae", which is convenient for users to correct their sitting posture in time to reduce the occurrence of cervical spondylosis.
[0087] Alternatively, when working in a public area such as an office or library, the user can also select a feedback warning mode as needed. In this mode, when the smartphone's sensing system receives abnormal information about the angle, a large special mark will appear on the smartphone's display screen. The special mark covers the entire display screen, allowing the user to receive effective prompts in a timely manner to remind the user to adjust his or her sitting posture.
[0088] It should be noted that the special sign can be a larger sign with a triangular exclamation mark or a crying sign or other suitable signs. In actual application, users can select a special sign with a suitable shape as needed. And the user can select different special signs regularly or irregularly according to actual needs to improve the user experience. The specific special sign can be reasonably selected according to actual needs, and this application does not limit this.
[0089] It should be noted that the specific values of the angle range of the above-mentioned preset angle information and the specific data of the angle information of the user's cervical spine monitored in real time are merely exemplary illustrations of the present application. In actual applications, appropriate values can be selected according to actual conditions, and the present application does not impose any restrictions on this.
[0090] The intelligent cervical vertebra angle recognition method provided in the above embodiment obtains target data, wherein the target data includes first posture data and second posture data, performs forward filtering on the target data to obtain first filtered data corresponding to the target data; performs backward filtering on the first filtered data to obtain second filtered data corresponding to the first filtered data; performs standardization and normalization on the second filtered data in sequence to obtain preprocessed data corresponding to the target data; performs feature extraction operations on the preprocessed data to determine feature data corresponding to the preprocessed data; trains the feature data and feature labels corresponding to the feature data to obtain a target data model between the feature data and the feature labels; and identifies the angle information of the cervical vertebra based on the target data model.
[0091] In the intelligent cervical angle recognition method, by acquiring target data, and sequentially performing forward filtering, backward filtering, and feature extraction operations on the target data, feature data is obtained, thereby improving the quality of data acquisition. Training is performed based on the feature data and the feature labels corresponding to the feature data to obtain a candidate data model, and the candidate data model is evaluated by a preset loss function. When the candidate data model does not meet the evaluation requirements, the candidate data model is updated until a candidate data model that meets the evaluation requirements is obtained, and the candidate data model that meets the evaluation requirements is used as the target data model. The accuracy of the target data model is improved. Furthermore, according to the target data model, in the process of identifying the angle information of the cervical vertebra, by applying the target data model to an electronic device, when the user's cervical vertebra angle is not within the range of the preset angle information, the electronic device will promptly issue a voice prompt or feedback warning, so that the user can get effective prompts in time, thereby effectively correcting his posture.
[0092] See also Figure 2 , Figure 2An intelligent cervical vertebra angle recognition device 200 is provided in an embodiment of the present application. The intelligent cervical vertebra angle recognition device 200 includes a target data acquisition module 201, a first filter data determination module 202, a second filter data determination module 203, a preprocessing data determination module 204, a feature data determination module 205, a target data model determination module 206, and an angle information recognition module 207, wherein the target data acquisition module 201 is used to acquire target data, and the target data includes first posture data and second posture data; the first filter data determination module 202 is used to perform forward filtering on the target data to obtain first filter data corresponding to the target data; and the second filter data determination module 203 is used to determine the preprocessing data. 03, used to perform back-filtering processing on the first filtered data to obtain second filtered data corresponding to the first filtered data; a preprocessing data determination module 204, used to perform a preprocessing operation on the target data to obtain preprocessed data corresponding to the target data; a feature data determination module 205, used to perform a feature extraction operation on the preprocessed data to determine the feature data corresponding to the preprocessed data; a target data model determination module 206, used to train the feature data and the feature labels corresponding to the feature data to obtain a target data model between the feature data and the feature labels; an angle information recognition module 207, used to identify the angle information of the cervical vertebra according to the target data model.
[0093] In some implementations, the first filtering data determination module 202 executes; the expression corresponding to the forward filtering process is: ; in, represents the first filtered data, represents the target data, represents the first coefficient, represents the second coefficient, represents the third coefficient, represents the fourth coefficient, represents the current coefficient,
[0094] In some implementations, the second filtering data determination module 203 executes; the expression corresponding to the backward filtering process is: ; in, Represents the second filtered data.
[0095] In some implementations, the pre-processed data determination module 204, in the process of performing standardization processing and normalization processing on the second filtered data in sequence to obtain the pre-processed data corresponding to the target data, includes: The expression corresponding to the standardization process is: ; in, is the standardized data after the standardization process, The second filtered data is the mean of the second filtered data, σ is the standard deviation of the second filtered data; The normalization process includes: determining a preset data interval, scaling the standardized data to the preset data interval, and obtaining the preprocessed data corresponding to the standardized data.
[0096] In some implementations, the feature data determination module 205 performs a feature extraction operation on the preprocessed data to determine the feature data corresponding to the preprocessed data, and processes: Mapping the preprocessed data into a latent space according to a preset feature extraction model to generate a latent vector, and using the latent vector as the feature data; The expression corresponding to the preset feature extraction model is: ; Among them, F represents the feature extraction function, which preprocesses the data Mapped into the feature space, represents preprocessed data, Represents the encoding function in the preset feature extraction model, which preprocesses the data Mapped into the latent space, Represents the potential vector, i.e., feature data.
[0097] In some implementations, the target data model determination module 206 processes the following in the process of training the feature data and the feature labels corresponding to the feature data to obtain the target data model between the feature data and the feature labels: Training the feature data and feature labels corresponding to the feature data in a logistic regression manner to obtain a candidate data model; The trained candidate data model is evaluated according to a preset loss function to obtain a loss value of the candidate data model after evaluation. If the loss value is greater than a preset loss threshold, the candidate data model is updated until the loss value is less than or equal to the preset loss threshold. The corresponding candidate data model is the target data model. If the loss value is less than or equal to the preset loss threshold, directly determining the candidate data model as the target data model; Among them, the expression corresponding to the preset loss function is: ; represents the loss value, represents the logistic regression value, represents the probability value after logistic regression, and m represents the logistic regression value and / or the number of probability values after logistic regression.
[0098] In some implementations, the angle information identification module 207 performs the following steps in the process of identifying the angle information of the cervical vertebra according to the target data model: Applying the target data model to an electronic device; A target image captured by a camera system of the electronic device is acquired, and the angle information is identified in the target image.
[0099] In some implementations, the angle information identification module 207 further performs: determining preset angle information, where the preset angle information is obtained by training in the target data model; If the angle information is not within the threshold range of the preset angle information, the electronic device sends a prompt message to remind the user to adjust the posture; If the angle information is within the threshold range of the preset angle information, the electronic device does not issue the prompt information.
[0100] In some embodiments, the intelligent cervical vertebra angle recognition device 200 can be applied to electronic devices.
[0101] It should be noted that, those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the intelligent cervical vertebra angle recognition device 200 described above can refer to the corresponding process in the aforementioned intelligent cervical vertebra angle recognition method embodiment, and will not be repeated here.
[0102] See also Figure 3 , Figure 3 A schematic block diagram of the structure of an electronic device provided by an embodiment of the present invention.
[0103] like Figure 3 As shown, the terminal device 300 includes a processor 301 and a memory 302 , and the processor 301 and the memory 302 are connected via a bus 303 , such as an I2C (Inter-integrated Circuit) bus.
[0104] Specifically, the processor 301 is used to provide computing and control capabilities to support the operation of the entire terminal device. The processor 301 can be a central processing unit (CPU), and the processor 301 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0105] Specifically, the memory 302 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.
[0106] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a partial structure related to the embodiment of the present invention, and does not constitute a limitation on the terminal device to which the embodiment of the present invention is applied. The specific server may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0107] The processor is used to run a computer program stored in the memory, and implement any one of the intelligent cervical vertebra angle recognition methods provided by the embodiments of the present invention when executing the computer program.
[0108] In one embodiment, the processor is used to run a computer program stored in the memory, and implements the following steps when executing the computer program: Acquire target data, wherein the target data includes first posture data and second posture data; Performing forward filtering on the target data to obtain first filtered data corresponding to the target data; Performing a backward filtering process on the first filtered data to obtain second filtered data corresponding to the first filtered data; performing standardization processing and normalization processing on the second filtered data in sequence to obtain preprocessed data corresponding to the target data; Performing a feature extraction operation on the preprocessed data to determine feature data corresponding to the preprocessed data; Training the feature data and feature labels corresponding to the feature data to obtain a target data model between the feature data and the feature labels; According to the target data model, angle information of the cervical vertebra is identified.
[0109] In some implementations, the processor 301 performs the following steps when performing a preprocessing operation on the target data to obtain preprocessed data corresponding to the target data: The expression corresponding to the standardization process is: ; in, is the standardized data after the standardization process, The second filtered data is the mean of the second filtered data, σ is the standard deviation of the second filtered data; The normalization process includes: determining a preset data interval, scaling the standardized data to the preset data interval, and obtaining the preprocessed data corresponding to the standardized data.
[0110] In some implementations, the processor 301 executes: The expression corresponding to the forward filtering process is: ; The expression corresponding to the back-filtering process is: ; in, represents the first filtered data, represents the target data, represents the second filtered data, represents the first coefficient, represents the second coefficient, represents the third coefficient, represents the fourth coefficient, represents the current coefficient, .
[0111] In some implementations, the processor 301 performs, during the process of performing a feature extraction operation on the preprocessed data and determining feature data corresponding to the preprocessed data, the following steps: Mapping the preprocessed data into a latent space according to a preset feature extraction model to generate a latent vector, and using the latent vector as the feature data; The expression corresponding to the preset feature extraction model is: ; Among them, F represents the feature extraction function, which preprocesses the data Mapped into the feature space, represents preprocessed data, Represents the encoding function in the preset feature extraction model, which preprocesses the data Mapped into the latent space, Represents the potential vector, i.e., feature data.
[0112] In some implementations, the processor 301 performs, during the process of training the feature data and the feature labels corresponding to the feature data to obtain a target data model between the feature data and the feature labels: Training the feature data and feature labels corresponding to the feature data in a logistic regression manner to obtain a candidate data model; The trained candidate data model is evaluated according to a preset loss function to obtain a loss value of the candidate data model after evaluation. If the loss value is greater than a preset loss threshold, the candidate data model is updated until the loss value is less than or equal to the preset loss threshold. The corresponding candidate data model is the target data model. If the loss value is less than or equal to the preset loss threshold, directly determining the candidate data model as the target data model; Among them, the expression corresponding to the preset loss function is: ; represents the loss value, represents the logistic regression value, represents the probability value after logistic regression, and m represents the logistic regression value and / or the number of probability values after logistic regression.
[0113] In some implementations, the processor 301, in the process of identifying the angle information of the cervical vertebra according to the target data model, executes: Applying the target data model to an electronic device; A target image captured by a camera system of the electronic device is acquired, and the angle information is identified in the target image.
[0114] In some implementations, the processor 301 executes: determining preset angle information, where the preset angle information is obtained by training in the target data model; If the angle information is not within the threshold range of the preset angle information, the electronic device sends a prompt message to remind the user to adjust the posture; If the angle information is within the threshold range of the preset angle information, the electronic device does not issue the prompt information.
[0115] It should be noted that technical personnel in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working process of the terminal device described above can refer to the corresponding process in the aforementioned learning concentration analysis method embodiment, and will not be repeated here.
[0116] An embodiment of the present invention also provides a readable storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any intelligent cervical vertebra angle identification method provided in the description of the embodiment of the present invention.
[0117] The readable storage medium may be an internal storage unit of the terminal device described in the foregoing embodiment, such as a hard disk or memory of the terminal device. The storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the terminal device.
[0118] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0119] It should be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0120] The serial numbers of the embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. An intelligent cervical vertebra angle recognition method, characterized in that: include: Acquire target data, wherein the target data includes first posture data and second posture data; Performing forward filtering on the target data to obtain first filtered data corresponding to the target data; Performing a backward filtering process on the first filtered data to obtain second filtered data corresponding to the first filtered data; performing standardization processing and normalization processing on the second filtered data in sequence to obtain preprocessed data corresponding to the target data; Performing a feature extraction operation on the preprocessed data to determine feature data corresponding to the preprocessed data; Training the feature data and feature labels corresponding to the feature data to obtain a target data model between the feature data and the feature labels; According to the target data model, angle information of the cervical vertebra is identified.
2. The intelligent cervical vertebra angle recognition method according to claim 1, characterized in that: The expression corresponding to the forward filtering process is: ; The expression corresponding to the back-filtering process is: ; in, represents the first filtered data, represents the target data, represents the second filtered data, represents the first coefficient, represents the second coefficient, represents the third coefficient, represents the fourth coefficient, represents the current coefficient, .
3. The intelligent cervical vertebra angle recognition method according to claim 1, characterized in that: The step of sequentially performing standardization processing and normalization processing on the second filtered data to obtain preprocessed data corresponding to the target data includes: The expression corresponding to the standardization process is: ; in, is the standardized data after the standardization process, The second filtered data is the mean of the second filtered data, σ is the standard deviation of the second filtered data; The normalization process includes: determining a preset data interval, scaling the standardized data to the preset data interval, and obtaining the preprocessed data corresponding to the standardized data.
4. The intelligent cervical vertebra angle recognition method according to claim 1, characterized in that: The performing a feature extraction operation on the preprocessed data to determine feature data corresponding to the preprocessed data includes: Mapping the preprocessed data into a latent space according to a preset feature extraction model to generate a latent vector, and using the latent vector as the feature data; The expression corresponding to the preset feature extraction model is: ; Among them, F represents the feature extraction function, which preprocesses the data Mapped into the feature space, represents preprocessed data, Represents the encoding function in the preset feature extraction model, which preprocesses the data Mapped into the latent space, Represents the potential vector, i.e., feature data.
5. The intelligent cervical vertebra angle recognition method according to claim 1, characterized in that: The step of training the feature data and the feature labels corresponding to the feature data to obtain a target data model between the feature data and the feature labels includes: Training the feature data and feature labels corresponding to the feature data in a logistic regression manner to obtain a candidate data model; The trained candidate data model is evaluated according to a preset loss function to obtain a loss value of the candidate data model after evaluation. If the loss value is greater than a preset loss threshold, the candidate data model is updated until the loss value is less than or equal to the preset loss threshold. The corresponding candidate data model is the target data model. If the loss value is less than or equal to the preset loss threshold, directly determining the candidate data model as the target data model; Among them, the expression corresponding to the preset loss function is: ; represents the loss value, represents the logistic regression value, represents the probability value after logistic regression, and m represents the logistic regression value and / or the number of probability values after logistic regression.
6. The intelligent cervical vertebra angle recognition method according to claim 1, characterized in that: The step of identifying angle information of the cervical vertebra according to the target data model includes: Applying the target data model to an electronic device; A target image captured by a camera system of the electronic device is acquired, and the angle information is identified in the target image.
7. The intelligent cervical vertebra angle recognition method according to claim 6, characterized in that: The method further comprises: Determining preset angle information, where the preset angle information is obtained by training in the target data model; If the angle information is not within the threshold range of the preset angle information, the electronic device sends a prompt message to remind the user to adjust the posture; If the angle information is within the threshold range of the preset angle information, the electronic device does not issue the prompt information.
8. An intelligent cervical vertebra angle recognition device, characterized in that: include: A target data acquisition module, used to acquire target data, wherein the target data includes first posture data and second posture data; A first filter data determination module, configured to perform forward filtering on the target data to obtain first filter data corresponding to the target data; A second filter data determination module, configured to perform a back-filtering process on the first filter data to obtain second filter data corresponding to the first filter data; A pre-processed data determination module, used to sequentially perform standardization processing and normalization processing on the second filtered data to obtain pre-processed data corresponding to the target data; A feature data determination module, used to perform a feature extraction operation on the preprocessed data to determine feature data corresponding to the preprocessed data; A target data model determination module, used for training the feature data and the feature labels corresponding to the feature data to obtain a target data model between the feature data and the feature labels; The angle information recognition module is used to recognize the angle information of the cervical vertebra according to the target data model.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the intelligent cervical vertebra angle recognition method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the intelligent cervical vertebra angle recognition method according to any one of claims 1 to 7.
