[go: up one dir, main page]

CN108307049A - Electronic device falls model update method and Related product - Google Patents

Electronic device falls model update method and Related product Download PDF

Info

Publication number
CN108307049A
CN108307049A CN201810045061.8A CN201810045061A CN108307049A CN 108307049 A CN108307049 A CN 108307049A CN 201810045061 A CN201810045061 A CN 201810045061A CN 108307049 A CN108307049 A CN 108307049A
Authority
CN
China
Prior art keywords
electronic device
data
output result
falling
input data
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.)
Granted
Application number
CN201810045061.8A
Other languages
Chinese (zh)
Other versions
CN108307049B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810045061.8A priority Critical patent/CN108307049B/en
Publication of CN108307049A publication Critical patent/CN108307049A/en
Application granted granted Critical
Publication of CN108307049B publication Critical patent/CN108307049B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/026Details of the structure or mounting of specific components
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Environmental & Geological Engineering (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请提供了一种电子装置的跌落模型更新方法及相关产品,该方法包括:采集所述电子装置的加速度数据;采集电子装置与地面的距离;依据加速度数据计算得到加速度值,提取跌落状态下的加速度值以及距离值,将跌落状态下的该加速度值以及距离值组成第一输入数据,将该第一输入数据输入第一跌落模型进行计算得到第一输出结果,将该第一输入数据作为训练数据对第一跌落模型进行重新训练得到第二跌落模型,将第一输入数据输入到第二跌落模型得到第二输出结果,将第一输出结果与第二输出结果比较,如第二输出结果大于第一输出结果,采用第二跌落模型替换第一跌落模型。本申请提供的技术方案具有用户体验度高的优点。

The application provides a method for updating a drop model of an electronic device and related products. The method includes: collecting acceleration data of the electronic device; collecting the distance between the electronic device and the ground; The acceleration value and distance value in the falling state are composed of the acceleration value and distance value in the falling state as the first input data, and the first input data is input into the first drop model for calculation to obtain the first output result, and the first input data is used as The training data retrains the first drop model to obtain the second drop model, and the first input data is input to the second drop model to obtain the second output result, and the first output result is compared with the second output result, such as the second output result greater than the first output result, the first drop model is replaced by the second drop model. The technical solution provided by this application has the advantage of high user experience.

Description

电子装置的跌落模型更新方法及相关产品Method for updating drop model of electronic device and related products

技术领域technical field

本申请涉及终端设备技术领域,具体涉及一种电子装置的跌落模型更新方法及相关产品。The present application relates to the technical field of terminal equipment, in particular to a method for updating a drop model of an electronic device and related products.

背景技术Background technique

现有技术中,移动终端(如手机、平板电脑等)已经成为用户首选和使用频率最高的电子装置,对于移动终端,屏幕容易碎是厂家或用户无法避免的一个问题,屏幕破碎后,终端的剩余价值就大打折扣,因为大部分厂家维修换屏的价格差不多已经超过终端的剩余价值。而且目前行业流行2.5D玻璃作为屏幕,更加容易跌坏和碎屏,各个主流厂家都在花大量的研发成本研究提高整机的跌落抗摔能力。In the prior art, mobile terminals (such as mobile phones, tablet computers, etc.) have become the first choice and most frequently used electronic devices for users. For mobile terminals, the fragile screen is an unavoidable problem for manufacturers or users. After the screen is broken, the terminal's The residual value is greatly reduced, because the price of repairing and replacing the screen by most manufacturers has almost exceeded the residual value of the terminal. Moreover, 2.5D glass is currently popular in the industry as a screen, which is more likely to be broken and broken. All mainstream manufacturers are spending a lot of research and development costs to improve the drop resistance of the whole machine.

现有的跌落数据的计算有多种方式,例如通过跌落模型进行计算,但是现有的跌落模型的参数在出厂设定以后即不会改变,但是电子装置的参数缺随时间在变换,所以现有的跌落模型的计算结果并不准确,影响客户的体验度。There are many ways to calculate the existing drop data, such as calculation through the drop model, but the parameters of the existing drop model will not change after the factory settings, but the parameters of the electronic device change with time, so now The calculation results of some drop models are not accurate, which affects the customer experience.

申请内容application content

本申请实施例提供了一种电子装置的跌落模型更新方法及相关产品,可以实现对跌落的场景进行还原,让用户直观的观看,提高用户体验度。Embodiments of the present application provide a method for updating a drop model of an electronic device and related products, which can restore a dropped scene, allow users to watch intuitively, and improve user experience.

第一方面,本申请实施例提供一种电子装置,所述电子装置包括:应用处理器AP、触控显示屏、重力传感器和距离传感器,其特征在于,In the first aspect, an embodiment of the present application provides an electronic device, the electronic device includes: an application processor AP, a touch display screen, a gravity sensor and a distance sensor, wherein,

所述重力传感器,用于采集所述电子装置的加速度数据;The gravity sensor is used to collect acceleration data of the electronic device;

所述距离传感器,用于采集电子装置与地面的距离;The distance sensor is used to collect the distance between the electronic device and the ground;

所述AP,用于依据加速度数据计算得到加速度值,依据该加速度值确定该电子装置处于的状态,该状态包括:普通状态和跌落状态;The AP is used to calculate an acceleration value based on the acceleration data, and determine the state of the electronic device according to the acceleration value, and the state includes: a normal state and a falling state;

所述AP,用于提取跌落状态下的加速度值以及距离值,将跌落状态下的该加速度值以及距离值组成第一输入数据,将该第一输入数据输入第一跌落模型进行计算得到第一输出结果,将该第一输入数据作为训练数据对第一跌落模型进行重新训练得到第二跌落模型,将第一输入数据输入到第二跌落模型得到第二输出结果,将第一输出结果与第二输出结果比较,如第二输出结果大于第一输出结果,采用第二跌落模型替换第一跌落模型。The AP is used to extract the acceleration value and the distance value in the falling state, compose the acceleration value and the distance value in the falling state into the first input data, and input the first input data into the first drop model for calculation to obtain the first Output the result, use the first input data as training data to retrain the first drop model to obtain the second drop model, input the first input data to the second drop model to obtain the second output result, and combine the first output result with the second drop model Comparing the two output results, if the second output result is greater than the first output result, the first drop model is replaced by the second drop model.

第二方面,提供一种基于人工智能的跌落数据计算方法,所述方法应用于电子装置内,所述电子装置包括:应用处理器AP、触控显示屏、重力传感器和距离传感器,所述方法包括:In a second aspect, a method for calculating drop data based on artificial intelligence is provided, the method is applied in an electronic device, and the electronic device includes: an application processor AP, a touch display screen, a gravity sensor and a distance sensor, the method include:

采集所述电子装置的加速度数据;collecting acceleration data of the electronic device;

采集电子装置与地面的距离;Collect the distance between the electronic device and the ground;

依据加速度数据计算得到加速度值,依据该加速度值确定该电子装置处于的状态,该状态包括:普通状态和跌落状态;The acceleration value is calculated according to the acceleration data, and the state of the electronic device is determined according to the acceleration value, and the state includes: a normal state and a falling state;

提取跌落状态下的加速度值以及距离值,将跌落状态下的该加速度值以及距离值组成第一输入数据,将该第一输入数据输入第一跌落模型进行计算得到第一输出结果,将该第一输入数据作为训练数据对第一跌落模型进行重新训练得到第二跌落模型,将第一输入数据输入到第二跌落模型得到第二输出结果,将第一输出结果与第二输出结果比较,如第二输出结果大于第一输出结果,采用第二跌落模型替换第一跌落模型。Extracting the acceleration value and distance value in the falling state, forming the first input data with the acceleration value and the distance value in the falling state, inputting the first input data into the first drop model for calculation to obtain the first output result, and using the first input data One input data is used as training data to retrain the first drop model to obtain the second drop model, and the first input data is input to the second drop model to obtain the second output result, and the first output result is compared with the second output result, such as The second output result is greater than the first output result, and the first drop model is replaced by the second drop model.

第三方面,提供一种电子装置,所述电子装置包括:处理单元、触控显示屏、重力传感器、电路和距离传感器,In a third aspect, an electronic device is provided, and the electronic device includes: a processing unit, a touch display screen, a gravity sensor, a circuit, and a distance sensor,

所述重力传感器,用于采集所述电子装置的加速度数据;The gravity sensor is used to collect acceleration data of the electronic device;

所述距离传感器,用于采集电子装置与地面的距离;The distance sensor is used to collect the distance between the electronic device and the ground;

所述处理单元,用于依据加速度数据计算得到加速度值,依据该加速度值确定该电子装置处于的状态,该状态包括:普通状态和跌落状态;The processing unit is used to calculate an acceleration value according to the acceleration data, and determine the state of the electronic device according to the acceleration value, and the state includes: a normal state and a falling state;

所述处理单元,用于提取跌落状态下的加速度值以及距离值,将跌落状态下的该加速度值以及距离值组成第一输入数据,将该第一输入数据输入第一跌落模型进行计算得到第一输出结果,将该第一输入数据作为训练数据对第一跌落模型进行重新训练得到第二跌落模型,将第一输入数据输入到第二跌落模型得到第二输出结果,将第一输出结果与第二输出结果比较,如第二输出结果大于第一输出结果,采用第二跌落模型替换第一跌落模型。The processing unit is configured to extract the acceleration value and the distance value in the falling state, compose the acceleration value and the distance value in the falling state into first input data, and input the first input data into the first drop model for calculation to obtain the first input data. One output result, the first input data is used as the training data to retrain the first drop model to obtain the second drop model, the first input data is input to the second drop model to obtain the second output result, and the first output result is combined with Comparing the second output result, if the second output result is greater than the first output result, the first drop model is replaced by the second drop model.

第四方面,提供一种计算机可读存储介质,其存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行第二方面提供的所述的方法。In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program for electronic data exchange, wherein the computer program causes a computer to execute the method provided in the second aspect.

第五方面,提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行第二方面提供的方法。In a fifth aspect, a computer program product is provided, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the method provided in the second aspect.

实施本申请实施例,具有如下有益效果:Implementing the embodiment of the present application has the following beneficial effects:

可以看出,本申请提供的技术方案采集到加速度数据以后,依据加速度数据计算加速度值,采集电子装置与地面的距离,当确定为跌落状态时,提取跌落状态的加速值以及距离值,将该加速度值以及距离值组成第一输入数据,将该第一输入数据输入到第一跌落模型中进行计算得到第一输出结果,然后将第一输入数据作为训练数据对第一跌落模型进行重新训练得到第二跌落模型,将第一输入数据输入到第二跌落模型得到第二输出结果,如第二输出结果大于第一输出结果,采用第二跌落模型替换第一跌落模型,这样即能够依据实际的检测数据对现有的跌落模型的参数进行更新,从而更适应与电子装置当前的状态,提高计算的准确度,提高用户的体验度。It can be seen that after the technical solution provided by the application collects acceleration data, the acceleration value is calculated according to the acceleration data, and the distance between the electronic device and the ground is collected. When it is determined to be in a falling state, the acceleration value and distance value of the falling state are extracted, and the The acceleration value and the distance value form the first input data, and input the first input data into the first drop model for calculation to obtain the first output result, and then use the first input data as training data to retrain the first drop model to obtain The second drop model, the first input data is input to the second drop model to obtain the second output result, if the second output result is greater than the first output result, the second drop model is used to replace the first drop model, so that it can be based on the actual The detection data updates the parameters of the existing drop model, so as to be more adaptable to the current state of the electronic device, improve calculation accuracy, and improve user experience.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. For Those of ordinary skill in the art can also obtain other drawings based on these drawings without making creative efforts.

图1是本申请实施例提供的一种电子装置的结构示意图。FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

图1a是本申请实施例提供的一种平行板电容器的示意图。Fig. 1a is a schematic diagram of a parallel plate capacitor provided by an embodiment of the present application.

图1b是本申请实施例提供的另一种平行板电容器的示意图。Fig. 1b is a schematic diagram of another parallel plate capacitor provided by an embodiment of the present application.

图1c是本申请实施例提供的又一种平行板电容器的示意图。Fig. 1c is a schematic diagram of another parallel plate capacitor provided by the embodiment of the present application.

图1d是本申请实施例提供的加速度的示意图。Fig. 1d is a schematic diagram of the acceleration provided by the embodiment of the present application.

图2是本申请实施例公开的一种电子装置的示意图。Fig. 2 is a schematic diagram of an electronic device disclosed in an embodiment of the present application.

图3a是本申请实施例公开的一种卷积的示意图。Fig. 3a is a schematic diagram of a convolution disclosed in an embodiment of the present application.

图3b是本申请实施例的一种输入数据的移动示意图。Fig. 3b is a schematic diagram of movement of input data according to an embodiment of the present application.

图3c是本申请实施例的一种输入数据的示意图。Fig. 3c is a schematic diagram of input data according to the embodiment of the present application.

图3d是本申请实施例的一种输入数据的插入示意图。Fig. 3d is a schematic diagram of inserting input data according to the embodiment of the present application.

图4是本申请实施例提供的一种电子装置的跌落模型更新方法的流程示意图。FIG. 4 is a schematic flowchart of a method for updating a drop model of an electronic device provided in an embodiment of the present application.

图5是本申请实施例提供的一种电子装置的结构示意图。FIG. 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

图6是本申请实施例公开的一种手机的结构示意图。FIG. 6 is a schematic structural diagram of a mobile phone disclosed in an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of this application.

本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third" and "fourth" in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order . Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally further includes For other steps or units inherent in these processes, methods, products or apparatuses.

在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.

本申请中的电子装置可以包括智能手机(如Android手机、iOS手机、WindowsPhone手机等)、平板电脑、掌上电脑、笔记本电脑、移动互联网设备(MID,Mobile InternetDevices)或穿戴式设备等,上述电子装置仅是举例,而非穷举,包含但不限于上述电子装置,为了描述的方便,下面实施例中将上述电子装置称为用户设备(User equipment,UE)。当然在实际应用中,上述用户设备也不限于上述变现形式,例如还可以包括:智能车载终端、计算机设备等等。The electronic devices in this application may include smart phones (such as Android mobile phones, iOS mobile phones, WindowsPhone mobile phones, etc.), tablet computers, palmtop computers, notebook computers, mobile Internet devices (MID, Mobile InternetDevices) or wearable devices, etc., the above-mentioned electronic devices It is only an example, not exhaustive, including but not limited to the above-mentioned electronic device. For the convenience of description, the above-mentioned electronic device is referred to as user equipment (User equipment, UE) in the following embodiments. Of course, in practical applications, the above-mentioned user equipment is not limited to the above-mentioned realization forms, for example, it may also include: a smart vehicle terminal, a computer device, and the like.

在第一方面提供的电子装置,所述电子装置还包括:通信模块;In the electronic device provided in the first aspect, the electronic device further includes: a communication module;

所述AP,还用于控制通信模块将所述第二跌落模型的权值数据发送至网络侧设备。The AP is further configured to control the communication module to send the weight data of the second drop model to the network side device.

在第一方面提供的电子装置,所述AP,具体用于如有n个加速度值,按采集点的顺序遍历n个加速度值,如连续m个加速度值大于设定阈值,确定为跌落状态,否则确定为普通状态。In the electronic device provided in the first aspect, the AP is specifically used for traversing the n acceleration values in the order of the collection points if there are n acceleration values, and if m consecutive acceleration values are greater than the set threshold, it is determined to be in a falling state, Otherwise, it is determined as a normal state.

在第一方面提供的电子装置,所述AP,具体用于将该第一输入数据作为训练数据输入第一跌落模型执行V层正向运算得到正向运算的第V层正向运算结果,对第V层正向运算结果处理得到第V层输入数据梯度,将第V层输入数据梯度输入到第一跌落模型的第V层执行V层反向运算得到V个权值梯度,采用V个权值梯度对V层权值进行更新得到更新后权值数据,将更新后的权值数据确定为第二跌落模型的权值数据。In the electronic device provided in the first aspect, the AP is specifically used to input the first input data as the training data into the first drop model to perform the V-layer forward operation to obtain the V-th layer forward operation result of the forward operation. The input data gradient of the Vth layer is obtained by processing the result of the forward operation of the Vth layer, and the input data gradient of the Vth layer is input to the Vth layer of the first drop model to perform the reverse operation of the V layer to obtain V weight gradients. The value gradient updates the weight of the V layer to obtain updated weight data, and the updated weight data is determined as the weight data of the second drop model.

在第二方面提供的方法中,所述方法还包括:In the method provided in the second aspect, the method also includes:

将所述第二跌落模型的权值数据发送至网络侧设备。Sending the weight data of the second drop model to the network side device.

在第二方面提供的方法中,如有n个加速度值,所述依据该加速度值确定该电子装置处于的状态,包括:In the method provided in the second aspect, if there are n acceleration values, determining the state of the electronic device according to the acceleration values includes:

按采集点的顺序遍历n个加速度值,如连续m个加速度值大于设定阈值,确定为跌落状态,否则确定为普通状态。Traverse n acceleration values in the order of collection points. If m consecutive acceleration values are greater than the set threshold, it is determined to be in a falling state, otherwise it is determined to be in a normal state.

在第二方面提供的方法中,所述将该第一输入数据作为训练数据对第一跌落模型进行重新训练得到第二跌落模型,包括:In the method provided in the second aspect, retraining the first drop model to obtain the second drop model by using the first input data as training data includes:

将该第一输入数据作为训练数据输入第一跌落模型执行V层正向运算得到正向运算的第V层正向运算结果,对第V层正向运算结果处理得到第V层输入数据梯度,将第V层输入数据梯度输入到第一跌落模型的第V层执行V层反向运算得到V个权值梯度,采用V个权值梯度对V层权值进行更新得到更新后权值数据,将更新后的权值数据确定为第二跌落模型的权值数据。Inputting the first input data as the training data into the first drop model to perform the V-layer forward operation to obtain the V-th layer forward operation result of the forward operation, and processing the V-th layer forward operation result to obtain the V-layer input data gradient, Input the input data gradient of the Vth layer to the Vth layer of the first drop model to perform the reverse operation of the V layer to obtain V weight gradients, and use the V weight gradients to update the weights of the V layer to obtain the updated weight data. The updated weight data is determined as the weight data of the second drop model.

请参阅图1,图1是本申请实施例提供了一种电子装置,请参阅图1,图1是本发明实施例提供了一种电子装置100的结构示意图,上述电子装置100包括:壳体110、电路板120、电池130、盖板140、触控显示屏150、重力传感器(英文:Gravity Sensor,简称:G-sensor)170,距离传感器180,所述壳体110上设置所述电路板120、所述电池130和所述盖板140,所述电路板120还设置有连接所述触控显示屏150的电路;所述电路板120还可以包括:应用处理器AP190、重力传感器170和距离传感器180。Please refer to FIG. 1. FIG. 1 is an electronic device provided by an embodiment of the present application. Please refer to FIG. 1. FIG. 1 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present invention. The above-mentioned electronic device 100 includes: a casing 110, a circuit board 120, a battery 130, a cover plate 140, a touch screen 150, a gravity sensor (English: Gravity Sensor, G-sensor for short) 170, a distance sensor 180, and the circuit board is arranged on the housing 110 120, the battery 130 and the cover plate 140, the circuit board 120 is also provided with a circuit connected to the touch display screen 150; the circuit board 120 may also include: an application processor AP190, a gravity sensor 170 and distance sensor 180 .

上述触控显示屏具体可以为薄膜晶体管液晶显示器(Thin Film Transistor-Liquid Crystal Display,TFT-LCD)、发光二极管(Light Emitting Diode,LED)显示屏、有机发光二极管(Organic Light-Emitting Diode,OLED)显示屏等。The above-mentioned touch display screen may specifically be a thin film transistor liquid crystal display (Thin Film Transistor-Liquid Crystal Display, TFT-LCD), a light emitting diode (Light Emitting Diode, LED) display screen, an organic light emitting diode (Organic Light-Emitting Diode, OLED) display screen etc.

重力传感器170,用于检测加速度的方向和大小,等效于检测电子装置的运动状态。G-sensor的功能理解起来比较简单,主要是感知加速力的变化,比如晃动、跌落、上升、下降等各种移动变化都能被G-sensor转化为电信号,然后通过应用处理器AP190的计算分析后,就能够确定该电子装置的加速度值。The gravity sensor 170 is used to detect the direction and magnitude of the acceleration, which is equivalent to detecting the motion state of the electronic device. The function of the G-sensor is relatively simple to understand, mainly to perceive changes in acceleration force, such as shaking, falling, rising, falling and other movement changes, which can be converted into electrical signals by the G-sensor, and then calculated by the application processor AP190 After analysis, the acceleration value of the electronic device can be determined.

可选的,上述电子装置还可以包括:地磁传感器和陀螺仪,该地磁传感器和陀螺仪分别与应用处理器AP190连接。在电子装置上,G-sensor不仅仅单独工作,还可以与地磁传感器171、陀螺仪172一起协同工作,提供更加精确和全面的动作感应能力。Optionally, the above-mentioned electronic device may further include: a geomagnetic sensor and a gyroscope, and the geomagnetic sensor and the gyroscope are respectively connected to the application processor AP190. On the electronic device, the G-sensor not only works alone, but also cooperates with the geomagnetic sensor 171 and the gyroscope 172 to provide more accurate and comprehensive motion sensing capabilities.

具体的,在电子装置内,重力传感器170实际可以为一种平行板电容器,对于平行板电容器的容值大小和板间距离成反比,通过检测X、Y、Z方向上的电容变化,就可以计算得到各方向上的线性加速度大小。Specifically, in the electronic device, the gravity sensor 170 can actually be a parallel plate capacitor. The capacitance of the parallel plate capacitor is inversely proportional to the distance between the plates. By detecting the capacitance changes in the X, Y, and Z directions, it can Calculate the linear acceleration in each direction.

以X方向的加速度计算方式为例,其加速度值具体可以为:Taking the acceleration calculation method in the X direction as an example, the specific acceleration value can be:

如图1a所示,为一种平行板电容器的示意图。As shown in Figure 1a, it is a schematic diagram of a parallel plate capacitor.

参阅图1a,图1a对应的加速度为0,如图1a所示,由于此时没有加速度值,所以中间的平行板位于初始位置,所以此时的电容值C1=C0,该C1可以为平行板与下电极之间的电容值,该C0可以为初始电容值。此时的电容值C2=C0,该C2可以为平行板与上电极之间的电容值,此时,电容C1对应的距离d1=d0;电容C2对应的距离d2=d0;其中,d1可以为平行板与下电极之间的距离,d2可以为平行板与上电极之间的距离。由于此时的加速度值为零,所以C1=C2=C0;依据上述公式即能够计算得到ax=0。Referring to Figure 1a, the acceleration corresponding to Figure 1a is 0, as shown in Figure 1a, since there is no acceleration value at this time, the parallel plate in the middle is at the initial position, so the capacitance value C 1 =C 0 at this time, this C 1 can is the capacitance value between the parallel plate and the lower electrode, and the C 0 may be the initial capacitance value. The capacitance value at this time is C 2 =C 0 , and this C 2 can be the capacitance value between the parallel plate and the upper electrode. At this time, the distance d 1 =d 0 corresponding to the capacitance C 1 ; the distance d 2 corresponding to the capacitance C 2 =d 0 ; wherein, d 1 may be the distance between the parallel plate and the lower electrode, and d 2 may be the distance between the parallel plate and the upper electrode. Since the acceleration value at this time is zero, C 1 =C 2 =C 0 ; a x =0 can be calculated according to the above formula.

参阅图1b,图1b对应的加速度为正值,由于正值加速度的作用,平行板会向下电极移动,假设移动距离为x,那么对于平行板与上电极之间的距离,即会增加x,所以此时的,d1=d0-x,d2=d0+x;依据平板电容的计算公式,如下述公式所示:Refer to Figure 1b. The acceleration corresponding to Figure 1b is a positive value. Due to the positive acceleration, the parallel plate will move to the lower electrode. Assuming that the moving distance is x, then the distance between the parallel plate and the upper electrode will increase by x , so at this time, d 1 =d 0 -x, d 2 =d 0 +x; according to the calculation formula of plate capacitance, it is shown in the following formula:

其中,S可以为平行板电容器的两个板之间相对应的面积,ε为介电常数(其由平板电极的材料决定),k为静电常数,d为平行板电容器的两个板之间的距离。Among them, S can be the corresponding area between the two plates of the parallel plate capacitor, ε is the dielectric constant (it is determined by the material of the plate electrode), k is the electrostatic constant, and d is the distance between the two plates of the parallel plate capacitor the distance.

如图1b所示的电容值如下:The capacitance values shown in Figure 1b are as follows:

所以,由于平行板电容器的平行板向下电极移动,所以C1>C2,即ax>0。Therefore, since the parallel plate of the parallel plate capacitor moves to the lower electrode, C 1 >C 2 , ie a x >0.

参阅图1c,图1c对应的加速度为负值,由于负值加速度的作用,平行板会向上电极移动,假设移动距离为x,那么对于平行板与上电极之间的距离,即会增加x,所以此时的,d1=d0+x,d2=d0-x;依据平板电容的计算公式,如下述公式所示:Refer to Figure 1c. The acceleration corresponding to Figure 1c is negative. Due to the effect of negative acceleration, the parallel plate will move to the upper electrode. Assuming that the moving distance is x, then the distance between the parallel plate and the upper electrode will increase by x. So at this time, d 1 =d 0 +x, d 2 =d 0 -x; according to the calculation formula of plate capacitance, it is shown in the following formula:

如图1c所示的电容值如下:The capacitance values shown in Figure 1c are as follows:

此时由于平行板电容器的平行板向上电极移动,所以C1<C2,即ax<0。At this time, since the parallel plate of the parallel plate capacitor moves to the upper electrode, C 1 <C 2 , that is, a x <0.

即通过对上述平行板电容器的测试,即能够得到具体的加速度值,并且该值能够表现出加速度的方向。That is, through the test of the above-mentioned parallel plate capacitor, the specific acceleration value can be obtained, and this value can represent the direction of the acceleration.

具体的,对于电子装置来说,其测试的加速度的值具有三个方向,如图1d所示,为电子装置测试的三个方向的示意图,具体的,可以分为X轴方向、Y轴方向以及Z轴方向,其具体的显示示意如图1d所示。Specifically, for an electronic device, the value of the acceleration tested has three directions, as shown in Figure 1d, which is a schematic diagram of the three directions tested by the electronic device. Specifically, it can be divided into the X-axis direction and the Y-axis direction. As well as the Z-axis direction, its specific display schematic diagram is shown in FIG. 1d.

具体的,在一个可选的跌落测试中,其在跌落过程中其对应的加速度值可以为:Specifically, in an optional drop test, its corresponding acceleration value during the fall can be:

ax=0.049m/S2 ax = 0.049m/S 2

ay=—0.026m/S2 a y =—0.026m/S 2

az=9.800m/S2a z = 9.800 m/S 2 .

依据上述数据可以确定该电子装置处于跌落中的状态。According to the above data, it can be determined that the electronic device is in a falling state.

如图2所示,为本申请提供的一种电子装置的结构示意图,如图2所示,该电子装置200包括:壳体、应用处理器AP210、触控显示屏220、重力传感器250、距离传感器260和电路240,所述壳体的外部设置有摄像头230,所述摄像头、所述触控显示屏通过至少一个电路与所述应用处理器AP连接。其中,所述AP210通过另一电路连接重力传感器250以及距离传感器,其中,该电路240具体可以包括:总线、柔性电路板、连接芯片等等,当然在实际应用中,上述电路240也可以是其他的表现形式,本申请具体实施方式并不限制上述电路240的具体表现形式。上述电子装置200还可以包括:地磁传感器和陀螺仪,该地磁传感器和陀螺仪可以结合重力传感器250采集数据;该电子装置200还可以包括:人工智能处理器,该人工智能处理器可以单独设置,也可以与应用处理器AP210集成在一起,为了描述方便,如图2所示的实施例,将人工智能处理器集成在AP210内。As shown in FIG. 2, it is a schematic structural diagram of an electronic device provided by the present application. As shown in FIG. A sensor 260 and a circuit 240 , a camera 230 is arranged outside the housing, and the camera and the touch screen are connected to the application processor AP through at least one circuit. Wherein, the AP210 is connected to the gravity sensor 250 and the distance sensor through another circuit, wherein the circuit 240 may specifically include: a bus, a flexible circuit board, a connection chip, etc. Of course, in practical applications, the above circuit 240 may also be other The expression form of the above-mentioned circuit 240 is not limited by the specific embodiment of the present application. The above-mentioned electronic device 200 can also include: a geomagnetic sensor and a gyroscope, which can collect data in combination with a gravity sensor 250; the electronic device 200 can also include: an artificial intelligence processor, which can be set separately, It can also be integrated with the application processor AP210. For the convenience of description, in the embodiment shown in FIG. 2, the artificial intelligence processor is integrated in the AP210.

重力传感器250,用于采集电子装置的加速度数据,将该加速度数据传输给应用处理器AP;The gravity sensor 250 is used to collect the acceleration data of the electronic device, and transmit the acceleration data to the application processor AP;

距离传感器260,用于采集电子装置与地面的距离;The distance sensor 260 is used to collect the distance between the electronic device and the ground;

AP210,用于依据加速度数据计算得到加速度值,依据该加速度值确定该电子装置处于的状态,该状态包括:普通状态和跌落状态;AP210 is used to calculate the acceleration value based on the acceleration data, and determine the state of the electronic device according to the acceleration value, and the state includes: normal state and falling state;

可选的,上述加速度数据可以为平行板电容器的多个电容值,具体的,可以为如图1a、如图1b、如图1c所示的C1和C2的值。当然在实际应用中,由于需要采集如图1d所示的X、Y、Z三轴的加速度数据。当然在实际应用中,采用其他的重力传感器,该加速度数据的也可以是其他类型的数据,本申请具体实施方式并不限制上述加速度数据的实际表现形式。Optionally, the above acceleration data may be multiple capacitance values of parallel plate capacitors, specifically, may be the values of C1 and C2 as shown in Fig. 1a, Fig. 1b, and Fig. 1c. Of course, in practical applications, it is necessary to collect the acceleration data of the X, Y, and Z axes as shown in FIG. 1d. Of course, in practical applications, if other gravity sensors are used, the acceleration data may also be other types of data, and the specific embodiments of the present application do not limit the actual form of expression of the above acceleration data.

上述加速度值的个数可以为n个加速度值。具体的,AP210按采集点的顺序遍历n个加速度值,如连续m个加速度值大于设定阈值,确定为跌落状态,否则确定为普通状态。其中,n、m为大于等于2的整数,且m<n。The number of the above acceleration values may be n acceleration values. Specifically, the AP 210 traverses n acceleration values in the order of collection points. If m consecutive acceleration values are greater than the set threshold, it is determined as a falling state, otherwise it is determined as a normal state. Wherein, n and m are integers greater than or equal to 2, and m<n.

AP210,用于提取跌落状态下的加速度值以及距离,将该加速度值以及距离值组成第一输入数据,将该第一输入数据输入第一跌落模型进行计算得到第一输出结果,将该第一输入数据作为训练数据对第一跌落模型进行重新训练得到第二跌落模型,将第一输入数据输入到第二跌落模型得到第二输出结果,将第一输出结果与第二输出结果比较,如第二输出结果大于第一输出结果,采用第二跌落模型替换第一跌落模型。AP210 is used to extract the acceleration value and distance in the falling state, compose the acceleration value and distance value into the first input data, input the first input data into the first drop model for calculation to obtain the first output result, and use the first input data The input data is used as training data to retrain the first drop model to obtain the second drop model, and the first input data is input to the second drop model to obtain the second output result, and the first output result is compared with the second output result, as in the first step The second output result is greater than the first output result, and the first drop model is replaced by the second drop model.

本申请提供的技术方案采集到加速度数据以后,依据加速度数据计算加速度值,采集电子装置与地面的距离,当确定为跌落状态时,提取跌落状态的加速值以及距离值,将该加速度值以及距离值组成第一输入数据,将该第一输入数据输入到第一跌落模型中进行计算得到第一输出结果,然后将第一输入数据作为训练数据对第一跌落模型进行重新训练得到第二跌落模型,将第一输入数据输入到第二跌落模型得到第二输出结果,如第二输出结果大于第一输出结果,采用第二跌落模型替换第一跌落模型,这样即能够依据实际的检测数据对现有的跌落模型的参数进行更新,从而更适应与电子装置当前的状态,提高计算的准确度,提高用户的体验度。After the technical solution provided by the application collects the acceleration data, the acceleration value is calculated according to the acceleration data, and the distance between the electronic device and the ground is collected. When the falling state is determined, the acceleration value and the distance value of the falling state are extracted, and the acceleration value and the distance Values form the first input data, input the first input data into the first drop model for calculation to obtain the first output result, and then use the first input data as training data to retrain the first drop model to obtain the second drop model , input the first input data into the second drop model to get the second output result, if the second output result is greater than the first output result, the second drop model is used to replace the first drop model, so that the actual detection data can be used for the current The parameters of some drop models are updated, so as to be more suitable for the current state of the electronic device, improve the calculation accuracy, and improve the user experience.

可选的,上述AP210,还用于在确定第二输出结果小于或等于第一输出结果时,删除第二跌落模型。Optionally, the aforementioned AP210 is further configured to delete the second drop model when it is determined that the second output result is less than or equal to the first output result.

对于第二输出结果小于或等于第一输出结果的技术方案即训练后的第二跌落模型次于第一跌落模型,此时,无需对第一跌落模型更新,所以直接删除第二跌落模型即可。For the technical solution where the second output result is less than or equal to the first output result, that is, the trained second drop model is inferior to the first drop model. At this time, there is no need to update the first drop model, so just delete the second drop model directly. .

上述第一输出结果与第二输出结果的比较的方法可以为,The method for comparing the above-mentioned first output result with the second output result may be,

如该第一输出结果与第二输出结果均为数据块,该数据块具体可以包括:向量、矩阵、三维数据、四维数据中的一种。提取第一输出结果的最大元素值Xmax1,提取第二输出结果的最大元素值Xmax2;如Xmax2>Xmax1,确定第二输出结果大于第一输出结果,如Xmax2≤Xmax1,确定第二输出结果小于等于第一输出结果。当然其比较的方法还可以采用其他的方式,本申请并不局限上述比较的具体方式。If both the first output result and the second output result are data blocks, the data blocks may specifically include: one of vectors, matrices, three-dimensional data, and four-dimensional data. Extract the maximum element value X max1 of the first output result, extract the maximum element value X max2 of the second output result; if X max2 > X max1 , determine that the second output result is greater than the first output result, such as X max2 ≤ X max1 , determine The second output result is less than or equal to the first output result. Of course, the comparison method can also adopt other methods, and the present application is not limited to the above-mentioned specific method of comparison.

可选的,上述电子装置还包括:通信模块;Optionally, the electronic device above further includes: a communication module;

所述AP,还用于控制通信模块将所述第二跌落模型的权值数据发送至网络侧设备。The AP is further configured to control the communication module to send the weight data of the second drop model to the network side device.

可选的,AP210,具体用于将该第一输入数据作为训练数据输入第一跌落模型执行V层正向运算得到正向运算的第V层正向运算结果,对第V层正向运算结果处理得到第V层输入数据梯度,将第V层输入数据梯度输入到第一跌落模型的第V层执行V层反向运算得到V个权值梯度,采用V个权值梯度对V层权值进行更新得到更新后权值数据,将更新后的权值数据确定为第二跌落模型的权值数据。Optionally, the AP210 is specifically used to input the first input data as the training data into the first drop model to perform the V-layer forward operation to obtain the V-th layer forward operation result of the forward operation, and to perform the V-th layer forward operation result Process to obtain the input data gradient of the Vth layer, input the input data gradient of the Vth layer to the Vth layer of the first drop model, perform the reverse operation of the V layer to obtain V weight gradients, and use the V weight gradients to calculate the weight value of the V layer The updated weight data is obtained by updating, and the updated weight data is determined as the weight data of the second drop model.

可选的,AP210,具体用于对第V层正向运算结果与经验系数乘积得到第V层输入数据梯度;Optionally, AP210, which is specifically used to obtain the input data gradient of the V-th layer by multiplying the result of the forward operation of the V-th layer and the empirical coefficient;

或对第V层正向运算结果进行数据类型变换得到第V层输入数据梯度。Or perform data type transformation on the forward operation result of the Vth layer to obtain the input data gradient of the Vth layer.

AP210,具体用于提取加速度值的数量n以及距离值的数量m,提取预设输入数据的数量即CI*H*W;其中,H为高度值,W为宽度值,CI为深度值,如n+m小于CI*H*W,则按预设策略对该加速度值的数量以及压力值的数量添加使得添加后的n’+m’=CI*H*W。AP210 is specifically used to extract the number n of acceleration values and the number m of distance values, and extract the number of preset input data, namely CI*H*W; where H is the height value, W is the width value, and CI is the depth value, such as If n+m is less than CI*H*W, then the number of acceleration values and the number of pressure values are added according to a preset strategy such that n'+m'=CI*H*W after adding.

可选的,AP210,具体用于在n+m=CI*H*W/2时,在H方向每隔一行插入一行插入数据,该插入数据为在H方形相邻行的平均值。具体的,如插入的为H方向第2行的数据,则插入数据为H方向第1行与第3行的平均值。Optionally, the AP210 is specifically used to insert a row of insertion data every other row in the H direction when n+m=CI*H*W/2, and the insertion data is an average value of adjacent rows in the H square. Specifically, if the data inserted is the second row in the H direction, the inserted data is the average value of the first row and the third row in the H direction.

下面介绍下跌落模型的原理,跌落模型大部分属于人工智能的运算,对于人工智能的计算大部分采用的是神经网络的计算,对于神经网络的运算,虽然其具有多层的运算,但是基本运算为卷积运算。The following introduces the principle of the drop model. Most of the drop model belongs to the calculation of artificial intelligence. Most of the calculations of artificial intelligence use the calculation of neural network. For the calculation of neural network, although it has multi-layer calculations, the basic calculation for the convolution operation.

如图3a所示,为一种卷积运算的示意图,如图3a所示,输入数据可以为CI*H*W的三维数据,对于卷积运算的权值即卷积核可以为CO*CI*3*3的卷积数据,其输出的结果可以为:CO*(H-2)*(W-2)的输出结果,如图3a所示,每个方格为一个数值,该数值具体可以为加速度值的数量n或压力值的数量m中的一个值。As shown in Figure 3a, it is a schematic diagram of a convolution operation. As shown in Figure 3a, the input data can be three-dimensional data of CI*H*W, and the weight of the convolution operation, that is, the convolution kernel can be CO*CI *3*3 convolution data, the output result can be: the output result of CO*(H-2)*(W-2), as shown in Figure 3a, each square is a value, and the value is specific It can be one of the number n of acceleration values or the number m of pressure values.

依据图3a,介绍一下神经网络的计算原理,对于神经网络即人工智能的运算中,训练好的人工智能模型即通过预设定义好的输入数据通过训练的运算得到权值数据,训练好的人工智能模型即为确定的卷积核,即CO*CI*3*3,对于核kernel来说,其具有3*3以及5*5的规格(SIZE),当然在实际应用中,上述权值还可以为其他的规格,本申请并不限制上述规格的具体形式。According to Figure 3a, introduce the calculation principle of the neural network. For the calculation of the neural network, that is, the artificial intelligence, the trained artificial intelligence model obtains the weight data through the training operation through the preset defined input data, and the trained artificial intelligence The intelligent model is a certain convolution kernel, that is, CO*CI*3*3. For the kernel kernel, it has the specifications (SIZE) of 3*3 and 5*5. Of course, in practical applications, the above weights are still Other specifications may be used, and the present application does not limit the specific form of the above specifications.

对于训练运算,即将多份输入数据CI*H*W,在实际的训练中,多份输入数据CI、H、W的取值均可以不同,其执行神经网络的多层正向运算得到输出结果,依据输出结果得到输出结果梯度,然后将输出结果梯度执行多层反向运算得到每层的权值梯度,然后通过权值梯度对每层的权值进行更新,经过多次的迭代的计算即得到最终的权值,此时的神经网络模型即为训练好的神经网络模型。对于此训练好的神经网络模型再次输入采集的输入数据进行正向运算得到的输出结果即CO*(H-2)*(W-2),通过对CO*(H-2)*(W-2)进行分析即能够得到对应的分类,应用到本申请中,即能够通过对CO*(H-2)*(W-2)分析得到最终的跌落原因。For the training operation, that is to say, multiple pieces of input data CI*H*W, in actual training, the values of multiple pieces of input data CI, H, and W can be different, and it executes the multi-layer forward operation of the neural network to obtain the output result , according to the output result to obtain the output result gradient, and then perform multi-layer reverse operation on the output result gradient to obtain the weight gradient of each layer, and then update the weight value of each layer through the weight gradient. After multiple iterations, the calculation is The final weight value is obtained, and the neural network model at this time is the trained neural network model. For this trained neural network model, the output result obtained by inputting the collected input data again and performing forward operation is CO*(H-2)*(W-2), through CO*(H-2)*(W- 2) The corresponding classification can be obtained by analyzing, and when applied to this application, the final cause of the drop can be obtained by analyzing CO*(H-2)*(W-2).

对于卷积运算时,对于卷积核即CO*CI*3*3是无法直接与输入数据即CI*H*W直接进行卷积运算的,其运算的方式可以为,将卷积核即CO*CI*3*3切割成一个kernel【3】【3】;然后以kernel【3】【3】为基本粒度与输入数据CI*H*W执行卷积运算,即以kernel【3】【3】为基本粒度在输入数据上移动,具体的一种方式的移动示意图如图3b所示,其中如3b中的方框为移动后的切割的数据。通过本申请人实验发现,对于不同的神经网络模型,其输入数据的大小,即CI*H*W的值与训练好的模型中的预设输入数据的数量越接近其输出结果的计算越准确,用户体验度越好。For the convolution operation, the convolution kernel, namely CO*CI*3*3, cannot be directly convolved with the input data, namely CI*H*W, the operation method can be, the convolution kernel is CO *CI*3*3 is cut into a kernel【3】【3】; then the convolution operation is performed with the input data CI*H*W using the kernel【3】【3】, that is, the kernel【3】【3】 ] is the basic granularity of moving on the input data. A schematic diagram of moving in a specific way is shown in Figure 3b, where the box in 3b is the cut data after moving. Through the applicant's experiments, it was found that for different neural network models, the closer the size of the input data, that is, the value of CI*H*W and the number of preset input data in the trained model, the more accurate the calculation of the output results , the better the user experience.

