CN110207643B - Folding angle detection method and device, terminal and storage medium - Google Patents

Folding angle detection method and device, terminal and storage medium Download PDF

Info

Publication number
CN110207643B
CN110207643B CN201910470425.1A CN201910470425A CN110207643B CN 110207643 B CN110207643 B CN 110207643B CN 201910470425 A CN201910470425 A CN 201910470425A CN 110207643 B CN110207643 B CN 110207643B
Authority
CN
China
Prior art keywords
data
detection model
angle detection
folding
neural network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910470425.1A
Other languages
Chinese (zh)
Other versions
CN110207643A (en
Inventor
陈治
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wingtech Communication Co Ltd
Original Assignee
Wingtech Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wingtech Communication Co Ltd filed Critical Wingtech Communication Co Ltd
Priority to CN201910470425.1A priority Critical patent/CN110207643B/en
Publication of CN110207643A publication Critical patent/CN110207643A/en
Application granted granted Critical
Publication of CN110207643B publication Critical patent/CN110207643B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B21/00Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant
    • G01B21/22Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant for measuring angles or tapers; for testing the alignment of axes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1423Digital output to display device ; Cooperation and interconnection of the display device with other functional units controlling a plurality of local displays, e.g. CRT and flat panel display
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

The embodiment of the invention discloses a method, a device, a terminal and a storage medium for detecting a folding angle, wherein the method is applied to the terminal with a folding display screen, the folding display screen comprises a main display screen and an auxiliary display screen, and an acceleration sensor and a geomagnetic sensor are arranged in both the main display screen and the auxiliary display screen, wherein the method comprises the following steps: acquiring acceleration data and/or geomagnetic data acquired by an acceleration sensor and/or a geomagnetic sensor in the main display screen and the auxiliary display screen in real time; and inputting the acceleration data and/or the geomagnetic data serving as input values into a pre-trained fold angle detection model, and determining the folding angle of the folding display screen according to the output value of the fold angle detection model. According to the embodiment of the invention, the calculation of the folding angle of the folding screen is simplified by designing the folding angle detection model, and secondary research and development are facilitated.

Description

Folding angle detection method and device, terminal and storage medium
Technical Field
The embodiment of the invention relates to the technical field of mobile terminals, in particular to a folding angle detection method, a folding angle detection device, a terminal and a storage medium.
Background
With the rapid development of mobile terminals, mobile terminals having a foldable display screen are receiving much attention because they can satisfy more demands of users. And in order to better determine the display state of the folding screen, the folding angle of the folding screen needs to be determined in real time.
At present, the conventional method for calculating the folding angle is as follows: the method comprises the steps of obtaining acceleration data and geomagnetic data of the mobile terminal, respectively calculating the attitude of a main screen of the terminal and the attitude of an auxiliary screen of the terminal according to an algorithm library provided by a supplier, and calculating the included angle between the main screen and the auxiliary screen by using similar triangles by utilizing the attitude data of the main screen, the auxiliary screen, such as ROLL (ROLL), PITCH (PITCH), YAW (YAW) and the like. This method has the following drawbacks: (1) the method relies entirely on a library of algorithms provided by the supplier to virtualize the angle of the current screen; (2) in the calculation of the included angles of the main screen and the auxiliary screen, similar triangles are used, the calculation is complex, and secondary development is not facilitated.
Disclosure of Invention
The embodiment of the invention provides a folding angle detection method, a folding angle detection device, a folding angle detection terminal and a storage medium, and aims to solve the technical problems that in the prior art, when a folding angle is calculated, an algorithm library provided by a supplier is completely relied on, secondary development is not facilitated, and calculation is complex.
In a first aspect, an embodiment of the present invention provides a method for detecting a folding angle, which is applied to a terminal having a folding display screen, where the folding display screen includes a main display screen and a sub display screen, and both the main display screen and the sub display screen are provided with an acceleration sensor and a geomagnetic sensor, where the method includes:
acquiring acceleration data and/or geomagnetic data acquired by an acceleration sensor and/or a geomagnetic sensor in the main display screen and the auxiliary display screen in real time;
and inputting the acceleration data and/or the geomagnetic data serving as input values into a pre-trained fold angle detection model, and determining the folding angle of the folding display screen according to the output value of the fold angle detection model.
Optionally, the folding angle detection model is a detection model designed based on a radial basis function neural network;
accordingly, the operation of constructing the folding angle detection model based on the radial basis function neural network includes:
determining parameters of a radial basis function neural network according to training sample data, wherein the training sample data comprises pre-collected acceleration data and/or geomagnetic data and folding angles corresponding to the acceleration data and/or the geomagnetic data;
and taking the acceleration data and/or the geomagnetic data in the training sample data as input, taking a folding angle corresponding to the acceleration data and/or the geomagnetic data as output, and training the radial basis function neural network to obtain a folding angle detection model based on the radial basis function neural network.
Optionally, the determining parameters of the radial basis function neural network according to the training sample data includes:
determining a radial basis center of a radial basis function neural network according to the training sample data;
and determining the variance of the radial basis function neural network according to the training sample data and the radial basis center.
Optionally, the fold angle detection model is a detection model designed based on a BP neural network;
correspondingly, the operation of constructing the folding angle detection model based on the BP neural network comprises the following steps:
determining an activation function of a BP neural network, and initializing the BP neural network by combining training sample data, wherein the training sample data comprises pre-collected acceleration data and/or geomagnetic data, and folding angles corresponding to the acceleration data and/or the geomagnetic data;
and training the BP neural network by taking the acceleration data and/or the geomagnetic data in the training sample data as input and taking a folding angle corresponding to the acceleration data and/or the geomagnetic data as output so as to obtain a folding angle detection model based on the BP neural network.
Optionally, the method further includes:
and verifying the trained fold angle detection model based on verification sample data to determine the reliability of the trained fold angle detection model, wherein the verification sample data at least comprises acceleration data and/or geomagnetic data acquired in advance.
Optionally, the verifying the trained fold angle detection model based on the verification sample data to determine the reliability of the trained fold angle detection model includes:
inputting the verification sample data into a trained fold angle detection model, acquiring a fold angle value output by the fold angle detection model, and carrying out normalization processing on the fold angle value to be used as the input of an evidence theory;
obtaining a trust function of an evidence theory, and determining parameters of the trust function according to the normalized folding angle value;
and acquiring a credible interval of an evidence theory according to the parameters of the trust function, and determining the credible interval of the folding angle detection model based on the credible interval of the evidence theory.
In a second aspect, an embodiment of the present invention further provides a folding angle detection apparatus configured in a terminal having a folding display screen, where the folding display screen includes a main display screen and a sub display screen, and an acceleration sensor and a geomagnetic sensor are both disposed in the main display screen and the sub display screen, where the apparatus includes:
the data acquisition module is used for acquiring acceleration data and/or geomagnetic data acquired by an acceleration sensor and/or a geomagnetic sensor in the main display screen and the auxiliary display screen in real time;
and the folding angle calculation module is used for inputting the acceleration data and/or the geomagnetic data serving as input values into a pre-trained folding angle detection model, and determining the folding angle of the folding display screen according to the output value of the folding angle detection model.
Optionally, the folding angle detection model is a detection model designed based on a radial basis function neural network;
correspondingly, the device also comprises a first construction module, which specifically comprises:
the parameter determining unit is used for determining parameters of the radial basis function neural network according to training sample data, wherein the training sample data comprises pre-acquired acceleration data and/or geomagnetic data and folding angles corresponding to the acceleration data and/or the geomagnetic data;
the first training unit is used for taking the acceleration data and/or the geomagnetic data in the training sample data as input, taking the folding angle corresponding to the acceleration data and/or the geomagnetic data as output, and training the radial basis function neural network to obtain a folding angle detection model based on the radial basis function neural network.
Optionally, the parameter determining unit is specifically configured to:
determining a radial basis center of a radial basis function neural network according to training sample data;
and determining the variance of the radial basis function neural network according to the training sample data and the radial basis center.
On the basis of the embodiment, the folding angle detection model is a detection model designed based on a BP neural network;
correspondingly, the device also comprises a second construction module, which specifically comprises:
the device comprises an initialization unit, a processing unit and a control unit, wherein the initialization unit is used for determining an activation function of a BP neural network and initializing the BP neural network by combining training sample data, and the training sample data comprises pre-acquired acceleration data and/or geomagnetic data and folding angles corresponding to the acceleration data and/or the geomagnetic data;
and the second training unit is used for taking the acceleration data and/or the geomagnetic data in the training sample data as input, taking the folding angle corresponding to the acceleration data and/or the geomagnetic data as output, and training the BP neural network to obtain a folding angle detection model based on the BP neural network.
Optionally, the apparatus further comprises:
and the verification module is used for verifying the trained folding angle detection model based on verification sample data so as to determine the reliability of the trained folding angle detection model, wherein the verification sample data at least comprises pre-acquired acceleration data and/or geomagnetic data.
Optionally, the verification module is specifically configured to:
inputting verification sample data into a trained fold angle detection model, acquiring a fold angle value output by the fold angle detection model, and carrying out normalization processing on the fold angle value to be used as input of an evidence theory;
obtaining a trust function of an evidence theory, and determining parameters of the trust function according to the normalized folding angle value;
and acquiring a credible interval of an evidence theory according to the parameters of the trust function, and determining the credible interval of the folding angle detection model based on the credible interval of the evidence theory.
In a third aspect, an embodiment of the present invention further provides a terminal with a foldable display screen, including:
one or more processors;
a memory for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the folding angle detection method according to any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the folding angle detection method according to any embodiment of the present invention.
The embodiment of the invention provides a folding angle detection method, a folding angle detection device, a terminal and a storage medium.
Drawings
Fig. 1 is a schematic flow chart of a folding angle detection method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for designing a fold angle detection model according to a second embodiment of the present invention;
fig. 3 is a schematic flow chart of a method for designing a fold angle detection model according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a folding angle detection apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal with a foldable display screen according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a folding angle detection method according to an embodiment of the present invention, where the embodiment is applicable to a situation where a display state of a folding screen is determined by detecting a folding angle of the folding screen in real time, and the method may be executed by a corresponding folding angle detection device, where the device may be implemented in a software and/or hardware manner, and may be configured on a mobile terminal having the folding screen.
As shown in fig. 1, the folding angle detection method provided in the embodiment of the present invention may include:
and S110, acquiring acceleration data and/or geomagnetic data acquired by the acceleration sensor and/or the geomagnetic sensor in the main display screen and the auxiliary display screen in real time.
Generally, in a mobile terminal with a foldable display screen, the foldable display screen comprises a main display screen and an auxiliary display screen, wherein an acceleration sensor and a geomagnetic sensor are arranged in the main display screen and the auxiliary display screen, and the posture of the mobile terminal can be detected through the acceleration sensor and the geomagnetic sensor, so that the folding angle of the foldable display screen can be determined. Therefore, it is necessary to acquire the acceleration data and/or the geomagnetic data collected by the acceleration sensor and/or the geomagnetic sensor in the main display screen and the sub display screen in real time.
And S120, inputting the acceleration data and/or the geomagnetic data serving as input values into a pre-trained fold angle detection model, and determining the folding angle of the folding display screen according to the output values of the fold angle detection model.
In the embodiment of the present invention, the pre-trained fold angle detection model is preferably a detection model designed based on a Radial Basis Function (RBF) neural network or a detection model designed based on a BP neural network. Therefore, the folding angle of the folding display screen can be determined only by inputting the acceleration data and/or the geomagnetic data acquired in real time into the pre-trained folding angle detection model and according to the output value of the folding angle detection model. It should be noted that, since the folding angle of the folding screen can be calculated based on the acceleration data alone or the geomagnetic data alone, any one of the acceleration data and the geomagnetic data can be used as an input value of the folding angle detection model, for example, in the form of a one-dimensional vector. Alternatively, the acceleration data and the geomagnetic data may be used as input values of the folding angle detection model at the same time, for example, in the form of two-dimensional vectors. After the acceleration data and/or the geomagnetic data are/is input into the pre-trained folding angle detection model, the folding angle of the folding display screen is determined according to the output value of the folding angle detection model, and therefore calculation of the folding angle is simplified. Furthermore, the folding angle detection model based on design and training is convenient for secondary research and development.
In the embodiment of the invention, the folding angle detection model is designed in advance, the acceleration data and/or the geomagnetic data collected in real time are used as the input of the folding angle detection model, and the folding angle can be determined according to the output of the folding angle detection model, so that the calculation of the folding angle is simplified, and the secondary research and development are facilitated on the basis of the folding angle detection model.
Example two
Fig. 2 is a schematic flow chart of a method for designing a fold angle detection model according to a second embodiment of the present invention. The present embodiment explains a design process of a folding angle detection model based on a radial basis function neural network on the basis of the above embodiments.
As shown in fig. 2, a method for designing a fold angle detection model provided in an embodiment of the present invention may include:
s210, determining parameters of the radial basis function neural network according to training sample data, wherein the training sample data comprises pre-collected acceleration data and/or geomagnetic data and folding angles corresponding to the acceleration data and/or the geomagnetic data.
Preferably, the training sample data is acquired acceleration data and/or geomagnetic data of the main display screen and the auxiliary display screen of the calibrated mobile terminal, and folding angle data corresponding to the acceleration data and/or the geomagnetic data. Illustratively, at least 400 times of acceleration data and/or geomagnetic data and corresponding folding angle data are collected as training sample data.
And according to training sample data, determining parameters of the radial basis function neural network, specifically comprising:
1) and determining the radial base center of the radial base function neural network according to the training sample data.
Optionally, based on the training sample data, the radial basis center may be determined by a direct calculation method, a clustering method, or a gradient descent method. Illustratively, the velocity data is distributed over [ -9.8, 9.8], and if the data is divided into 5 segments, the radial base center is chosen to be [ -9.8, -4.9, 0, 4.9, 9.8 ].
2) And determining the variance of the radial basis function neural network according to the training sample data and the radial basis center.
In the present embodiment, the radial basis function is preferably a gaussian function. And calculating the variance of the training sample data according to the training sample data and the radial basis center, and taking the calculated average variance as the variance of the Gaussian function. For example, if the training sample data is one of acceleration data or geomagnetic data, the variance of the acceleration data or geomagnetic data is used as the variance of the gaussian function. And if the training sample data is acceleration data and geomagnetic data, taking the average variance of the acceleration data and the geomagnetic data as the variance of the Gaussian function.
Further, after determining the parameters of the radial basis function neural network, the connection weight between the hidden layer and the output layer of the radial basis function neural network needs to be initialized.
S220, taking the acceleration data and/or the geomagnetic data in the training sample data as input, taking the folding angle corresponding to the acceleration data and/or the geomagnetic data as output, and training the radial basis function neural network to obtain a folding angle detection model based on the radial basis function neural network.
After step S210, the acceleration data and/or the geomagnetic data in the training sample data are used as input, the folding angle corresponding to the acceleration data and/or the geomagnetic data is used as output, the radial basis function neural network is trained, the weight value of the radial basis function neural network is determined, and then the folding angle detection model based on the radial basis function neural network is obtained, and the folding angle can be simply, conveniently and quickly calculated by using the model subsequently.
Furthermore, for the folded angle detection model obtained through training, the trained folded angle detection model needs to be checked based on verification sample data to determine the reliability of the trained folded angle detection model and ensure that the trained folded angle detection model can accurately detect the folded angle, wherein the verification sample data at least comprises pre-collected acceleration data and/or geomagnetic data.
Exemplarily, the reliability detection process of the fold angle detection model is as follows:
s1, inputting verification sample data into a trained folding angle detection model, obtaining a folding angle value output by a radial basis function of the folding angle detection model, and carrying out normalization processing on the folding angle value to be used as input of an evidence theory.
And S2, obtaining a trust function of the evidence theory, and determining parameters of the trust function according to the normalized folding angle value.
Illustratively, the standard normal distribution can be selected as a confidence function of the evidence theory, and the center and variance of the standard normal distribution can be determined according to the normalized folding angle value, for example, the mean and the mean variance of the normalized folding angle value are sequentially used as the center and variance of the standard normal distribution.
And S3, acquiring a credible interval of the evidence theory according to the parameters of the trust function, and determining the credible interval of the folding angle detection model based on the credible interval of the evidence theory.
Illustratively, the confidence interval of the normal distribution is determined according to the variance of the normal distribution, for example, the value of (1-3a) is taken as the confidence interval of the normal distribution, where a represents the variance. In this embodiment, a confidence interval with a normal distribution probability of 95% may be selected. Furthermore, on the basis of determining the credible interval of the evidence theory, the credible interval of the stack angle detection model can be determined by combining the parameters of the trust function. For example, based on the determined confidence interval of the normal distribution, the confidence interval of the fold angle detection model can be calculated according to the mathematical formula by combining the average value and the mean variance of the normalized fold angle values.
In the embodiment of the invention, the folding angle detection model is designed and trained based on the radial basis function neural network, and the reliability of the model is verified, so that the model is simple and convenient to calculate when the folding angle is calculated, and meanwhile, the accuracy of the calculation of the folding angle is ensured, and the detection of the folding angle of the folding screen of the mobile terminal in the early stage of actual detection, research and development and in the production process can be realized.
EXAMPLE III
Fig. 3 is a schematic flow chart of a method for designing a fold angle detection model according to a third embodiment of the present invention. The present embodiment explains a design process of a folding angle detection model based on a BP neural network on the basis of the above embodiments.
As shown in fig. 3, a method for designing a fold angle detection model provided in an embodiment of the present invention may include:
s310, determining an activation function of the BP neural network, and initializing the BP neural network by combining training sample data, wherein the training sample data comprises pre-collected acceleration data and/or geomagnetic data, and folding angles corresponding to the acceleration data and/or the geomagnetic data.
Preferably, an activation function Sigmoid function (i.e., Sigmoid function) of the BP neural network initializes an input layer weight and an output layer weight of the neural network by training sample data and the BP neural network activation function, and the number of neurons of the BP neural network is determined by training precision required by the acquired training sample data. Preferably, the training sample data is acquired acceleration data and/or geomagnetic data of the main display screen and the auxiliary display screen of the calibrated mobile terminal, and folding angle data corresponding to the acceleration data and/or the geomagnetic data. Illustratively, at least 400 times of acceleration data and/or geomagnetic data and corresponding folding angle data are collected as training sample data.
And S320, taking the acceleration data and/or the geomagnetic data in the training sample data as input, taking the folding angle corresponding to the acceleration data and/or the geomagnetic data as output, and training the BP neural network to obtain a folding angle detection model based on the BP neural network.
After step S310, training the BP neural network by using the acceleration data and/or the geomagnetic data in the training sample data as input and using the folding angle corresponding to the acceleration data and/or the geomagnetic data as output, determining the input layer weight and the output layer weight of the BP neural network, and then obtaining a folding angle detection model based on the BP neural network, and then simply, conveniently and quickly calculating the folding angle by using the model.
Furthermore, for the folded angle detection model obtained through training, the trained folded angle detection model needs to be checked based on verification sample data to determine the reliability of the trained folded angle detection model and ensure that the trained folded angle detection model can accurately detect the folded angle, wherein the verification sample data at least comprises pre-collected acceleration data and/or geomagnetic data.
Exemplarily, the reliability detection process of the fold angle detection model is as follows:
s1, inputting verification sample data into a trained folding angle detection model, obtaining a folding angle value output by a radial basis function of the folding angle detection model, and carrying out normalization processing on the folding angle value to be used as input of an evidence theory.
And S2, obtaining a trust function of the evidence theory, and determining parameters of the trust function according to the normalized folding angle value.
Illustratively, the standard normal distribution can be selected as a confidence function of the evidence theory, and the center and variance of the standard normal distribution can be determined according to the normalized folding angle value, for example, the mean and the mean variance of the normalized folding angle value are sequentially used as the center and variance of the standard normal distribution.
And S3, acquiring a credible interval of the evidence theory according to the parameters of the trust function, and determining the credible interval of the folding angle detection model based on the credible interval of the evidence theory.
Illustratively, the confidence interval of the normal distribution is determined according to the variance of the normal distribution, for example, the value of (1-3a) is taken as the confidence interval of the normal distribution, where a represents the variance. In this embodiment, a confidence interval with a normal distribution probability of 95% may be selected. Furthermore, on the basis of determining the credible interval of the evidence theory, the credible interval of the stack angle detection model can be determined by combining the parameters of the trust function. For example, based on the determined confidence interval of the normal distribution, the confidence interval of the fold angle detection model can be calculated according to the mathematical formula by combining the average value and the mean variance of the normalized fold angle values.
In the embodiment of the invention, the folding angle detection model is designed and trained based on the radial basis function neural network, and the reliability of the model is verified, so that the model is simple and convenient to calculate when the folding angle is calculated, and meanwhile, the accuracy of the calculation of the folding angle is ensured, and the detection of the folding angle of the folding screen of the mobile terminal in the early stage of actual detection, research and development and in the production process can be realized.
Example four
Fig. 4 is a schematic structural diagram of a folding angle detection apparatus according to a fourth embodiment of the present invention. This folding angle detection device configuration is in the terminal that has folding display screen, and wherein, folding display screen includes main display screen and vice display screen, all is provided with acceleration sensor and geomagnetic sensor in main display screen and the vice display screen, and as shown in fig. 4, the device includes:
a data obtaining module 410, configured to obtain, in real time, acceleration data and/or geomagnetic data collected by an acceleration sensor and/or a geomagnetic sensor in the main display screen and the sub display screen;
and the folding angle calculation module 420 is configured to input the acceleration data and/or the geomagnetic data as input values into a folding angle detection model trained in advance, and determine a folding angle of the folding display screen according to an output value of the folding angle detection model.
In the embodiment of the invention, the folding angle detection model is designed in advance, the acceleration data and/or the geomagnetic data collected in real time are used as the input of the folding angle detection model, and the folding angle can be determined according to the output of the folding angle detection model, so that the calculation of the folding angle is simplified, and the secondary research and development are facilitated on the basis of the folding angle detection model.
On the basis of the embodiment, the folding angle detection model is a detection model designed based on a radial basis function neural network;
correspondingly, the device also comprises a first construction module, which specifically comprises:
the parameter determining unit is used for determining parameters of the radial basis function neural network according to training sample data, wherein the training sample data comprises pre-acquired acceleration data and/or geomagnetic data and folding angles corresponding to the acceleration data and/or the geomagnetic data;
the first training unit is used for taking the acceleration data and/or the geomagnetic data in the training sample data as input, taking the folding angle corresponding to the acceleration data and/or the geomagnetic data as output, and training the radial basis function neural network to obtain a folding angle detection model based on the radial basis function neural network.
On the basis of the foregoing embodiment, the parameter determining unit is specifically configured to:
determining a radial basis center of a radial basis function neural network according to training sample data;
and determining the variance of the radial basis function neural network according to the training sample data and the radial basis center.
On the basis of the embodiment, the folding angle detection model is a detection model designed based on a BP neural network;
correspondingly, the device also comprises a second construction module, which specifically comprises:
the device comprises an initialization unit, a processing unit and a control unit, wherein the initialization unit is used for determining an activation function of a BP neural network and initializing the BP neural network by combining training sample data, and the training sample data comprises pre-acquired acceleration data and/or geomagnetic data and folding angles corresponding to the acceleration data and/or the geomagnetic data;
and the second training unit is used for taking the acceleration data and/or the geomagnetic data in the training sample data as input, taking the folding angle corresponding to the acceleration data and/or the geomagnetic data as output, and training the BP neural network to obtain a folding angle detection model based on the BP neural network.
On the basis of the above embodiment, the apparatus further includes:
and the verification module is used for verifying the trained folding angle detection model based on verification sample data so as to determine the reliability of the trained folding angle detection model, wherein the verification sample data at least comprises pre-acquired acceleration data and/or geomagnetic data.
On the basis of the above embodiment, the verification module is specifically configured to:
inputting verification sample data into a trained fold angle detection model, acquiring a fold angle value output by the fold angle detection model, and carrying out normalization processing on the fold angle value to be used as input of an evidence theory;
obtaining a trust function of an evidence theory, and determining parameters of the trust function according to the normalized folding angle value;
and acquiring a credible interval of the evidence theory according to the parameters of the trust function, and determining the credible interval of the folding angle detection model based on the credible interval of the evidence theory.
The folding angle detection device provided by the embodiment of the invention can execute the folding angle detection method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a terminal according to a fifth embodiment of the present invention. Fig. 5 illustrates a block diagram of an exemplary terminal 12 suitable for use in implementing embodiments of the present invention. The terminal 12 shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the terminal 12 is embodied in the form of a general purpose computing device. The components of the terminal 12 may include, but are not limited to: one or more processors or processors 16, a memory 28, and a bus 18 that connects the various system components (including the memory 28 and the processors 16).
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Terminal 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by terminal 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The terminal 12 can further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The terminal 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the terminal 12, and/or any devices (e.g., network card, modem, etc.) that enable the terminal 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the terminal 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with the other modules of the terminal 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the terminal 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processor 16 executes various functional applications and data processing by executing programs stored in the memory 28, for example, implementing a folding angle detection method provided by an embodiment of the present invention, the method including:
acquiring acceleration data and/or geomagnetic data acquired by an acceleration sensor and/or a geomagnetic sensor in a main display screen and a sub display screen in real time;
and inputting the acceleration data and/or the geomagnetic data serving as input values into a pre-trained folding angle detection model, and determining the folding angle of the folding display screen according to the output value of the folding angle detection model.
EXAMPLE six
In an embodiment of the invention, there is provided a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a method of fold angle detection, the method comprising:
acquiring acceleration data and/or geomagnetic data acquired by an acceleration sensor and/or a geomagnetic sensor in a main display screen and a sub display screen in real time;
and inputting the acceleration data and/or the geomagnetic data serving as input values into a pre-trained folding angle detection model, and determining the folding angle of the folding display screen according to the output value of the folding angle detection model.
Of course, the storage medium provided in the embodiments of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method described above, and may also perform related operations in the folding angle detection method provided in any embodiments of the present invention.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A folding angle detection method is applied to a terminal with a folding display screen, wherein the folding display screen comprises a main display screen and a secondary display screen, and an acceleration sensor and a geomagnetic sensor are arranged in both the main display screen and the secondary display screen, wherein the method comprises the following steps:
acquiring acceleration data and/or geomagnetic data acquired by an acceleration sensor and/or a geomagnetic sensor in the main display screen and the auxiliary display screen in real time;
inputting the acceleration data and/or the geomagnetic data serving as input values into a pre-trained fold angle detection model, and determining the folding angle of the folding display screen according to output values of the fold angle detection model;
the folding angle detection model is a detection model designed based on a radial basis function neural network;
accordingly, the operation of constructing the folding angle detection model based on the radial basis function neural network includes:
determining parameters of a radial basis function neural network according to training sample data, wherein the training sample data comprises pre-collected acceleration data and/or geomagnetic data and folding angles corresponding to the acceleration data and/or the geomagnetic data;
and taking the acceleration data and/or the geomagnetic data in the training sample data as input, taking a folding angle corresponding to the acceleration data and/or the geomagnetic data as output, and training the radial basis function neural network to obtain a folding angle detection model based on the radial basis function neural network.
2. The method of claim 1, wherein determining parameters of a radial basis function neural network from training sample data comprises:
determining a radial basis center of a radial basis function neural network according to the training sample data;
and determining the variance of the radial basis function neural network according to the training sample data and the radial basis center.
3. The method of claim 1, wherein the fold angle detection model is a detection model based on a BP neural network design;
correspondingly, the operation of constructing the folding angle detection model based on the BP neural network comprises the following steps:
determining an activation function of a BP neural network, and initializing the BP neural network by combining training sample data, wherein the training sample data comprises pre-collected acceleration data and/or geomagnetic data, and folding angles corresponding to the acceleration data and/or the geomagnetic data;
and training the BP neural network by taking the acceleration data and/or the geomagnetic data in the training sample data as input and taking a folding angle corresponding to the acceleration data and/or the geomagnetic data as output so as to obtain a folding angle detection model based on the BP neural network.
4. The method according to claim 1 or 3, characterized in that the method further comprises:
and verifying the trained fold angle detection model based on verification sample data to determine the reliability of the trained fold angle detection model, wherein the verification sample data at least comprises acceleration data and/or geomagnetic data acquired in advance.
5. The method of claim 4, wherein verifying the trained fold angle detection model based on the validation sample data to determine the confidence level of the trained fold angle detection model comprises:
inputting the verification sample data into a trained fold angle detection model, acquiring a fold angle value output by the fold angle detection model, and carrying out normalization processing on the fold angle value to be used as the input of an evidence theory;
obtaining a trust function of an evidence theory, and determining parameters of the trust function according to the normalized folding angle value;
and acquiring a credible interval of an evidence theory according to the parameters of the trust function, and determining the credible interval of the folding angle detection model based on the credible interval of the evidence theory.
6. A folding angle detection apparatus configured in a terminal having a folding display screen, the folding display screen including a main display screen and a sub display screen, the main display screen and the sub display screen each having an acceleration sensor and a geomagnetic sensor provided therein, wherein the apparatus includes:
the data acquisition module is used for acquiring acceleration data and/or geomagnetic data acquired by an acceleration sensor and/or a geomagnetic sensor in the main display screen and the auxiliary display screen in real time;
the folding angle calculation module is used for inputting the acceleration data and/or the geomagnetic data serving as input values into a pre-trained folding angle detection model, and determining the folding angle of the folding display screen according to the output value of the folding angle detection model;
the folding angle detection model is a detection model designed based on a radial basis function neural network;
correspondingly, the apparatus further comprises a first building block comprising:
the parameter determining unit is used for determining parameters of the radial basis function neural network according to training sample data, wherein the training sample data comprises pre-collected acceleration data and/or geomagnetic data and folding angles corresponding to the acceleration data and/or the geomagnetic data;
and the first training unit is used for taking the acceleration data and/or the geomagnetic data in the training sample data as input, taking a folding angle corresponding to the acceleration data and/or the geomagnetic data as output, and training the radial basis function neural network to obtain a folding angle detection model based on the radial basis function neural network.
7. The apparatus of claim 6, wherein the fold angle detection model is a detection model based on a BP neural network design;
correspondingly, the device further comprises a second building module, which specifically comprises:
the device comprises an initialization unit, a processing unit and a control unit, wherein the initialization unit is used for determining an activation function of a BP neural network and initializing the BP neural network by combining training sample data, and the training sample data comprises pre-acquired acceleration data and/or geomagnetic data and folding angles corresponding to the acceleration data and/or the geomagnetic data;
and the second training unit is used for taking the acceleration data and/or the geomagnetic data in the training sample data as input, taking a folding angle corresponding to the acceleration data and/or the geomagnetic data as output, and training the BP neural network to obtain a folding angle detection model based on the BP neural network.
8. The apparatus of claim 6 or 7, further comprising:
and the verification module is used for verifying the trained folding angle detection model based on verification sample data so as to determine the reliability of the trained folding angle detection model, wherein the verification sample data at least comprises pre-acquired acceleration data and/or geomagnetic data.
9. A terminal having a foldable display, the terminal comprising:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the fold angle detection method of any of claims 1-5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the fold angle detection method according to any one of claims 1 to 5.
CN201910470425.1A 2019-05-31 2019-05-31 Folding angle detection method and device, terminal and storage medium Active CN110207643B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910470425.1A CN110207643B (en) 2019-05-31 2019-05-31 Folding angle detection method and device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910470425.1A CN110207643B (en) 2019-05-31 2019-05-31 Folding angle detection method and device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN110207643A CN110207643A (en) 2019-09-06
CN110207643B true CN110207643B (en) 2021-02-19

