A ground material recognition method, a network training method and an electronic device
By training the ground material recognition network, and using the acceleration characteristic data of electronic equipment when falling, the ground material is identified, the problem of difficulty in identifying ground material in the existing technology is solved, and the stability of the equipment in various scenarios is improved.
Patent Information
- Application Number
- CN202410152992.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-04
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-02-04
AI Technical Summary
The prior art is difficult to accurately identify the ground material when electronic equipment falls, making it difficult to target the optimization of the equipment structure to improve the stability of the fall.
By training the ground material recognition network, the acceleration feature data of electronic devices during the fall process is used to identify the ground material, including obtaining training data, feature extraction and network training, to achieve the identification of ground material.
It realizes the accurate identification of ground materials when electronic equipment falls, and provides targeted optimization solutions to improve the stability of equipment in a variety of ground material scenarios.
Smart Images

Figure CN117708599B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of terminal technology, and in particular relates to a ground material recognition method, a network training method and an electronic device. Background Art
[0002] When mobile phones and other electronic devices fall to the ground, the material of the ground they fall on has an important impact on the failure mode of mobile phones and other electronic devices. Only by obtaining the material of the ground when the user falls to the ground and analyzing the damage of the mobile phone after falling and colliding in different ground material scenarios can we optimize the structure in a targeted manner and improve the stability of mobile phones and other electronic devices in various ground material scenarios.
[0003] However, currently, the only way to infer the material of the ground on which the failed prototype landed is by observing the damage morphology of the failed prototype, but this inference method makes it difficult to determine the material of the ground on which the prototype landed. Summary of the invention
[0004] The present application provides a ground material recognition method, a network training method and an electronic device, which can recognize the ground material when the electronic device falls through a ground material recognition network.
[0005] In a first aspect, the present application provides a training method for a ground material recognition network, the method comprising: acquiring training data, the training data comprising acceleration feature data of an electronic device during a ground impact phase during a fall and a ground material label corresponding to the acceleration feature data; using the acceleration feature data as input and the ground material label as output, training the ground material recognition network until convergence, and obtaining a trained ground material recognition network.
[0006] In this way, the ground material recognition network trained by using the acceleration feature data of the electronic device during the collision phase of the falling process as training data can identify the ground material based on the acceleration data collected by the electronic device itself, thereby solving the current problem of difficulty in determining the ground material when the electronic device falls and touches the ground.
[0007] In one implementable manner, the method further includes: acquiring basic acceleration data of the electronic device, the basic acceleration data including first acceleration data of the electronic device during a ground impact phase during a fall; intercepting the first acceleration data based on the basic acceleration data of the electronic device; and performing feature extraction on the first acceleration data to obtain the acceleration feature data.
[0008] In this way, since the first acceleration data can reflect the characteristics of the ground material to a certain extent, the network training process converges faster and the trained network recognition is more accurate. In addition, by extracting features from each piece of first acceleration data, dimensionally consistent acceleration feature data can be obtained to better train the network.
[0009] In one implementable manner, intercepting the first acceleration data based on the basic acceleration data of the electronic device includes: determining second acceleration data of the electronic device in a weightlessness stage during a fall based on the basic acceleration data of the electronic device; determining a first starting time of a ground contact collision stage during a fall; the acceleration data corresponding to the first starting time is the first acceleration data after the second acceleration data, and the difference between the acceleration data and the second acceleration data is greater than a first acceleration threshold; determining third acceleration data of the electronic device in a ground-placed stage after the fall based on the basic acceleration data of the electronic device; determining the second starting time of the third acceleration data as the termination time of the ground contact collision stage during the fall; intercepting the acceleration data between the first starting time and the termination time to obtain the first acceleration data.
[0010] In this way, the weightlessness stage and the stage of being placed on the ground after falling can be determined through the basic acceleration data. Then, based on the weightlessness stage and the stage of being placed on the ground after falling, the start time and the end time of the ground contact collision stage can be determined. Then, the first acceleration data between the start time and the end time of the ground contact collision stage is intercepted.
[0011] In an implementable manner, the second acceleration data includes a plurality of consecutive acceleration values that are smaller than a second acceleration threshold.
[0012] Thus, according to the characteristics of the acceleration data in the weightlessness stage: the acceleration value of the electronic device in this stage is significantly lower than the acceleration due to gravity and lasts for a period of time. Therefore, the stage that satisfies the conditions of multiple consecutive acceleration values less than the second acceleration threshold can be determined as the weightlessness stage.
[0013] In an implementable manner, the third acceleration data includes a plurality of consecutive acceleration values whose fluctuation relative to gravity acceleration is less than a third acceleration threshold.
[0014] Thus, according to the characteristics of the acceleration data of the stage of being placed on the ground after falling: in this stage, the electronic device is stable and still on the ground. In this stage, the modulus of the acceleration of the electronic device is stable near the gravity acceleration, with only a small shake. Therefore, the stage that satisfies the conditions of multiple consecutive acceleration values with a fluctuation relative to the gravity acceleration less than the third acceleration threshold can be determined as the stage of being placed on the ground after falling.
[0015] In an implementable manner, the acceleration characteristic data includes at least one of the following: the maximum acceleration value, the minimum acceleration value, the peak-to-peak value, the average value, the root amplitude, the variance, the standard deviation, the root mean square, the warp, the skewness, the waveform factor, the peak factor, the pulse factor, the margin factor, the clearance factor, the energy, the collision time, the peak time, the number of peaks and troughs, the first half-peak width, the sum of the first half-peak widths of the first three peaks, the sum of the first half-peak widths of all peaks, the second half-peak width, the number of peaks and troughs × the length of the first acceleration data, the number of peaks and troughs × the length of the first acceleration data / the first half-peak width; wherein, the first half-peak width refers to the width of the peak at half the height of the peak-to-trough difference; the second half-peak width refers to the width of the peak at half the height of the absolute height of the peak.
[0016] In this way, time domain features of multiple dimensions that are valuable for ground material recognition can be obtained to improve the recognition ability of the ground material recognition network.
[0017] In one implementable manner, the ground material recognition network includes an input layer, a hidden layer and an output layer; the ground material recognition network is trained to convergence using the acceleration feature data as input and the ground material label as output to obtain a trained ground material recognition network, including: using the input layer to input the acceleration feature data into the hidden layer; using the hidden layer to perform prediction processing on the input acceleration feature data to obtain a ground material prediction label; outputting the ground material prediction label through the output layer; determining a loss value based on the ground material prediction label and the ground material label in the training data; and when the loss value is less than a loss threshold, terminating the training of the ground material recognition network to obtain a trained ground material recognition network.
[0018] In this way, the network parameters can be continuously optimized based on the loss value until a ground material recognition network with optimal network parameters is obtained.
[0019] In one implementable manner, the acceleration feature data includes acceleration feature data of multiple dimensions; the hidden layer includes at least one fully connected layer, an overfitting suppression layer and an activation function layer; using the hidden layer, the input acceleration feature data is predicted and processed to obtain a ground material prediction label, including: using the at least one fully connected layer, mapping the acceleration feature data and the ground material prediction label to obtain a linear mapping relationship between the acceleration feature data and the ground material prediction label; wherein the linear mapping relationship includes weights corresponding to the acceleration feature data of each dimension; in the process of obtaining the linear mapping relationship between the acceleration feature data and the ground material prediction label, using the overfitting suppression layer, randomly discarding the weights corresponding to the acceleration feature data of some dimensions in the acceleration feature data of the multiple dimensions; using the activation function layer, introducing a nonlinear factor in the linear mapping relationship, and obtaining the ground material prediction label based on the linear mapping relationship introduced with the nonlinear factor.
[0020] In this way, in each fully connected layer training stage, the weights corresponding to the acceleration feature data of some dimensions in the acceleration feature data of multiple dimensions can be randomly discarded by suppressing the overfitting layer to avoid the overfitting problem. In addition, the introduction of nonlinear factors through the activation function layer can help the network fit as many curves as possible, thereby achieving the purpose of helping the network learn complex features in the data and better mining related features.
[0021] In a second aspect, the present application provides a ground material recognition method, which is applied to an electronic device, wherein the electronic device is configured with a ground material recognition network trained by any method of the first aspect; in the event that the electronic device falls, acceleration feature data of the electronic device during the ground impact phase of the fall is obtained; using the ground material recognition network, ground material recognition is performed based on the acceleration feature data to obtain a ground material recognition result.
[0022] In this way, the electronic device can use the ground material recognition network to identify the material of the ground where the electronic device falls and hits the ground based on the collected acceleration data.
[0023] In one implementable manner, the method further includes: in the event that the electronic device falls, obtaining basic acceleration data of the electronic device, the basic acceleration data including first acceleration data of the electronic device during a ground impact phase during the fall; based on the basic acceleration data of the electronic device, intercepting the first acceleration data; and performing feature extraction on the first acceleration data to obtain the acceleration feature data.
[0024] In one achievable manner, the method further includes: sending the ground material recognition result to a server.
[0025] In this way, when a mobile phone or other electronic device falls, the ground material recognition network configured in the mobile phone or other electronic device can identify the ground material based on the acceleration data collected by the electronic device during the fall, and can feed back the ground material recognition result to the server. In this way, the manufacturer can determine the impact of different ground materials on the failure mode of the mobile phone based on the ground material recognition results and maintenance information obtained by the server, so as to optimize the structure of mobile phones and other electronic devices in a targeted manner and improve the stability of mobile phones and other electronic devices in various ground material scenarios.
[0026] In a third aspect, the present application provides an electronic device, comprising a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, the computer program code comprises computer instructions, and when the processor executes the computer instructions, the electronic device executes a method as described in any one of the first aspect or the second aspect.
[0027] In a fourth aspect, the present application provides a chip system, comprising a processor; the processor is coupled to a memory, the memory is used to store computer program code, the computer program code comprises computer instructions, and when the processor executes the computer instructions, the method as described in any one of the first aspect or the second aspect is executed.
[0028] In a fifth aspect, the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed on a computer, the computer executes the method as described in any one of the first aspect or the second aspect.
[0029] In a sixth aspect, the present application provides a computer program product, comprising: a computer program or instructions, which, when executed on a computer, causes the computer to execute a method as described in any one of the first aspect or the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A workflow diagram of a ground material recognition network training method provided in an embodiment of the present application;
[0031] Figure 2 A schematic diagram of acceleration data of an electronic device changing over time during a fall process provided by an embodiment of the present application;
[0032] Figure 3 A flowchart of another ground material recognition network training method provided in an embodiment of the present application;
[0033] Figure 4A flowchart of another ground material recognition network training method provided in an embodiment of the present application;
[0034] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0035] Figure 6 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;
[0036] Figure 7 A workflow diagram of a ground material recognition method provided in an embodiment of the present application;
[0037] Figure 8 A structural block diagram of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] When mobile phones and other electronic devices fall to the ground, the material of the ground they fall on has an important impact on the failure mode of mobile phones and other electronic devices. Only by obtaining the material of the ground when the user falls to the ground and analyzing the damage of the mobile phone after falling and colliding in different ground material scenarios can we optimize the structure in a targeted manner and improve the stability of mobile phones and other electronic devices in various ground material scenarios.
[0039] However, currently, the only way to infer the material of the ground on which the failed prototype landed is by observing the damage morphology of the failed prototype, but this inference method makes it difficult to determine the material of the ground on which the prototype landed.
[0040] The embodiment of the present application provides a method for identifying ground materials. First, a ground material identification network is trained using acceleration data during the fall of electronic devices such as mobile phones. Then, the trained ground material identification network is configured in electronic devices such as mobile phones. In this way, when electronic devices such as mobile phones fall, the ground material identification network configured in electronic devices such as mobile phones can identify the ground material based on the acceleration data collected by the electronic devices during the fall, and can feed back the ground material identification results to the server. In this way, the manufacturer can determine the impact of different ground materials on the failure mode of the mobile phone based on the ground material identification results and maintenance information obtained by the server, so that the structure of electronic devices such as mobile phones can be optimized in a targeted manner to improve the stability of electronic devices such as mobile phones falling in various ground material scenarios.
[0041] The following first describes the training method of the ground material recognition network provided in the embodiment of the present application.
[0042] The training method of the ground material recognition network provided in the embodiment of the present application can be implemented by deploying a neural network model and computer program code in software form in a hardware computing environment. Available hardware computing environments include: personal computers, servers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, programmable consumer electronic devices, cloud servers, server instances, supercomputers, etc.
[0043] Figure 1 The following is a workflow diagram of a ground material recognition network training method provided in an embodiment of the present application. Figure 1 As shown, the training method may include the following steps:
[0044] S101, obtaining training data.
[0045] In the embodiment of the present application, the training data may also be referred to as sample data, and the training data includes paired acceleration feature data and ground material labels, wherein the acceleration feature data is acceleration feature data of the electronic device during the ground contact collision phase during the falling process.
[0046] The training data may be obtained through a drop experiment of an electronic device onto different ground materials, or through a failed prototype device that has experienced a drop event as reported by a user, which is not limited in this application.
[0047] In the embodiment of the present application, an acceleration sensor is configured in the electronic device, and the acceleration sensor can collect acceleration data of the electronic device in real time. In this way, taking the training data obtained by the drop experiment of dropping the electronic device onto different ground materials as an example, the acceleration data collected by the electronic device may include acceleration data corresponding to multiple stages such as the electronic device being held in the hand, falling from the hand, hitting the ground and being stably placed on the ground. However, only the acceleration data corresponding to the ground collision stage of the electronic device can reflect the characteristics of the ground material to a certain extent. Therefore, in order to train a network that can identify the ground material based on the acceleration data when the mobile phone falls, the accelerometer data can be intercepted to obtain the acceleration data corresponding to the ground collision stage.
[0048] Figure 2 A schematic diagram of the acceleration data of an electronic device changing with time during a fall provided in an embodiment of the present application, wherein the acceleration data collected by the electronic device may include acceleration components in three directions: the X-axis, the Y-axis, and the Z-axis.
[0049] In one possible implementation, Figure 2 As shown, the magnitude of acceleration can be expressed as the vertical axis. The magnitude of acceleration is equal to .in, , and It is the acceleration component of the acceleration sensor in the X-axis, Y-axis and Z-axis directions.
[0050] like Figure 2 As shown in FIG, the falling process of an electronic device mainly includes four stages: the stable stage before falling, the weightlessness stage of falling, the ground collision stage and the stable stage after falling.
[0051] In the stable stage before falling, the electronic device can be held in the hand. Therefore, the acceleration modulus of the electronic device in this stage fluctuates around the gravitational acceleration.
[0052] In the falling weightlessness stage, the electronic device falls into the user's hand and enters a weightless state. The acceleration modulus of the electronic device in this stage is significantly lower than the acceleration due to gravity and lasts for a period of time. The length of time lasts is related to the height of the phone from the ground when it falls. It should be noted that although Figure 2 The modulus of acceleration in the middle 3s or so is also low, but it does not belong to the stage of weightlessness during falling. Instead, it is the weightlessness of the electronic device after the collision and bounce, which causes the modulus of acceleration to be low.
[0053] In the ground contact collision stage, the electronic device touches the ground and collides with the ground for multiple times, and the acceleration modulus of the electronic device in this stage continuously undergoes significant mutations.
[0054] In the stable stage after falling, the electronic device is stable and still on the ground. In this stage, the acceleration modulus of the electronic device is stable near the gravity acceleration, with only slight vibration.
[0055] It can be seen that the embodiment of the present application is to intercept The acceleration data between (can be called the first acceleration data). is the starting time of the ground contact collision phase (also called the first starting time), is the end time of the ground contact collision phase. The key to the acceleration data between the two is to determine the start time of the ground contact collision phase. and the end time .
[0056] In one possible implementation, the start time of the ground contact collision phase is determined , which can be implemented in the following way: first, based on the basic acceleration data of the electronic device, determine the acceleration data of the electronic device in the weightlessness stage during the falling process (which can be called the second acceleration data). Then, the time corresponding to the first acceleration data after the second acceleration data, whose difference with the second acceleration data is greater than the first acceleration threshold, is determined as the starting time of the ground contact collision stage. .
[0057] Among them, the basic acceleration data includes acceleration data corresponding to the four stages during the falling process of the electronic device.
[0058] The starting time of the ground contact phase is The time when the electronic device first touches the ground after falling. After the electronic device touches the ground, its acceleration value will change significantly compared with the second acceleration data in the falling weightlessness stage. Therefore, the embodiment of the present application can determine the time corresponding to the first acceleration data after the second acceleration data, whose difference with the second acceleration data is greater than the first acceleration threshold, as the starting time of the ground contact collision stage. .
[0059] Among them, combined Figure 2 It can be seen that the second acceleration data in the falling weightlessness stage meets the following conditions: the second acceleration data includes multiple acceleration values, the multiple acceleration values are all less than the second acceleration threshold, and continue to be less than the second acceleration threshold for a period of time, for example, the period of time can be the first time length. Among them, the second acceleration threshold is the gravity acceleration, such as: the gravity acceleration is 9.8 m / s 2 The first duration is greater than a preset duration, for example, the preset duration may be 0.5 s.
[0060] Exemplarily, the sliding window method can be used to traverse and calculate the energy value of the acceleration of the entire falling process of the electronic device, and find the earliest low-energy area. This area is the falling weightlessness stage that meets the above conditions, and the data corresponding to this area is the acceleration data of the falling weightlessness stage. Among them, the energy value of the acceleration is the root mean square of the modulus of the acceleration. In this way, the falling weightlessness stage determined by the sliding window method is significantly lower than the normal gravity acceleration and lasts for a short period of time. In addition, the use of the sliding window method can filter out the influence of small data disturbances on the judgment of the falling weightlessness stage.
[0061] In one possible implementation, the end time of the ground contact collision phase is determined , which can be implemented in the following manner: based on the basic acceleration data of the electronic device, determine the third acceleration data of the electronic device in the stage of landing on the ground after falling. Then, the starting time of the third acceleration data (also called the second starting time) is determined as the ending time of the ground collision stage of the electronic device in the falling process. .
[0062] Combination Figure 2 It can be seen that after the electronic device touches the ground and the collision phase ends, the electronic device is stable and still on the ground. When the electronic device is stable and still on the ground, the modulus of the acceleration of the electronic device is stable near the acceleration of gravity, with only a slight shake. Therefore, the embodiment of the present application can determine the moment when the following conditions are met as the termination moment : End time and the end time After that, the corresponding acceleration data relative to the gravity acceleration fluctuates less than the third acceleration threshold. and the end time Afterwards, the fluctuations of a plurality of consecutive acceleration data relative to the gravity acceleration are all less than the third acceleration threshold.
[0063] Exemplarily, based on the basic acceleration data of the electronic device, it is determined that the acceleration modulus at a certain moment after the weightlessness stage and the subsequent 20 consecutive moments are all stable near the gravity acceleration, and the amplitude jitter relative to the gravity acceleration is less than the third acceleration threshold, then the moment is determined to be the end moment of the ground contact collision stage. For example, the acceleration due to gravity is 9.8 m / s 2 , the third acceleration threshold can be ±0.1m / s 2 .
[0064] In this way, the starting time of the ground contact collision phase is determined and the end time After that, you can capture the start time and the end time The acceleration data between the two sides are used to obtain the first acceleration data corresponding to the ground contact collision stage.
[0065] Since the duration of the ground contact collision phase during each fall may be different, the length of the intercepted first acceleration data may be different. However, the first acceleration data of different lengths are not suitable for training as input of a neural network. Therefore, the embodiment of the present application may further perform feature extraction on each first acceleration data to obtain acceleration feature data with consistent dimensions.
[0066] In the embodiment of the present application, the acceleration feature data may include time domain features that are valuable for ground material identification. Exemplarily, the acceleration feature data extracted in the embodiment of the present application may include some or all of the features shown in Table 1. In Table 1, accm represents the starting time of the interception. and the end time The modulus of the acceleration between Indicates the start time and the end time The modulus of acceleration at any time between; n represents the data length, that is, the starting time and the end time The number of modules of the acceleration between. n is a positive integer greater than 1.
[0067] Table 1 Acceleration characteristic data
[0068] ;
[0069] In this way, after feature extraction is performed on each piece of first acceleration data, acceleration feature data of 25 dimensions as listed in Table 1 can be obtained.
[0070] Furthermore, by adding a corresponding ground material label to each acceleration feature data, training data can be obtained. The ground material label in the training data is the true value corresponding to each acceleration feature data. For example, the ground material label can include ground material categories such as quilt, carpet, asphalt, granite, cushion, etc. Specifically, the ground material label can be represented by labels 0-4 respectively.
[0071] In some embodiments, the training data may be further divided into a training set and a test set. For example, the training data of five types of ground materials may be divided into a training set and a test set according to a ratio of 8:2, wherein the training set has 320 items and the test set has 80 items.
[0072] In some embodiments, the acceleration feature data may also be subjected to mean-variance normalization processing to normalize each dimension feature in the acceleration feature data to a distribution with a mean of 0 and a variance of 1. In this way, the influence of the dimension of each feature dimension can be effectively eliminated, and the robustness of the ground material recognition network can be improved.
[0073] In summary, the embodiments of the present application can intercept the first acceleration data corresponding to the ground contact collision stage that can reflect the characteristics of the ground material based on the acceleration data collected during the fall of the electronic device, and perform feature extraction on the first acceleration data to obtain training data.
[0074] The following is an explanation of the process of network training based on training data.
[0075] S102, using acceleration feature data as input and ground material labels as output, training a ground material recognition network until convergence, and obtaining a trained ground material recognition network.
[0076] In some embodiments, Figure 3As shown, the ground material recognition network may include an input layer, a hidden layer, and an output layer. In this way, the acceleration feature data may be input into the input layer, and the acceleration feature data may be passed to the hidden layer through the input layer. After the hidden layer receives the acceleration feature data, it may perform prediction processing on the input acceleration feature data to obtain a ground material prediction label. And the ground material prediction label is output through the output layer. Afterwards, the loss value may be determined based on the ground material prediction label and the ground material label in the training data. When the loss value is less than the loss threshold, the training of the ground material recognition network is terminated to obtain the trained ground material recognition network. When the loss value is greater than or equal to the loss threshold, the network parameters of the ground material recognition network continue to be optimized until the loss value is less than the loss threshold.
[0077] In some embodiments, Figure 4 As shown, the hidden layer may include at least one fully connected layer, an overfitting suppression layer, and an activation function layer.
[0078] In the fully connected layer, the acceleration feature data and the ground material prediction label can be mapped. For example, the fully connected layer can perform the mapping process through matrix multiplication operation. For example, the matrix multiplication operation formula is shown in formula (1):
[0079] Formula (1)
[0080] In formula (1), Indicates The input vector of the fully connected network. Indicates The weight matrix of the fully connected network, Indicates The bias of the fully connected network layer, Indicates The output vector of the fully connected network.
[0081] Among them, the input vector is the vector corresponding to the acceleration feature data, and the output vector is the predicted ground material prediction label.
[0082] For example, for the first layer of the fully connected network, the input vector may be acceleration feature data including 25 dimensions. It can be expressed as [a1, a2, ... a25], where a1, a2, ... a25 represent the acceleration features of 25 dimensions as shown in Table 1.
[0083] In this way, by continuously training and optimizing parameters and , in order to obtain a ground material recognition network with a loss value less than the loss threshold.
[0084] To prevent the overfitting problem, the embodiment of the present application may adopt a ground material recognition network including an overfitting suppression layer. For example, the overfitting suppression layer may adopt a dropout layer. In this way, in each fully connected layer training stage, the weights corresponding to the acceleration feature data of some dimensions in the acceleration feature data of multiple dimensions may be randomly discarded through the dropout layer. Among them, the weights discarded each time are random, that is, the weights discarded each time may be different, which can avoid the overfitting problem.
[0085] It should be noted that after at least one fully connected layer, the mapping relationship obtained by the mapping process is a linear mapping relationship between the acceleration feature and the ground material prediction label. In order to make the ground material recognition network fit as many curves as possible, so as to achieve the purpose of helping the network learn complex features in the data. The embodiment of the present application can introduce a nonlinear factor into the linear mapping relationship through an activation function layer, and obtain a ground material prediction label based on the linear mapping relationship with the introduction of the nonlinear factor.
[0086] For example, since the ReLU function does not have complex mathematical operations and has low computational overhead, the activation function layer can use the ReLU activation function to spend less time on training or prediction. The ReLU function is a piecewise linear function that changes all negative inputs to 0, while all positive inputs remain unchanged. In this way, ReLU can achieve sparse activation to better mine relevant features and fit training data. In addition, for nonlinear functions, the gradient of ReLU in the non-negative interval is a constant. Therefore, there is no gradient vanishing problem, so that the convergence speed of the network is maintained in a stable state.
[0087] In some embodiments, after the output layer outputs the predicted ground material prediction label, a cross entropy loss function may be used to calculate the loss value.
[0088] Exemplarily, the following formula (2) may be used to calculate the loss value Loss between the predicted ground material label and the actual ground material label (ie, the ground material label corresponding to the input in the training data).
[0089] Formula (2)
[0090] In formula (2), , Indicates The ground truth labels of samples, and , Indicates The predicted ground material labels for samples.
[0091] According to the above formula (2), the loss value Loss describes the distance between two probability distributions, but the output of the neural network is not necessarily a probability distribution. To solve this problem, the Softmax activation function can be used after the output layer to convert the output obtained by the forward propagation of the neural network into a probability distribution. For example, the probability distribution of the output satisfies the following formula (3):
[0092] Formula (3)
[0093] In formula (3), Represents the probability distribution of the output after using the Softmax activation function.
[0094] From the above formula (3), we can see that the output of the original neural network is is used as confidence to generate new output, and the new output meets all the requirements of probability distribution. This new output can be understood as the probability of a sample belonging to different categories after deduction by the neural network. In this way, the output of the neural network is also turned into a probability distribution, so that the distance between the predicted probability distribution and the actual probability distribution can be calculated through cross entropy.
[0095] In this way, the gradient of the loss function for each parameter is calculated through the back propagation algorithm, and then the gradient descent algorithm is used to update each parameter according to the gradient and learning rate. The gradient descent algorithm is mainly used to optimize the value of a single parameter, while the back propagation algorithm uses the gradient descent algorithm on all parameters to make the loss function of the ground material recognition network on the training data as small as possible, until the training is small enough to be less than the loss threshold.
[0096] It should be noted that the embodiments of the present application only use the loss value to train the ground material recognition network as an example for illustrative explanation, and do not limit the ground material recognition network training method. For example, when the number of training times of the ground material recognition network training reaches a preset number, the training can be terminated to obtain the trained ground material recognition network.
[0097] Table 2 shows the test results of testing the trained ground material recognition network using the test set.
[0098] Table 2 Test results of ground material recognition
[0099] ;
[0100] As shown in Table 2, the ground material recognition network trained in the embodiment of the present application has an accuracy of more than 90% for each ground material category, and the overall accuracy is 90%. It can be seen that the ground material recognition network after training has a good accuracy. In addition, the overall test time is only 0.009 seconds, which shows that the ground material recognition network after training has a fast response speed.
[0101] In the embodiment of the present application, the trained ground material recognition network can be configured in the electronic device. In this way, the electronic device configured with the ground material recognition network can recognize the material of the fallen ground. Among them, the electronic device also requires an acceleration sensor to collect acceleration data of the electronic device during the fall process through the acceleration sensor.
[0102] The structure of the electronic device in the embodiment of the present application is described below by taking a mobile phone as an example.
[0103] Figure 5 The hardware structure diagram of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the electronic device 200 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, etc. The sensor module 280 may include a pressure sensor 280A, a gyroscope sensor 280B, an air pressure sensor 280C, a magnetic sensor 280D, an acceleration sensor 280E, a distance sensor 280F, a proximity light sensor 280G, a fingerprint sensor 280H, a temperature sensor 280J, a touch sensor 280K, an ambient light sensor 280L, a bone conduction sensor 280M, etc.
[0104] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0105] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0106] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0107] The processor 210 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.
[0108] In some embodiments, the processor 210 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface 230, etc.
[0109] The wireless communication function of the electronic device 200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor and the baseband processor.
[0110] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0111] The mobile communication module 250 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 200. The mobile communication module 250 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 250 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 250 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 250 can be set in the processor 210. In some embodiments, at least some of the functional modules of the mobile communication module 250 can be set in the same device as at least some of the modules of the processor 210.
[0112] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 270A, a receiver 270B, etc.), or displays an image or video through a display screen 294. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 210 and be set in the same device as the mobile communication module 250 or other functional modules.
[0113] The wireless communication module 260 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 200. The wireless communication module 260 can be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 210. The wireless communication module 260 can also receive the signal to be sent from the processor 210, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0114] In some embodiments, the antenna 1 of the electronic device 200 is coupled to the mobile communication module 250, and the antenna 2 is coupled to the wireless communication module 260, so that the electronic device 200 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0115] The acceleration sensor 280E can detect the magnitude of the acceleration of the electronic device 200 in all directions (generally three axes). When the electronic device 200 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device, and is applied to applications such as horizontal and vertical screen switching, pedometers, etc. The embodiment of the present application can also be used to realize the recognition of the material of the fallen ground.
[0116] The electronic device 200 implements the display function through a GPU, a display screen 294, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs, which execute program instructions to generate or change display information.
[0117] The display screen 294 is used to display images, videos, etc. The display screen 294 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 200 may include 1 or N display screens 294, where N is a positive integer greater than 1.
[0118] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200. The external memory card communicates with the processor 210 through the external memory interface 220 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0119] The internal memory 221 can be used to store computer executable program codes, which include instructions. The internal memory 221 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 200 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 210 executes various functional applications and data processing of the electronic device 200 by running instructions stored in the internal memory 221 and / or instructions stored in a memory provided in the processor.
[0120] The electronic device 200 can implement audio functions such as music playing and recording through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headphone jack 270D, and the application processor.
[0121] The key 290 includes a power key, a volume key, etc. The key 290 can be a mechanical key or a touch key. The electronic device 200 can receive key input and generate key signal input related to user settings and function control of the electronic device 200.
[0122] Motor 291 can generate vibration prompts. Motor 291 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 294, motor 291 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0123] Indicator 292 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0124] The SIM card interface 295 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 200 by inserting it into the SIM card interface 295 or pulling it out from the SIM card interface 295. The electronic device 200 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 295 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 295 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 295 can also be compatible with different types of SIM cards. The SIM card interface 295 can also be compatible with external memory cards. The electronic device 200 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 200 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 200 and cannot be separated from the electronic device 200.
[0125] The software system of the electronic device 200 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system of the layered architecture is taken as an example to exemplify the software structure of the electronic device 200.
[0126] Figure 6 It is a software structure block diagram of the electronic device 200 according to an embodiment of the present application.
[0127] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
[0128] The application layer can include a series of application packages.
[0129] like Figure 6 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0130] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0131] like Figure 6 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0132] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0133] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0134] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0135] The phone manager is used to provide communication functions of the electronic device 200, such as management of call status (including connecting, hanging up, etc.).
[0136] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0137] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0138] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0139] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0140] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0141] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0142] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0143] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0144] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0145] A 2D graphics engine is a drawing engine for 2D drawings.
[0146] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0147] Figure 7 The following is a workflow diagram of a method for identifying ground material provided in an embodiment of the present application. Figure 7 As shown, the method may include the following steps:
[0148] S301, when an electronic device falls, basic acceleration data of the electronic device is obtained, where the basic acceleration data includes first acceleration data of the electronic device in a ground contact collision phase during the falling process.
[0149] S302: intercepting first acceleration data based on basic acceleration data of the electronic device.
[0150] S303: extract features from the first acceleration data to obtain acceleration feature data.
[0151] Among them, when the electronic device detects that the electronic device has fallen, the basic acceleration data of the electronic device can be obtained, and then the acceleration feature data can be extracted from the basic acceleration data, and the acceleration feature data can be input into the ground material recognition network for ground material recognition.
[0152] In one possible implementation, when the electronic device detects acceleration data including satisfying Figure 1 When the acceleration data corresponding to the four stages are obtained, it can be determined that a drop event has occurred in the electronic device.
[0153] S304, using a ground material recognition network to perform ground material recognition based on acceleration feature data to obtain a ground material recognition result.
[0154] S305: Send the ground material recognition result to the server.
[0155] Among them, steps S301 to S303 can refer to the description of step S101, and step S304 can refer to the description of step S102, which will not be repeated here.
[0156] It should be noted that the difference between step S304 and step S102 is that after step S304 outputs the ground material recognition result based on the input acceleration feature data, there is no need to further calculate the loss value. The ground material recognition result refers to the type of ground material, such as marble, quilt, etc.
[0157] In this way, manufacturers can determine the impact of different ground materials on the failure mode of mobile phones based on the ground material identification results received by the server, so that they can carry out targeted structural optimization of mobile phones and other electronic devices, and improve the stability of mobile phones and other electronic devices when they fall in scenarios with various ground materials.
[0158] In some embodiments, the manufacturer can also analyze the failure rate of electronic devices falling on different ground materials based on the ground material identification results received by the server and the user's maintenance information, etc. Then, the electronic device structure can be optimized for scenes with high failure rates, so that the optimized electronic device can reduce the failure rate in scenes with high failure rates.
[0159] The various method embodiments described in this document may be independent solutions or may be combined according to internal logic, and these solutions all fall within the protection scope of this application.
[0160] It can be understood that, in the above-mentioned various method embodiments, the methods and operations implemented by the electronic device can also be implemented by components (such as chips or circuits) that can be used in the electronic device.
[0161] The above embodiments introduce the ground material recognition network training method and the ground material recognition method provided by the present application. It is understandable that in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0162] The embodiment of the present application further provides a processing device, which includes at least one processor and a communication interface. The communication interface is used to provide information input and / or output to the at least one processor, and the at least one processor is used to execute the method in the above method embodiment.
[0163] It should be understood that the above-mentioned processing device can be a chip. Figure 8 , Figure 8 A structural block diagram of a chip provided in an embodiment of the present application. Figure 8 The chip shown may be a general-purpose processor or a dedicated processor. The chip 400 may include at least one processor 401. The at least one processor 401 may be used to support execution Figures 1 to 7 The technical solution shown in any one of the embodiments.
[0164] Optionally, the chip 400 may further include a transceiver 402, which is used to accept the control of the processor 401 and to support the execution Figures 1 to 7 The technical solution shown in any one of the embodiments. Optionally, Figure 8The chip 400 shown may further include a storage medium 403. Specifically, the transceiver 402 may be replaced by a communication interface, and the communication interface provides information input and / or output for the at least one processor 401.
[0165] It should be noted that Figure 8 The chip 400 shown can be implemented using the following circuits or devices: one or more field programmable gate arrays (FPGA), programmable logic devices (PLD), application specific integrated circuits (ASIC), system on chip (SoC), central processor unit (CPU), network processor (NP), digital signal processor (DSP), micro controller unit (MCU), controller, state machine, gate logic, discrete hardware components, any other suitable circuits, or any combination of circuits capable of performing the various functions described throughout this application.
[0166] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.
[0167] It should be noted that the processor in the embodiment of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment may be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0168] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0169] According to the method provided in the embodiments of the present application, the embodiments of the present application also provide a computer program product, which includes: a computer program or instructions, when the computer program or instructions are run on a computer, the computer executes the method of any one of the embodiments of the method.
[0170] According to the method provided in the embodiments of the present application, the embodiments of the present application also provide a computer storage medium, which stores a computer program or instructions. When the computer program or instructions are run on a computer, the computer executes the method of any one of the embodiments of the method.
[0171] According to the method provided by an embodiment of the present application, an embodiment of the present application also provides an electronic device, including a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes the method of any one of the embodiments of the method embodiment.
[0172] According to the method provided in the embodiment of the present application, the embodiment of the present application also provides a chip system, which includes a processor, the processor is coupled to a memory, and is used to execute a computer program or instruction stored in the memory. When the computer program or instruction is executed, the chip system can implement all or part of the steps in the method embodiment. The chip system can be composed of a chip, or it can include a chip and other discrete devices.
[0173] Those of ordinary skill in the art will appreciate that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0174] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0175] The computer storage medium, computer program product, and electronic device provided in the above-mentioned embodiments of the present application are all used to execute the method provided above. Therefore, the beneficial effects that can be achieved can refer to the corresponding beneficial effects of the method provided above, and will not be repeated here.
[0176] It should be understood that in each embodiment of the present application, the execution order of each step should be determined by its function and internal logic, and the size of the sequence number of each step does not mean the order of execution and does not limit the implementation process of the embodiment.
[0177] Each part of this specification is described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, computer storage medium, computer program product, and electronic device, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
[0178] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0179] The above-described embodiments of the present application do not constitute a limitation on the protection scope of the present application.
Claims
1. A training method for a ground material recognition network, characterized in that: The method comprises: Acquire training data, wherein the training data includes acceleration feature data of the electronic device during a ground collision phase during a fall process and a ground material label corresponding to the acceleration feature data; the ground material recognition network includes an input layer, a hidden layer, and an output layer, the hidden layer includes at least one fully connected layer, an overfitting suppression layer, and an activation function layer, and the acceleration feature data includes time domain features composed of acceleration feature data of multiple dimensions; Using the input layer, inputting the acceleration feature data into the hidden layer; Using the at least one fully connected layer, mapping the acceleration feature data and the ground material prediction label is performed to obtain a linear mapping relationship between the acceleration feature data and the ground material prediction label; wherein the linear mapping relationship includes a weight corresponding to the acceleration feature data of each dimension; In the process of obtaining the linear mapping relationship between the acceleration feature data and the ground material prediction label, the weights corresponding to the acceleration feature data of some dimensions in the acceleration feature data of the multiple dimensions are randomly discarded by using the overfitting suppression layer; Using the activation function layer, a nonlinear factor is introduced into the linear mapping relationship, and based on the linear mapping relationship with the nonlinear factor introduced, a ground material prediction label is obtained; Outputting the ground material prediction label through the output layer; Determining a loss value based on the ground material prediction label and the ground material label in the training data; When the loss value is less than the loss threshold, the training of the ground material recognition network is terminated to obtain a trained ground material recognition network; The step of obtaining the acceleration characteristic data of the ground contact collision stage includes: Acquire basic acceleration data of the electronic device, wherein the basic acceleration data includes first acceleration data of the electronic device in a ground contact collision phase during a falling process; Determining second acceleration data of the electronic device in a weightlessness stage during a falling process based on the basic acceleration data of the electronic device; Determine a first starting time of a ground collision phase of the electronic device during the falling process; the acceleration data corresponding to the first starting time is the first acceleration data after the second acceleration data, the difference between which and the second acceleration data is greater than a first acceleration threshold; Determining, based on the basic acceleration data of the electronic device, third acceleration data of the electronic device in a stage where the electronic device is placed on the ground after falling; Determine the second starting time of the third acceleration data as the end time of the ground contact collision phase of the electronic device during the falling process; intercepting acceleration data between the first starting time and the end time to obtain the first acceleration data; Feature extraction is performed on the first acceleration data to obtain the acceleration feature data.
2. The method according to claim 1, characterized in that The second acceleration data includes a plurality of consecutive acceleration values that are smaller than a second acceleration threshold.
3. The method according to claim 1, characterized in that The third acceleration data includes a plurality of consecutive acceleration values whose fluctuation relative to gravity acceleration is less than a third acceleration threshold.
4. The method according to claim 1, characterized in that The acceleration characteristic data includes at least one of the following: The first acceleration data corresponds to the maximum acceleration value, minimum acceleration value, peak-to-peak value, average value, root amplitude, variance, standard deviation, root mean square, warp, skewness, waveform factor, peak factor, pulse factor, margin factor, clearance factor, energy, collision time, peak time, number of peaks and troughs, first half-peak width, sum of the first half-peak widths of the first three peaks, sum of the first half-peak widths of all peaks, second half-peak width, number of peaks and troughs × length of the first acceleration data, number of peaks and troughs × length of the first acceleration data / first half-peak width; wherein, the first half-peak width refers to the width of the peak at half the height of the peak-to-trough difference; the second half-peak width refers to the width of the peak at half the height of the absolute height of the peak.
5. A method for identifying ground material, characterized in that: Applied to an electronic device, the electronic device is configured with a ground material recognition network trained by the method according to any one of claims 1 to 4; When the electronic device falls, acquiring acceleration characteristic data of the electronic device at a ground contact collision stage during the falling process; The ground material recognition network is used to perform ground material recognition based on the acceleration feature data to obtain a ground material recognition result.
6. The method according to claim 5, characterized in that The method further comprises: When the electronic device falls, basic acceleration data of the electronic device is acquired, wherein the basic acceleration data includes first acceleration data of the electronic device in a ground contact collision phase during the falling process; Based on the basic acceleration data of the electronic device, intercepting the first acceleration data; Feature extraction is performed on the first acceleration data to obtain the acceleration feature data.
7. The method according to claim 5, characterized in that The method further comprises: The ground material recognition result is sent to the server.
8. An electronic device, characterized in that: It comprises a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, the computer program code comprises computer instructions, and when the processor executes the computer instructions, the electronic device executes the method as described in any one of claims 1-7.
9. A chip system, characterized in that: The chip system includes a processor; the processor is coupled to a memory, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the method as described in any one of claims 1-7 is executed.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instruction. When the computer program or instruction is executed on a computer, the computer executes the method according to any one of claims 1 to 7.
11. A computer program product, characterized in that The computer program product comprises: a computer program or instructions, and when the computer program or instructions are run on a computer, the computer is caused to perform the method according to any one of claims 1 to 7.