以一个实际的例子来说明,假设训练好的神经网络模型的预设输入数据可以为:H=50,W=50,CI=64,那么如果采集到的输入数据得到值太少,假设组成的三维数据为:H=20,W=20,CI=12,那么无论训练的次数在多,权值越准确,其计算的输出结果的得到的跌落结果的精度均非常低,通过实验发现,即卷积切割的次数与预设输入数据的切割次数偏差越大,那么其得到的输出结果的精度越低,例如,H=50,W=50,CI=64中一层CI中的H、W的切割次数为:48*48;对于采集的输入数据的一层CI中H、W的切割次数为:10*10,其计算的数量也相差很多,所以为了解决这个问题,本申请提供的技术方案通过预设策略添加元素值(即方块的数量),具体的预设策略可以为通过添加零的方式来进行数据的添加,这样即能够通过添零来达到对应的值,具体的,如图3c所示,原始的输入数据为:H=9,W=7,CI=4,预设的输入数据的H=18,W=7,CI=4;那么其添加零的方式可以为,以隔行插零的方式插入到原始的输入数据中,具体的插入后的数据如图3d所示,图3d中的黑色区间为插入的零值的位置。To illustrate with a practical example, assuming that the preset input data of the trained neural network model can be: H=50, W=50, CI=64, then if the collected input data gets too few values, it is assumed that the composed The three-dimensional data is: H=20, W=20, CI=12, so no matter how many times of training, the more accurate the weight value is, the accuracy of the output result of the calculation is very low, and it is found through experiments that The greater the deviation between the number of convolution cuts and the number of cuts of the preset input data, the lower the accuracy of the output results, for example, H=50, W=50, H, W in a layer of CI in CI=64 The number of cuts is: 48*48; the number of cuts for H and W in a layer of CI of the collected input data is: 10*10, and the calculated numbers are also very different, so in order to solve this problem, the technology provided by this application The scheme adds element values (that is, the number of squares) through a preset strategy. The specific preset strategy can be to add data by adding zeros, so that the corresponding value can be achieved by adding zeros. Specifically, as shown in the figure As shown in 3c, the original input data is: H=9, W=7, CI=4, and the preset input data is H=18, W=7, CI=4; then the way of adding zeros can be as follows: The interlaced zero interpolation method is inserted into the original input data. The specific inserted data is shown in FIG. 3d, and the black interval in FIG. 3d is the position of the inserted zero value.