Family

ID=67789905

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910470425.1A Active CN110207643B (en) 2019-05-31 2019-05-31 Folding angle detection method and device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN110207643B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110715597B (en) * 2019-10-21 2022-04-05 Oppo广东移动通信有限公司 Angle calculation method, angle calculation device, storage medium and terminal
CN112731228B (en) * 2019-10-29 2023-08-04 北京小米移动软件有限公司 Folding screen device and magnetic field detection method in folding screen device
CN116055599B (en) * 2022-08-19 2023-11-24 荣耀终端有限公司 Method for acquiring included angle of folding screen and electronic equipment

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9519857B2 (en) * 2008-06-30 2016-12-13 Nokia Technologies Oy Apparatus and method for sensing characterizing features of a deformable structure
US10438322B2 (en) * 2017-05-26 2019-10-08 Microsoft Technology Licensing, Llc Image resolution enhancement
CN107888769B (en) * 2017-11-07 2020-11-27 Oppo广东移动通信有限公司 Scene mode starting method and device and terminal
CN108449489B (en) * 2018-01-31 2020-10-23 维沃移动通信有限公司 Flexible screen control method, mobile terminal and server
CN108347720A (en) * 2018-02-08 2018-07-31 广东欧珀移动通信有限公司 communication connecting method, device, terminal and storage medium
CN109218648B (en) * 2018-09-21 2021-01-22 维沃移动通信有限公司 Display control method and terminal equipment
CN108848317A (en) * 2018-09-25 2018-11-20 Oppo(重庆)智能科技有限公司 Camera control method and Related product
CN109151442B (en) * 2018-09-30 2021-01-08 维沃移动通信有限公司 Image shooting method and terminal
CN109462672A (en) * 2018-10-09 2019-03-12 Oppo(重庆)智能科技有限公司 Display control method and Related product