当然在实际应用中,上述预设策略还可以为,以平均值方式添加,以图3d为例,黑色区间为插入的平均值的位置,其中该平均值为H方向相邻的两个值之间的平均值,例如,H方向第二行的7个数值可以为H方向第一行的7个数值以及第三行的7个数值的平均值,对应的,插入的最后一行的值,即H方向第18行的值可以为与第17行值相同的值。通过实验发现,采用平均值的方式,其计算得到的输出数据比插零方式计算得到的输出结果的精度更高。Of course, in practical applications, the above preset strategy can also be added in the form of an average value. Taking Figure 3d as an example, the black interval is the position of the inserted average value, where the average value is the value between two adjacent values in the H direction. For example, the 7 values in the second row in the H direction can be the average value of the 7 values in the first row in the H direction and the 7 values in the third row, corresponding to the value of the last row inserted, that is The value of the 18th row in the H direction may be the same as the value of the 17th row. It is found through experiments that the output data calculated by the average value method has higher precision than the output result calculated by the zero interpolation method.

参阅图4,图4提供一种电子装置的跌落模型更新方法,所述方法应用于电子装置内,所述电子装置包括:应用处理器AP、触控显示屏、重力传感器和距离传感器、所述触控显示屏通过至少一个电路与所述应用处理器连接;如图4所示,所述方法包括:Referring to FIG. 4, FIG. 4 provides a method for updating a drop model of an electronic device, the method is applied in an electronic device, and the electronic device includes: an application processor AP, a touch screen, a gravity sensor and a distance sensor, the The touch display screen is connected with the application processor through at least one circuit; as shown in Figure 4, the method includes:

步骤S401、采集所述电子装置的加速度数据;Step S401, collecting acceleration data of the electronic device;

步骤S402、采集电子装置与地面的距离;Step S402, collecting the distance between the electronic device and the ground;

步骤S403、依据加速度数据计算得到加速度值,依据该加速度值确定该电子装置处于的状态,该状态包括:普通状态和跌落状态;Step S403, calculating the acceleration value according to the acceleration data, and determining the state of the electronic device according to the acceleration value, and the state includes: normal state and dropped state;

步骤S404、提取跌落状态下的加速度值以及距离值,将跌落状态下的该加速度值以及距离值组成第一输入数据,将该第一输入数据输入第一跌落模型进行计算得到第一输出结果,将该第一输入数据作为训练数据对第一跌落模型进行重新训练得到第二跌落模型,将第一输入数据输入到第二跌落模型得到第二输出结果,将第一输出结果与第二输出结果比较,如第二输出结果大于第一输出结果,采用第二跌落模型替换第一跌落模型。Step S404, extracting the acceleration value and the distance value in the falling state, compose the acceleration value and the distance value in the falling state into the first input data, and input the first input data into the first drop model for calculation to obtain the first output result, The first input data is used as training data to retrain the first drop model to obtain the second drop model, and the first input data is input to the second drop model to obtain the second output result, and the first output result and the second output result For comparison, if the second output result is greater than the first output result, the first drop model is replaced by the second drop model.

参阅图5,图5提供一种电子装置,所述电子装置包括:壳体、电路板、电池、盖板、重力传感器504、触控显示屏503、距离传感器501和处理单元502,其中,Referring to FIG. 5, FIG. 5 provides an electronic device, which includes: a housing, a circuit board, a battery, a cover, a gravity sensor 504, a touch screen 503, a distance sensor 501 and a processing unit 502, wherein,

重力传感器504,用于采集所述电子装置的加速度数据;a gravity sensor 504, configured to collect acceleration data of the electronic device;

压力传感器501,用于采集电子装置与地面的距离;The pressure sensor 501 is used to collect the distance between the electronic device and the ground;

处理单元502,用于依据加速度数据计算得到加速度值,依据该加速度值确定该电子装置处于的状态,该状态包括:普通状态和跌落状态;The processing unit 502 is configured to calculate an acceleration value based on the acceleration data, and determine the state of the electronic device according to the acceleration value, and the state includes: a normal state and a dropped state;

处理单元502,用于提取跌落状态下的加速度值以及距离值,将跌落状态下的该加速度值以及距离值组成第一输入数据,将该第一输入数据输入第一跌落模型进行计算得到第一输出结果,将该第一输入数据作为训练数据对第一跌落模型进行重新训练得到第二跌落模型,将第一输入数据输入到第二跌落模型得到第二输出结果,将第一输出结果与第二输出结果比较,如第二输出结果大于第一输出结果,采用第二跌落模型替换第一跌落模型。The processing unit 502 is configured to extract the acceleration value and the distance value in the falling state, compose the acceleration value and the distance value in the falling state into first input data, and input the first input data into the first drop model for calculation to obtain the first Output the result, use the first input data as training data to retrain the first drop model to obtain the second drop model, input the first input data to the second drop model to obtain the second output result, and combine the first output result with the second drop model Comparing the two output results, if the second output result is greater than the first output result, the first drop model is replaced by the second drop model.

本申请提供的技术方案采集到加速度数据以后,依据加速度数据计算加速度值,采集壳体的压力值,当确定为跌落状态时,提取跌落状态的加速值以及压力值,将该加速度值以及压力值组成输入数据,将该输入数据输入到人工神经网络模型中进行计算得到输出结果,这样就能够依据该输出结果得到电子装置的跌落原因。After the technical solution provided by the application collects the acceleration data, the acceleration value is calculated according to the acceleration data, and the pressure value of the casing is collected. The input data is composed, and the input data is input into the artificial neural network model for calculation to obtain an output result, so that the cause of the drop of the electronic device can be obtained according to the output result.

图6示出的是与本申请实施例提供的移动终端相关的手机的部分结构的框图。参考图6,手机包括:射频(Radio Frequency,RF)电路910、存储器920、输入单元930、传感器950、音频电路960、无线保真(Wireless Fidelity,WiFi)模块970、应用处理器AP980、以及电源990等部件。本领域技术人员可以理解,图6中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。FIG. 6 shows a block diagram of a partial structure of a mobile phone related to the mobile terminal provided by the embodiment of the present application. Referring to FIG. 6, the mobile phone includes: a radio frequency (Radio Frequency, RF) circuit 910, a memory 920, an input unit 930, a sensor 950, an audio circuit 960, a wireless fidelity (Wireless Fidelity, WiFi) module 970, an application processor AP980, and a power supply 990 and other components. Those skilled in the art can understand that the structure of the mobile phone shown in FIG. 6 does not constitute a limitation to the mobile phone, and may include more or less components than shown in the figure, or combine some components, or arrange different components.

下面结合图6对手机的各个构成部件进行具体的介绍:The following is a specific introduction to each component of the mobile phone in conjunction with Figure 6:

输入单元930可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元930可包括触控显示屏933、指纹识别装置931、人脸识别装置936、虹膜识别装置937以及其他输入设备932。输入单元930还可以包括其他输入设备932。具体地,其他输入设备932可以包括但不限于物理按键、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。其中,The input unit 930 can be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the mobile phone. Specifically, the input unit 930 may include a touch screen 933 , a fingerprint recognition device 931 , a face recognition device 936 , an iris recognition device 937 and other input devices 932 . The input unit 930 may also include other input devices 932 . Specifically, other input devices 932 may include but not limited to one or more of physical keys, function keys (such as volume control keys, switch keys, etc.), trackball, mouse, joystick, and the like. in,

传感器950,用于采集所述电子装置的加速度数据和手机与地面的距离,将所述加速度数据和距离值传输给AP980。The sensor 950 is used to collect the acceleration data of the electronic device and the distance between the mobile phone and the ground, and transmit the acceleration data and the distance value to the AP980.

AP980,用于依据加速度数据计算得到加速度值,依据该加速度值确定该电子装置处于的状态,该状态包括:普通状态和跌落状态;提取跌落状态下的加速度值以及距离值,将跌落状态下的该加速度值以及距离值组成第一输入数据,将该第一输入数据输入第一跌落模型进行计算得到第一输出结果,将该第一输入数据作为训练数据对第一跌落模型进行重新训练得到第二跌落模型,将第一输入数据输入到第二跌落模型得到第二输出结果,将第一输出结果与第二输出结果比较,如第二输出结果大于第一输出结果,采用第二跌落模型替换第一跌落模型。AP980 is used to calculate the acceleration value based on the acceleration data, and determine the state of the electronic device according to the acceleration value. The state includes: normal state and falling state; extract the acceleration value and distance value in the falling state, and convert the The acceleration value and the distance value form the first input data, input the first input data into the first drop model for calculation to obtain the first output result, and use the first input data as training data to retrain the first drop model to obtain the first drop model The second drop model, input the first input data to the second drop model to obtain the second output result, compare the first output result with the second output result, if the second output result is greater than the first output result, use the second drop model to replace The first drop model.

AP980是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器920内的软件程序和/或模块,以及调用存储在存储器920内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,AP980可包括一个或多个处理单元;可选的,AP980可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到AP980中。AP980 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and/or modules stored in the memory 920, and calling data stored in the memory 920, the mobile phone is executed. Various functions and processing data, so as to monitor the mobile phone as a whole. Optionally, the AP980 can include one or more processing units; optionally, the AP980 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc. The tuner processor mainly handles wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the AP980.

此外,存储器920可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。In addition, the memory 920 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.

RF电路910可用于信息的接收和发送。通常,RF电路910包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路910还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobilecommunication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code DivisionMultiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。RF circuitry 910 may be used for the reception and transmission of information. Generally, the RF circuit 910 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, and the like. In addition, RF circuitry 910 may also communicate with networks and other devices via wireless communications. The above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile Communication (Global System of Mobilecommunication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (Short Messaging Service, SMS), etc.

手机还可包括至少一种传感器950,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节触控显示屏的亮度,接近传感器可在手机移动到耳边时,关闭触控显示屏和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The handset may also include at least one sensor 950, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor can include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the touch display screen according to the brightness of the ambient light, and the proximity sensor can turn off the touch display screen when the mobile phone is moved to the ear. and/or backlighting. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used to identify the application of mobile phone posture (such as horizontal and vertical screen switching, related Games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc.; as for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. repeat.

音频电路960、扬声器961,传声器962可提供用户与手机之间的音频接口。音频电路960可将接收到的音频数据转换后的电信号,传输到扬声器961,由扬声器961转换为声音信号播放;另一方面,传声器962将收集的声音信号转换为电信号,由音频电路960接收后转换为音频数据,再将音频数据播放AP980处理后,经RF电路910以发送给比如另一手机,或者将音频数据播放至存储器920以便进一步处理。The audio circuit 960, the speaker 961, and the microphone 962 can provide an audio interface between the user and the mobile phone. The audio circuit 960 can transmit the electrical signal converted from the received audio data to the loudspeaker 961, and the loudspeaker 961 converts it into a sound signal for playback; After being received, it is converted into audio data, and then the audio data is processed by the playback AP980, and then sent to another mobile phone through the RF circuit 910, or the audio data is played to the memory 920 for further processing.

WiFi属于短距离无线传输技术,手机通过WiFi模块970可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图6示出了WiFi模块970,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变申请的本质的范围内而省略。WiFi is a short-distance wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 970. It provides users with wireless broadband Internet access. Although FIG. 6 shows a WiFi module 970, it can be understood that it is not an essential component of the mobile phone, and can be completely omitted according to needs without changing the essence of the application.

手机还包括给各个部件供电的电源990(比如电池),可选的,电源可以通过电源管理系统与AP980逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone also includes a power supply 990 (such as a battery) for supplying power to various components. Optionally, the power supply can be logically connected to the AP980 through the power management system, so that functions such as charging, discharging, and power consumption management can be realized through the power management system.

尽管未示出,手机还可以包括摄像头、蓝牙模块、补光装置、光线传感器等,在此不再赘述。Although not shown, the mobile phone may also include a camera, a Bluetooth module, a supplementary light device, a light sensor, etc., which will not be repeated here.

可以看出,通过本申请实施例,采集到加速度数据以后,依据加速度数据确定电子装置的状态,当确定为跌落状态时,通过摄像头采集地面的第一图片,然后依据加速度值以及采集时间得到电子装置的地面的距离,提取电子装置的第二图片(具体可以为外形图片),这样就能够生成具有电子装置跌落到地面的3D动画,提高了用户的体验度。It can be seen that through the embodiment of the present application, after the acceleration data is collected, the state of the electronic device is determined according to the acceleration data. When it is determined to be in a falling state, the first picture of the ground is collected through the camera, and then the electronic device is obtained according to the acceleration value and the collection time. The distance to the ground of the device is extracted from a second picture of the electronic device (specifically, an outline picture), so that a 3D animation with the electronic device falling to the ground can be generated, which improves user experience.

本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任何一种电子装置的跌落模型更新方法的部分或全部步骤。An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables the computer to execute any drop model of an electronic device as described in the method embodiments above. Update some or all steps of the method.

本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如上述方法实施例中记载的任何一种电子装置的跌落模型更新方法的部分或全部步骤。The embodiment of the present application also provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable the computer to execute the method described in the above method embodiments Some or all steps of the method for updating the drop model of any electronic device.

需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于可选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that for the foregoing method embodiments, for the sake of simple description, they are expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence. Depending on the application, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the application.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the foregoing embodiments, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or can be Integrate into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件程序模块的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented not only in the form of hardware, but also in the form of software program modules.

所述集成的单元如果以软件程序模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The integrated units may be stored in a computer-readable memory if implemented in the form of a software program module and sold or used as an independent product. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory. Several instructions are included to make a computer device (which may be a personal computer, server or network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash disk , Read-only memory (English: Read-Only Memory, abbreviated: ROM), random access device (English: Random Access Memory, abbreviated: RAM), magnetic disk or optical disk, etc.

以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The embodiments of the present application have been introduced in detail above, and specific examples have been used in this paper to illustrate the principles and implementation methods of the present application. The descriptions of the above embodiments are only used to help understand the methods and core ideas of the present application; meanwhile, for Those skilled in the art will have changes in specific implementation methods and application scopes based on the ideas of the present application. In summary, the contents of this specification should not be construed as limiting the present application.

Claims (11)

1. An electronic device, the electronic device comprising: an application processor AP, a touch display screen, a gravity sensor and a distance sensor,
the gravity sensor is used for acquiring acceleration data of the electronic device;
the distance sensor is used for acquiring the distance between the electronic device and the ground;
the AP is used for calculating an acceleration value according to the acceleration data, and determining the state of the electronic device according to the acceleration value, wherein the state comprises the following steps: a normal state and a fall state;
the AP is used for extracting an acceleration value and a distance value under a falling state, forming first input data by the acceleration value and the distance value under the falling state, inputting the first input data into a first falling model to calculate to obtain a first output result, retraining the first falling model by taking the first input data as training data to obtain a second falling model, inputting the first input data into the second falling model to obtain a second output result, comparing the first output result with the second output result, and if the second output result is greater than the first output result, replacing the first falling model by the second falling model.
2. The electronic device of claim 1, further comprising: a communication module;
and the AP is also used for controlling a communication module to send the weight data of the second drop model to network side equipment.
3. The electronic device of claim 1,
the AP is specifically used for traversing n acceleration values according to the sequence of the acquisition points if the n acceleration values exist, determining the AP to be in a falling state if the m continuous acceleration values are larger than a set threshold value, and otherwise determining the AP to be in a common state.
4. The electronic device of claim 3,
the AP is specifically used for inputting the first input data as training data into the first falling model to execute V-layer forward operation to obtain a V-layer forward operation result of the forward operation, processing the V-layer forward operation result to obtain a V-layer input data gradient, inputting the V-layer input data gradient into the V-layer of the first falling model to execute V-layer reverse operation to obtain V weight gradients, updating the V-layer weight by adopting the V weight gradients to obtain updated weight data, and determining the updated weight data as the weight data of the second falling model.
5. A drop model updating method of an electronic device is applied to the electronic device, and the electronic device comprises the following steps: the method comprises the following steps that an application processor AP, a touch display screen, a gravity sensor and a distance sensor are adopted, and the method comprises the following steps:
acquiring acceleration data of the electronic device;
collecting the distance between the electronic device and the ground;
calculating an acceleration value according to the acceleration data, and determining the state of the electronic device according to the acceleration value, wherein the state comprises the following steps: a normal state and a fall state;
the method comprises the steps of extracting an acceleration value and a distance value under a falling state, forming first input data by the acceleration value and the distance value under the falling state, inputting the first input data into a first falling model to calculate to obtain a first output result, retraining the first falling model by taking the first input data as training data to obtain a second falling model, inputting the first input data into the second falling model to obtain a second output result, comparing the first output result with the second output result, and replacing the first falling model by the second falling model if the second output result is greater than the first output result.
6. The method of claim 5, further comprising:
and sending the weight data of the second drop model to network side equipment.
7. The method of claim 5, wherein determining the state of the electronic device according to the n acceleration values comprises:
and traversing the n acceleration values according to the sequence of the acquisition points, if the continuous m acceleration values are larger than a set threshold value, determining the falling state, and otherwise, determining the falling state as the common state.
8. The method of claim 7, wherein retraining the first fall model using the first input data as training data to obtain a second fall model comprises:
inputting the first input data as training data into a first falling model to execute V-layer forward operation to obtain a V-layer forward operation result of forward operation, processing the V-layer forward operation result to obtain a V-layer input data gradient, inputting the V-layer input data gradient into a V-layer of the first falling model to execute V-layer reverse operation to obtain V weight gradients, updating the V-layer weight by adopting the V weight gradients to obtain updated weight data, and determining the updated weight data as the weight data of a second falling model.
9. An electronic device, the electronic device comprising: a processing unit, a touch display screen, a gravity sensor, a circuit and a distance sensor,
the gravity sensor is used for acquiring acceleration data of the electronic device;
the distance sensor is used for acquiring the distance between the electronic device and the ground;
the processing unit is used for calculating an acceleration value according to the acceleration data, and determining the state of the electronic device according to the acceleration value, wherein the state comprises the following steps: a normal state and a fall state;
the processing unit is used for extracting an acceleration value and a distance value under a falling state, forming first input data by the acceleration value and the distance value under the falling state, inputting the first input data into a first falling model to calculate to obtain a first output result, retraining the first falling model by taking the first input data as training data to obtain a second falling model, inputting the first input data into the second falling model to obtain a second output result, comparing the first output result with the second output result, and if the second output result is greater than the first output result, replacing the first falling model by the second falling model.
10. A computer-readable storage medium, characterized in that it stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform the method according to any one of claims 5-8.
11. A computer program product, characterized in that the computer program product comprises a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform the method according to any of claims 5-8.
CN201810045061.8A 2018-01-17 2018-01-17 Drop model updating method of electronic device and related product Expired - Fee Related CN108307049B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810045061.8A CN108307049B (en) 2018-01-17 2018-01-17 Drop model updating method of electronic device and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810045061.8A CN108307049B (en) 2018-01-17 2018-01-17 Drop model updating method of electronic device and related product

Publications (2)

Publication Number Publication Date
CN108307049A true CN108307049A (en) 2018-07-20
CN108307049B CN108307049B (en) 2020-07-03

Family

ID=62865737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810045061.8A Expired - Fee Related CN108307049B (en) 2018-01-17 2018-01-17 Drop model updating method of electronic device and related product

Country Status (1)

Country Link
CN (1) CN108307049B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109242554A (en) * 2018-08-24 2019-01-18 深圳艺达文化传媒有限公司 The switching method and Related product of elevator card

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201533351U (en) * 2009-05-19 2010-07-21 上海闻泰电子科技有限公司 Device for snapping dropping surface under free falling situation of mobile phone
US20150061863A1 (en) * 2013-09-03 2015-03-05 Hti Ip, L.L.C. Adaptive classification of fall detection for personal emergency response systems
CN106021007A (en) * 2016-05-20 2016-10-12 深圳天珑无线科技有限公司 Method for detecting fault of terminal and terminal
CN106453767A (en) * 2016-09-06 2017-02-22 广东欧珀移动通信有限公司 Fault detection method and device after drop
CN106534579A (en) * 2016-12-12 2017-03-22 北京羲和科技有限公司 Mobile phone posture judging method and apparatus based on deep learning
US20170147921A1 (en) * 2015-11-24 2017-05-25 Ryosuke Kasahara Learning apparatus, recording medium, and learning method
CN107153871A (en) * 2017-05-09 2017-09-12 浙江农林大学 Fall detection method based on convolutional neural networks and mobile phone sensor data
CN107271083A (en) * 2017-06-26 2017-10-20 上海斐讯数据通信技术有限公司 A kind of method that sensor and terminal and detection terminal are fallen
CN107301454A (en) * 2016-04-15 2017-10-27 北京中科寒武纪科技有限公司 The artificial neural network reverse train apparatus and method for supporting discrete data to represent
US20170352240A1 (en) * 2016-06-03 2017-12-07 John Carlton-Foss Method and system for motion analysis and fall prevention

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201533351U (en) * 2009-05-19 2010-07-21 上海闻泰电子科技有限公司 Device for snapping dropping surface under free falling situation of mobile phone
US20150061863A1 (en) * 2013-09-03 2015-03-05 Hti Ip, L.L.C. Adaptive classification of fall detection for personal emergency response systems
US20170147921A1 (en) * 2015-11-24 2017-05-25 Ryosuke Kasahara Learning apparatus, recording medium, and learning method
CN107301454A (en) * 2016-04-15 2017-10-27 北京中科寒武纪科技有限公司 The artificial neural network reverse train apparatus and method for supporting discrete data to represent
CN106021007A (en) * 2016-05-20 2016-10-12 深圳天珑无线科技有限公司 Method for detecting fault of terminal and terminal
US20170352240A1 (en) * 2016-06-03 2017-12-07 John Carlton-Foss Method and system for motion analysis and fall prevention
CN106453767A (en) * 2016-09-06 2017-02-22 广东欧珀移动通信有限公司 Fault detection method and device after drop
CN106534579A (en) * 2016-12-12 2017-03-22 北京羲和科技有限公司 Mobile phone posture judging method and apparatus based on deep learning
CN107153871A (en) * 2017-05-09 2017-09-12 浙江农林大学 Fall detection method based on convolutional neural networks and mobile phone sensor data
CN107271083A (en) * 2017-06-26 2017-10-20 上海斐讯数据通信技术有限公司 A kind of method that sensor and terminal and detection terminal are fallen

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109242554A (en) * 2018-08-24 2019-01-18 深圳艺达文化传媒有限公司 The switching method and Related product of elevator card

Also Published As

Publication number Publication date
CN108307049B (en) 2020-07-03

Similar Documents

Publication Publication Date Title
CN107273510B (en) Photo recommendation method and related product
AU2018299524B2 (en) Iris-based living-body detection method, mobile terminal and storage medium
CN110210605B (en) Hardware operator matching method and related product
WO2021109931A1 (en) Touch control method and wearable device
CN107122760A (en) Fingerprint identification method and related product
CN108322599A (en) A kind of Network Access Method and mobile terminal
CN108108137B (en) Display control method and related product
CN110442261B (en) Electronic equipment and touch operation detection method thereof
CN107864299B (en) Image display method and related products
US20210152914A1 (en) Method for Earbud Switching, Wearable Device, and Storage Medium
CN108989546B (en) Proximity detection method for electronic device and related products
CN108388400A (en) A kind of operation processing method and mobile terminal
CN108255632B (en) Drop data calculation method and related products based on artificial intelligence
CN107277364A (en) A kind of image pickup method, mobile terminal and computer-readable recording medium
CN108307049B (en) Drop model updating method of electronic device and related product
CN106484688B (en) Data processing method and system
CN108628534A (en) Character display method and mobile terminal
CN108306817A (en) A kind of Information locating processing method and mobile terminal
CN107728774A (en) Parameter regulation means and mobile terminal
CN108307057B (en) Analysis method of drop data and related products
CN110378798A (en) Isomery social networks construction method, group recommending method, device and equipment
CN108111677B (en) Touch display screen display method of electronic device and related product
CN109358796A (en) A kind of game visual field sharing method, terminal and readable storage medium storing program for executing
CN108196717B (en) Electronic devices and related products
CN112367428A (en) Electric quantity display method and system, storage medium and mobile terminal

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: 523860 No. 18 Wusha Haibin Road, Chang'an Town, Dongguan City, Guangdong Province

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200703