Also Published As

Publication number Publication date
CN110207643A (en) 2019-09-06

Similar Documents

Publication Publication Date Title
CN110095752B (en) Positioning method, apparatus, device and medium
CN109145680B (en) Method, device and equipment for acquiring obstacle information and computer storage medium
CN109032102B (en) Unmanned vehicle testing method, device, equipment and storage medium
CN110207643B (en) Folding angle detection method and device, terminal and storage medium
JP2020047276A (en) Method and device for calibrating sensor, computer device, medium, and vehicle
CN109783490B (en) Data fusion method and device, computer equipment and storage medium
CN110378966B (en) Method, device and equipment for calibrating external parameters of vehicle-road coordination phase machine and storage medium
JP6756079B2 (en) Artificial intelligence-based ternary check method, equipment and computer program
CN110633991A (en) Risk identification method and device and electronic equipment
CN109408829B (en) Method, device, equipment and medium for determining readability of article
CN110378346A (en) Establish the method, apparatus, equipment and computer storage medium of Text region model
CN110222780A (en) Object detecting method, device, equipment and storage medium
CN110826036A (en) User operation behavior safety identification method and device and electronic equipment
CN111428805B (en) Method for detecting salient object, model, storage medium and electronic device
CN113989616A (en) Target detection method, device, equipment and storage medium
CN110555352A (en) interest point identification method, device, server and storage medium
CN111796701A (en) Model training method, operation processing method, device, storage medium and equipment
CN115575931A (en) Calibration method, calibration device, electronic equipment and storage medium
CN113780239B (en) Iris recognition method, iris recognition device, electronic device and computer readable medium
US9158380B2 (en) Identifying a 3-D motion on 2-D planes
CN112697146B (en) Steady regression-based track prediction method
CN116295466A (en) Map generation method, map generation device, electronic device, storage medium and vehicle
CN112966671A (en) Contract detection method and device, electronic equipment and storage medium
CN112036516A (en) Image processing method and device, electronic equipment and storage medium
CN111049988A (en) Intimacy prediction method, system, equipment and storage medium for mobile equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant