Method, device, equipment and storage medium for detecting stability of electronic equipment

By processing the acceleration and angular velocity data of electronic devices and calculating the stationary score, the problem that the prior art cannot accurately provide electronic product stationary information, and efficient and accurate stationary detection and scoring are achieved.

CN119576800BActive Publication Date: 2025-04-29CHINA GREAT WALL SECURITIES CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510141225.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2025-04-29
Estimated Expiration
2045-02-08

AI Technical Summary

Technical Problem

The prior art cannot accurately provide users with the stability of electronic products, making it difficult for users to evaluate the stability of the equipment.

Method used

By obtaining acceleration data and angular velocity data, it is stored in a two-dimensional array, the direction of gravity component is determined, the status words and state evaluation words are marked, the average value and continuous proportion of sub-sensor data are calculated, and the stability score is finally determined.

Benefits of technology

It realizes accurate detection and scoring of the stability of electronic devices, reduces detection costs, eliminates complicated software development and additional hardware, and provides an objective basis for users to obtain device stability information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576800B_ABST
    Figure CN119576800B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of electronic product detection, and discloses a method, device, equipment and storage medium for detecting the stability of an electronic device, including: marking a status word for sensor data in a two-dimensional array according to the direction of the gravity component of the sensor data; calculating the mean of the sub-sensor data; marking a status evaluation word for the array value according to the size comparison result between the array value in the two-dimensional array and the mean of the corresponding sub-sensor data; calculating the continuous proportion according to the time interval between the status mark in the two-dimensional array and the adjacent sensor data; and determining the stability score according to the continuous proportion. The present application can quickly calculate the continuous proportion of the moving state and accurately obtain the stability of the electronic device by marking the sensor data with status words and status evaluation words. The present application obtains the sensor data of the electronic device through its own sensor to perform real-time detection of the stability of the electronic device, which greatly reduces the detection cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic product testing, and in particular to a method, device, equipment and storage medium for testing the stability of electronic equipment. Background Art

[0002] With the popularity of mobile electronic products such as smart phones, users pay more and more attention to the stability of electronic products. When using mobile phones and other electronic products, whether it is web browsing, APP operation, games or running other software, electronic products need to remain relatively stable. If electronic products shake or jitter, it may cause problems such as abnormal loading of web page images, inability to open APP pages, running freezes, automatic text wrapping, etc. These problems caused by the shaking of electronic products will make users feel irritated and frustrated. Therefore, it is necessary to provide users with a method for detecting the stability of electronic products so that users can understand the stability of the electronic products they are using. Summary of the invention

[0003] The main purpose of this application is to provide a method, device, equipment and storage medium for detecting the stability of an electronic device, aiming to solve the technical problem that the prior art cannot accurately provide users with information such as the stability of electronic products.

[0004] In a first aspect, the present application provides a method for detecting the stability of an electronic device, the method comprising:

[0005] According to the order of data acquisition, the acquired sensor data is stored in a two-dimensional array, wherein the sensor data includes acceleration data and angular velocity data;

[0006] Determine the direction of the gravity component corresponding to the sensor data;

[0007] Marking a state word for corresponding sensor data according to the direction of the gravity component, wherein the state word is a moving state or an initial state;

[0008] Based on the two-dimensional array, calculate the mean value of the sub-sensor data of the sub-sensor data;

[0009] According to the comparison result between the array value in the two-dimensional array and the corresponding sub-sensor data mean, a state evaluation word is marked for the array value, wherein the state evaluation word is used to indicate a good state, or, used to indicate a bad state;

[0010] Calculate the duration ratio according to the state mark in the two-dimensional array and the time interval between adjacent sensor data, wherein the state mark includes a state word and a state evaluation word, and the duration ratio includes a moving state and a duration ratio;

[0011] The stability score is determined based on the persistence percentage.

[0012] The present application also provides a device for detecting the stability of an electronic device, the device for detecting the stability of an electronic device comprising:

[0013] A data storage module, used to store the acquired sensor data in a two-dimensional array according to the order of data acquisition, wherein the sensor data includes acceleration data and angular velocity data;

[0014] A gravity component direction determination module, used to determine the direction of the gravity component corresponding to the sensor data;

[0015] A first marking module, used for marking a state word for corresponding sensor data according to the direction of the gravity component, wherein the state word is a moving state or an initial state;

[0016] A first calculation module, configured to calculate a sub-sensor data mean value of the sub-sensor data based on the two-dimensional array;

[0017] A second marking module is used to mark the array value with a state evaluation word according to a comparison result between the array value in the two-dimensional array and the corresponding sub-sensor data mean value, wherein the state evaluation word is used to indicate a good state, or is used to indicate a bad state;

[0018] A second calculation module is used to calculate the continuous proportion according to the state mark in the two-dimensional array and the time interval between adjacent sensor data, wherein the state mark includes a state word and a state evaluation word, and the continuous proportion includes a moving state and a continuous proportion;

[0019] The scoring module is used to determine the stability score based on the persistence ratio.

[0020] The third aspect of the present application provides a computer device, comprising: a memory and at least one processor, wherein instructions are stored in the memory; and at least one processor calls the instructions in the memory so that the computer device executes the above-mentioned method for detecting the stability of an electronic device.

[0021] A fourth aspect of the present application provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the above-mentioned method for detecting the stability of an electronic device.

[0022] This application can quickly calculate the good and continuous proportion of mobile states and accurately obtain the stability of electronic devices by marking the acquired sensor data with status words and status evaluation words. This application obtains sensor data of electronic devices through sensors built into electronic devices, and performs real-time detection of the stability of electronic devices based on sensor data, without the need for complicated software development and additional hardware costs, greatly reducing detection costs. This application uses a scoring mechanism to score the stability of electronic device operation, providing an objective basis for users to grasp the stability of electronic devices in a timely manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 This is a flow chart of a first embodiment of a method for detecting the stability of an electronic device in an embodiment of the present application;

[0024] Figure 2 This is a functional module diagram of an embodiment of a device for detecting the stability of an electronic device in an embodiment of the present application;

[0025] Figure 3 It is a schematic diagram of an embodiment of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] At present, mobile phone manufacturers often publish the technical specifications of mobile phones on their homepages and official websites, such as the operating system, CPU model, memory size, GPU model, etc. At the same time, the sensor data of the mobile phone will also be published, for example, whether it supports sensors such as acceleration and gyroscope. However, users can obtain the stability data of the mobile phone through these parameter information. Some professional digital media can provide special reports on the stability of mobile phones. This information is often obtained by the editor-in-chief of professional media through a certain period of use, or by other users through subjective feelings during use, and it is impossible to make a systematic and objective judgment.

[0028] After users obtain the specific parameters of the mobile phone, they cannot obtain the information about the stability of the mobile phone. Judging the stability of the mobile phone by collecting user reviews of the same model or other users on the Internet is a highly subjective method and cannot meet the user's demand for objective stability information.

[0029] It can be seen that the prior art cannot provide accurate stability information to users. Based on this, the present application provides a detection solution for the stability of electronic equipment.

[0030] refer to Figure 1 An embodiment of the present application provides a method for detecting the stability of an electronic device, and the method for detecting the stability of an electronic device includes:

[0031] S100: storing the acquired sensor data in a two-dimensional array according to the order of data acquisition, wherein the sensor data includes acceleration data and angular velocity data.

[0032] Specifically, the present embodiment can obtain sensor data of the electronic device according to a preset time interval frequency, wherein the sensor data obtained each time includes acceleration data of the accelerometer and angular velocity data of the gyroscope. The acceleration data and angular velocity data in the obtained sensor data are grouped together and stored in a two-dimensional array. The two-dimensional array stores multiple groups of sensor data in the order in which the sensor data are obtained.

[0033] Of course, electronic devices can also be equipped with browsers or installed with apps to obtain sensor data when users browse the web through browsers or apps.

[0034] The electronic device may be a mobile phone, a tablet computer, an intelligent robot, etc., and may be a mobile device with an acceleration sensor and a gyroscope sensor.

[0035] In addition, the time interval between adjacent sensor data is also recorded.

[0036] S200: Determine the direction of the gravity component corresponding to the sensor data.

[0037] Specifically, the corresponding gravity component may be calculated according to the sensor data and the direction of the gravity component may be determined.

[0038] For example, a quaternion can be calculated based on the angular velocity data read by the sensor, and the gravity component in the quaternion can be extracted.

[0039] Of course, this embodiment is not limited to the calculation method of the gravity component.

[0040] S300: Marking a status word for corresponding sensor data according to the direction of the gravity component, wherein the status word is a moving state or an initial state.

[0041] Specifically, a state word is marked for each array value according to the direction of the gravity component, and the state word is divided into a moving state and an initial state.

[0042] S400: Calculate a sub-sensor data mean value of the sub-sensor data based on the two-dimensional array.

[0043] Specifically, the acceleration data may include X-axis acceleration, Y-axis acceleration, and Z-axis acceleration, etc.; the angular velocity data may include X-axis angular velocity, Y-axis angular velocity, and Z-axis angular velocity, etc., all of which belong to sub-sensor data.

[0044] The process of calculating the mean value of the sub-sensor data is: first calculate the absolute value of the sub-sensor data, and then calculate the mean value.

[0045] If there are multiple types of sub-sensor data, the average of one type of sub-sensor data or multiple types of sub-sensor data may be obtained according to actual needs, and this application does not impose any limitation on this.

[0046] S500: According to the comparison result between the array value in the two-dimensional array and the corresponding sub-sensor data mean, a state evaluation word is marked for the array value, wherein the state evaluation word is used to indicate a good state, or used to indicate a bad state.

[0047] Specifically, the absolute value of the array value in the two-dimensional array is compared with the corresponding sub-sensor data mean. For example, the array value in the two-dimensional array that is not greater than the corresponding sub-sensor data mean is marked as a good state, and the array value in the two-dimensional array that is greater than the corresponding sub-sensor data mean is marked as a bad state. Of course, other state evaluation words such as good and bad can also be used to identify good and bad states, and this application does not limit this.

[0048] S600: Calculate the continuity ratio according to the state mark in the two-dimensional array and the time interval between adjacent sensor data, wherein the state mark includes a state word and a state evaluation word, and the continuity ratio includes a moving state and a continuity ratio.

[0049] Specifically, the sensor data in the two-dimensional array that is in the moving state can be determined according to the state word; the sensor data in the moving state with a good moving state can be determined from the sensor data in the moving state according to the state evaluation word. Then, according to the time interval between adjacent sensor data, the duration of the good moving state and the duration of the moving state can be calculated, and according to the ratio of the duration of the good moving state to the duration of the moving state, the continuous proportion of the good moving state can be obtained.

[0050] In addition, according to the state mark in the two-dimensional array and the time interval between adjacent sensor data, the mobile state duration ratio can also be calculated. The mobile state duration ratio is the ratio of the mobile state duration to the total duration of the electronic device counted by the two-dimensional array.

[0051] S700: Determine the stability score based on the persistence ratio.

[0052] Specifically, the greater the proportion of good continuous movement status, the more stable the electronic device is, and the higher the stability score will be. In order to facilitate users to view the stability score, the product of the good continuous movement status proportion and 100 can be used as the stability score. Of course, this embodiment does not limit the calculation method of the stability score.

[0053] The electronic device can also display the calculated stability score to the user, so that the user can understand the stability of the electronic device in a timely manner.

[0054] This embodiment can quickly calculate the good and continuous proportion of the mobile state and accurately obtain the stability of the electronic device by marking the acquired sensor data with status words and status evaluation words. This embodiment obtains the sensor data of the electronic device through the sensor of the electronic device itself, and performs real-time detection of the stability of the electronic device based on the sensor data, without the need for complicated software development and additional hardware costs, greatly reducing the detection cost. This embodiment uses a scoring mechanism to score the stability of the electronic device operation, providing an objective basis for users to grasp the stability of the electronic device in a timely manner.

[0055] In one embodiment, in step S600, the continuous proportion is calculated according to the state mark in the two-dimensional array and the time interval between adjacent sensor data, including:

[0056] Compare the status words of adjacent sensor data in the two-dimensional array, and count the number of continuous and moving target sensor data;

[0057] Calculate the duration of the moving state according to the time interval between adjacent target sensor data and the number of continuous target sensor data;

[0058] Counting the number of status evaluation words in the target sensor data that indicate a good status;

[0059] Calculate the duration of the good moving state according to the time interval between adjacent target sensor data and the number of state evaluation words used to indicate a good state;

[0060] According to the ratio of the good moving state duration to the moving state duration, the good moving state duration ratio is obtained.

[0061] Specifically, the time at which the sensor data is acquired may be recorded each time the sensor data is acquired. The time interval between adjacent sensor data may be determined according to the time at which the sensor data is acquired.

[0062] The two-dimensional array includes multiple groups of sensor data, and each group of sensor data is marked with a state word, for example, marked as a moving state or an initial state.

[0063] By comparing the state words of the sensor data in the two-dimensional array according to the data storage order, it is possible to determine which target sensor data are in a continuous moving state. Based on the time intervals between these continuous target sensor data, the duration of the moving state can be calculated.

[0064] Each array value in the two-dimensional array is a value of a type of sub-sensor data. The array values ​​corresponding to some sub-sensor data in the two-dimensional array are marked with a state evaluation word. Therefore, by performing consistency comparison on the state evaluation word, the number of continuous target sub-sensor data marked with a state evaluation word indicating a good state in the target sensor data can be counted.

[0065] The time interval between sensor data is also the time interval between sub-sensor data of the same type. Therefore, according to the time interval between these consecutive target sub-sensor data and the number of target sub-sensor data, the duration of the moving state can be counted.

[0066] The proportion of good moving state = the duration of good moving state / the duration of moving state.

[0067] In another specific embodiment, the state words of adjacent sensor data in the two-dimensional array are sequentially compared for consistency, and the number of state changes and the number of state unchanged times can be recorded according to the comparison results. For example, from the initial state to the initial state is the state unchanged, from the moving state to the moving state is the state unchanged; from the initial state to the moving state is the state change, and from the moving state to the initial state is the state change.

[0068] Count the number of times the moving state remains unchanged from moving state to moving state.

[0069] Count the number of times the moving state remains unchanged from good to good in the sensor data whose moving state remains unchanged.

[0070] According to the ratio of the number of times the moving state is good and unchanged to the number of times the moving state is unchanged, the continuous proportion of the moving state being good is obtained.

[0071] This embodiment can conveniently and quickly find the target sensor data in the moving state and the target sub-sensor data in the good moving state through the state word and the state evaluation word, and then calculate the duration of the moving state and the duration of the good moving state according to the time interval between the sensor data, and then accurately calculate the proportion of the good moving state. The proportion of the good moving state can accurately reflect the stability of the electronic device.

[0072] In one embodiment, before storing the acquired sensor data in a two-dimensional array in step S100, the method for detecting the stability of an electronic device further includes:

[0073] Creating a window, wherein the window is synchronized with a display page of the electronic device, and the display content of the window is the same as the display content of the electronic device;

[0074] Monitor user click events through the window;

[0075] If a user click event is monitored, the sensor data of the electronic device is obtained;

[0076] Record the time interval between two adjacent sensor data acquisitions.

[0077] Specifically, this embodiment obtains sensor data when a user browses a page using an electronic device. Monitor the user's operations on the electronic device, such as opening a browser or an application APP. If the user needs to browse a web page, the browser or APP will load the web page. You can start monitoring the user's click event after the web page is loaded and displayed. If a user click event is monitored, obtain sensor data.

[0078] Taking the browser as an example, by embedding a JavaScript script in the browser, it is possible to monitor whether the electronic device is started and whether the deviceorientation and devicemotion events are listened to. The devicemotion event is a device event in JavaScript, which is triggered when the physical motion state of the device changes. This event provides relevant information such as the acceleration and rotation rate of the device, which is used to detect the motion state of the device. When processing events, this embodiment can select an appropriate method for throttling or filtering as needed to control the time interval or frequency of obtaining sensor data.

[0079] In order to facilitate monitoring of user click events and not affect the normal web page loading and display of the browser or APP, this embodiment creates a window that can synchronize the display page of the electronic device. This is equivalent to the window being parallel to the original window where the display page of the browser or APP is located. The user's click operation on the display page will act on both windows at the same time. Therefore, the created window can capture and monitor user click events. For example, you can monitor touchstart events, touchmove events, touchend events, etc. Monitoring these events can trigger the getstate() method to reacquire sensor data.

[0080] In addition, the time interval between two adjacent sensor data acquisitions may also be recorded as the time interval between corresponding adjacent sensor data in the two-dimensional array.

[0081] More specifically, for example, each time a touchstart event is monitored, the sensor data is acquired, for example, the sensor data is acquired at a preset frequency or a preset time interval until a touchend event is monitored, and then the acquisition of the sensor data is stopped.

[0082] This embodiment implements stability monitoring based on web front-end technology.

[0083] The window created by this embodiment can monitor user click events without interfering with the normal loading and display of the web page, and obtain key sensor data in a timely and accurate manner, reducing the acquisition of redundant data and improving the efficiency of stability detection. This embodiment records the sensor data of the user during the screen click process, which can accurately reflect the state changes of the electronic device and provide a reliable basis for stability scoring. This embodiment is based on web front-end technology, and the stability of the electronic device can be monitored by accessing the web page, which greatly improves the user experience. This embodiment does not need to implant complicated script codes during the stability detection process, and can achieve stability detection without occupying too much electronic device memory and resources, and does not affect the user's normal use of electronic devices and web page access and other functions.

[0084] In one embodiment, in step S400, calculating the sub-sensor data mean of the sub-sensor data based on the two-dimensional array includes:

[0085] Calculate the angle between the electronic device and the horizontal direction based on the sensor data;

[0086] Selecting sensor data in the two-dimensional array whose angle between the electronic device and the horizontal direction is within a preset angle;

[0087] According to the selected sensor data, the sub-sensor data mean of the sub-sensor data is obtained by calculating the absolute value, the sum and the average value.

[0088] Specifically, for example, sensor data whose angle with the horizontal direction is within 5 degrees in the two-dimensional array is selected, and these selected sensor data indicate that the electronic device is in a horizontal state, and the array values ​​of the same sub-sensor data in these selected sensor data are subjected to absolute value, summation, and average value operations to obtain the sub-sensor data mean of the sub-sensor data. For example, the x-axis acceleration mean corresponding to the x-axis acceleration is calculated.

[0089] Of course, the preset angle can be 5 degrees, 6 degrees, 3 degrees, etc., but is not limited to these angles. It is configured according to actual conditions and this application does not impose any restrictions on this.

[0090] In this embodiment, the sensor data of the electronic device in the horizontal direction can be determined by the angle between the electronic device and the horizontal direction, and the average value can be accurately calculated.

[0091] In one embodiment, the acceleration data includes three sub-sensor data, namely, X-axis acceleration, Y-axis acceleration, and Z-axis acceleration;

[0092] In step S400, the sub-sensor data mean of the sub-sensor data is calculated based on the two-dimensional array, including:

[0093] Calculate the horizontal velocity component and the vertical velocity component according to the sensor data;

[0094] If the horizontal velocity component in the same set of sensor data is greater than the vertical velocity component, and the difference between the two velocity components in the horizontal direction does not exceed a preset value, the sensor data is selected;

[0095] According to the selected sensor data, the sub-sensor data mean of the sub-sensor data is obtained by calculating the absolute value, the sum and the average value.

[0096] Specifically, the horizontal velocity component and the vertical velocity component can be calculated through the sensor data.

[0097] The values ​​of the electronic device in the horizontal state meet the following conditions: the horizontal component velocity is much greater than the vertical component velocity; and the difference between the two velocity components in the horizontal direction does not exceed a preset value.

[0098] The array values ​​of the same sub-sensor data in the selected sensor data are subjected to absolute value, summation, and average operations to obtain the sub-sensor data average of the sub-sensor data. For example, the x-axis acceleration average corresponding to the x-axis acceleration is obtained.

[0099] This embodiment can determine and filter out sensor data that meets the conditions by comparing the velocity components, and then accurately calculate the average value.

[0100] In one embodiment, determining the direction of the gravity component corresponding to the sensor data in step S200 includes:

[0101] Create a canvas that fills the entire screen of the electronic device according to the screen size of the electronic device;

[0102] If the touchstart event is monitored, the original coordinates of the target point clicked by the user are obtained, and the original coordinates are converted to the first coordinates in the canvas coordinate system;

[0103] If a touchmove event or touchend event is monitored, the second coordinate of the original coordinate of the target point in the canvas coordinate system is obtained;

[0104] Subtract the x-axis coordinate and the y-axis coordinate of the first coordinate from the second coordinate to obtain the x-axis coordinate difference and the y-axis coordinate difference;

[0105] The x-axis coordinate difference and the y-axis coordinate difference are mapped to the corresponding sensor data and filled in the canvas as coordinate points, wherein the center position of the canvas is the gravity component;

[0106] The direction of the gravity component of the corresponding sensor data is determined according to the position of the coordinate point in the canvas.

[0107] Specifically, this embodiment obtains sensor data when a user browses a page using an electronic device. Monitor the user's operations on the electronic device, such as opening a browser or an application APP. If the user needs to browse a web page, the browser or APP will load the web page. The user click event can be monitored after the web page is loaded and displayed. If the user click event is monitored, the original coordinates of the target point are obtained and the coordinates are converted.

[0108] In order to facilitate monitoring of user click events and not affect the normal web page loading and display of the browser or APP, this embodiment creates a window that can synchronize the display page of the electronic device. This is equivalent to the window being parallel to the original window where the display page of the browser or APP is located. The user's click operation on the display page will act on both windows at the same time. Therefore, the created window can capture and monitor user click events. For example, you can monitor touchstart events, touchmove events, and touchend events.

[0109] At the same time, a canvas is created whose canvas coordinate system is related to the accelerometer and gyroscope. If the acceleration data and angular velocity data change, the canvas coordinate system may change accordingly. Therefore, the coordinates of the same target point at different times can reflect the changes in acceleration and angular velocity.

[0110] Based on this, if the touchstart event is monitored, the original coordinates of the clicked target point are obtained. The original coordinates are the coordinates in the coordinate system of the display page and need to be converted to the first coordinates in the canvas coordinate system. If the user starts sliding on the screen from the target point, a touchmove event will be generated. This process will obtain sensor data at a preset frequency or preset time interval, and at the same time, the coordinates of the target point will be converted to the second coordinates.

[0111] The first coordinate and the second coordinate of the target point correspond to the sensor data collected in this process. The second coordinate corresponding to the second set of sensor data obtained in this process is subtracted from the first coordinate corresponding to the first set of sensor data to obtain the x-axis coordinate difference and the y-axis coordinate difference corresponding to the second set of sensor data.

[0112] The second coordinate corresponding to the third set of sensor data is subtracted from the second coordinate corresponding to the second set of sensor data to obtain an x-axis coordinate difference and a y-axis coordinate difference corresponding to the third set of sensor data.

[0113] Similarly, the x-axis coordinate difference and the y-axis coordinate difference corresponding to the fourth set of sensor data, the fifth set of sensor data, etc. can be obtained. The x-axis coordinate difference and the y-axis coordinate difference can indirectly reflect the motion status of the electronic device.

[0114] The first set of sensor data may not be stored in a two-dimensional array.

[0115] The center position of the canvas is used as the gravity component, and the coordinate points corresponding to the x-axis coordinate difference and the y-axis coordinate difference are filled in the canvas. The direction of the gravity component corresponding to the sensor data can be determined according to the position of the coordinate points in the canvas.

[0116] In this embodiment, the created window and canvas can intuitively reflect the changes in sensor data through the coordinates on the canvas, and thus the direction of the gravity component corresponding to the sensor data can be intuitively and conveniently determined.

[0117] In one embodiment, calculating the sub-sensor data mean of the sub-sensor data based on the two-dimensional array includes:

[0118] If the x-axis coordinate difference does not exceed a preset number of pixels, the corresponding sensor data is retained, and the sensor data satisfies that the electronic device is in a horizontal state;

[0119] According to the retained sensor data, the sub-sensor data mean value of each sub-sensor data is obtained by calculating the absolute value, the sum and the average value.

[0120] The preset number of pixels may be, for example, 5 pixels, 7 pixels, etc., and the present application does not limit this. The pixels on the canvas have a corresponding relationship with the canvas coordinates. Therefore, the coordinates can be reflected by the pixels.

[0121] In this embodiment, the x-axis coordinate difference can be used to determine whether the corresponding sensor data satisfies the requirement that the electronic device is in a horizontal state, and then the sensor data for averaging can be selected.

[0122] In one embodiment, the method for detecting the stability of an electronic device further includes: if a display page of the electronic device is refreshed or a page jumps, clearing the two-dimensional array and reacquiring sensor data of the electronic device;

[0123] Alternatively, if the display page of the electronic device is refreshed and the electronic device re-enters the initial state, or the page jumps, the two-dimensional array is cleared and the sensor data of the electronic device is acquired again.

[0124] Specifically, this embodiment monitors the stability of the electronic device when the user uses a browser or an application APP to browse the web or use other purposes. In this embodiment, the electronic device has a built-in browser or an application installed, and the electronic device has a built-in acceleration sensor and a gyroscope sensor.

[0125] Therefore, if the display page of the electronic device is refreshed or the user clicks to jump to a page, i.e., switches pages, the two-dimensional array will be cleared, new two-dimensional data will be acquired, and the above steps will be executed based on the new two-dimensional data to monitor the stability of the electronic device.

[0126] Alternatively, if it is detected that the display page of the electronic device is refreshed and the electronic device re-enters the initial state or the user clicks to jump to the page, the two-dimensional array will be cleared, new two-dimensional data will be obtained again, and the above steps will be executed based on the new two-dimensional data to monitor the stability of the electronic device.

[0127] This embodiment can re-acquire the two-dimensional array by monitoring page refresh or page switch, and implement effective and continuous monitoring of the stability of the electronic device based on the new two-dimensional array.

[0128] refer to Figure 2 In one embodiment of the present application, a device for detecting the stability of an electronic device is provided. The device for detecting the stability of an electronic device comprises:

[0129] A data storage module 100 is used to store the acquired sensor data in a two-dimensional array according to the order of data acquisition, wherein the sensor data includes acceleration data and angular velocity data;

[0130] A gravity component direction determination module 200, used to determine the direction of the gravity component corresponding to the sensor data;

[0131] A first marking module 300, for marking a state word for corresponding sensor data according to the direction of the gravity component, wherein the state word is a moving state or an initial state;

[0132] A first calculation module 400, configured to calculate a sub-sensor data mean value of the sub-sensor data based on the two-dimensional array;

[0133] A second marking module 500 is used to mark the array value with a state evaluation word according to a comparison result between the array value in the two-dimensional array and the corresponding sub-sensor data mean value, wherein the state evaluation word is used to indicate a good state, or used to indicate a bad state;

[0134] The second calculation module 600 is used to calculate the continuous proportion according to the state mark in the two-dimensional array and the time interval between adjacent sensor data, wherein the state mark includes a state word and a state evaluation word, and the continuous proportion includes a good continuous proportion of the moving state;

[0135] The scoring module 800 is used to determine the stability score according to the persistence ratio.

[0136] In one embodiment, the second calculation module 600 includes:

[0137] A first statistical module is used to compare the status words of adjacent sensor data in the two-dimensional array and to count the number of continuous and moving target sensor data;

[0138] A first sub-calculation module, used for calculating the duration of the moving state according to the time interval between adjacent target sensor data and the number of continuous target sensor data;

[0139] A second statistical module is used to count the number of status evaluation words indicating a good status in the target sensor data;

[0140] A second sub-calculation module is used to calculate the duration of the good moving state according to the time interval between adjacent target sensor data and the number of state evaluation words indicating a good state;

[0141] The third sub-calculation module is used to obtain the good movement state duration ratio according to the ratio of the good movement state duration to the movement state duration.

[0142] In one embodiment, the device for detecting the stability of an electronic device further includes:

[0143] A window creation module, used to create a window, wherein the window is synchronized with a display page of the electronic device, and the display content of the window is the same as the display content of the electronic device;

[0144] The monitoring module is used to monitor user click events through the window;

[0145] A data acquisition module, used to acquire sensor data of the electronic device if a user click event is monitored;

[0146] The time interval recording module is used to record the time interval between two adjacent sensor data acquisitions.

[0147] In one embodiment, the first computing module 400 includes:

[0148] A horizontal angle calculation module is used to calculate the angle between the electronic device and the horizontal direction according to the sensor data;

[0149] A first data selection module is used to select sensor data in the two-dimensional array, where the angle between the electronic device and the horizontal direction is within a preset angle;

[0150] The fourth sub-calculation module is used to obtain the sub-sensor data mean of the sub-sensor data by calculating the absolute value, summing and averaging the selected sensor data.

[0151] In one embodiment, the acceleration data includes three sub-sensor data, namely, X-axis acceleration, Y-axis acceleration, and Z-axis acceleration;

[0152] The first calculation module 400 includes:

[0153] A fifth sub-calculation module, used to calculate a horizontal velocity component and a vertical velocity component according to the sensor data;

[0154] A second data selection module is used to select sensor data if the horizontal velocity component in the same set of sensor data is greater than the vertical velocity component and the difference between the two velocity components in the horizontal direction does not exceed a preset value;

[0155] The sixth sub-calculation module is used to obtain the sub-sensor data mean value of each sub-sensor data by calculating the absolute value, summing and averaging the selected sensor data.

[0156] In one embodiment, the gravity component direction determination module 200 includes:

[0157] A canvas creation module, used to create a canvas that fills the entire screen of the electronic device according to the screen size of the electronic device;

[0158] A coordinate conversion module, for obtaining the original coordinates of the target point clicked by the user if a touchstart event is monitored, and converting the original coordinates into the first coordinates in the canvas coordinate system;

[0159] The coordinate conversion module is also used to obtain the second coordinate of the original coordinate of the target point in the canvas coordinate system if a touchmove event or a touchend event is monitored;

[0160] A subtraction module, used to respectively subtract the x-axis coordinate and the y-axis coordinate of the first coordinate from the second coordinate to obtain an x-axis coordinate difference and a y-axis coordinate difference;

[0161] A filling module, used for mapping the x-axis coordinate difference and the y-axis coordinate difference with the corresponding sensor data and filling them in the canvas as coordinate points, wherein the center position of the canvas is the gravity component;

[0162] The direction determination module is used to determine the direction of the gravity component of the corresponding sensor data according to the position of the coordinate point in the canvas.

[0163] In one embodiment, the device for detecting the stability of an electronic device further includes:

[0164] The clearing module is used to clear the two-dimensional array and reacquire the sensor data of the electronic device if the display page of the electronic device is refreshed or the page jumps.

[0165] or,

[0166] The device for detecting the stability of electronic equipment also includes:

[0167] The clearing module is used to clear the two-dimensional array and reacquire the sensor data of the electronic device if the display page of the electronic device is refreshed and the electronic device re-enters the initial state, or the page jumps.

[0168] Figure 3 7 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 700 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 710 (for example, one or more processors) and a memory 720, and one or more storage media 730 (for example, one or more mass storage devices) storing application programs 733 or data 732. Among them, the memory 720 and the storage medium 730 can be short-term storage or permanent storage. The program stored in the storage medium 730 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the computer device 700. Furthermore, the processor 710 may be configured to communicate with the storage medium 730 to execute a series of instruction operations in the storage medium 730 on the computer device 700.

[0169] The computer device 700 may also include one or more power supplies 740, one or more wired or wireless network interfaces 750, one or more input and output interfaces 760, and / or one or more operating systems 731, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 3 The illustrated computer device structure does not constitute a limitation on the computer device, and may include more or fewer components than illustrated, or combine certain components, or arrange the components differently.

[0170] The present application also provides a computer device, the computer device includes a memory and a processor, the memory stores computer-readable instructions, when the computer-readable instructions are executed by the processor, the processor executes the steps of the electronic device stability detection method in the above-mentioned embodiments. The present application also provides a computer-readable storage medium, the computer-readable storage medium can be a non-volatile computer-readable storage medium, the computer-readable storage medium can also be a volatile computer-readable storage medium, the computer-readable storage medium stores instructions, when the instructions are executed on the computer, the computer executes the steps of the electronic device stability detection method.

[0171] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0172] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., and other media that can store program codes.

[0173] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for detecting the stability of an electronic device, characterized in that: The method for detecting the stability of the electronic device comprises: According to the order of data acquisition, the acquired sensor data is stored in a two-dimensional array, wherein the sensor data includes acceleration data and angular velocity data; determining a direction of a gravity component corresponding to the sensor data; Marking a state word for the corresponding sensor data according to the direction of the gravity component, wherein the state word is a moving state or an initial state; Based on the two-dimensional array, calculating a sub-sensor data mean of the sub-sensor data; According to the comparison result between the array value in the two-dimensional array and the corresponding sub-sensor data mean, marking the array value with a state evaluation word, wherein the state evaluation word is used to indicate a good state, or is used to indicate a bad state; Calculate the duration ratio according to the state mark in the two-dimensional array and the time interval between adjacent sensor data, wherein the state mark includes a state word and a state evaluation word, and the duration ratio includes a moving state and a duration ratio; Determining a stability score based on the persistence percentage; Calculating the duration ratio according to the state mark in the two-dimensional array and the time interval between adjacent sensor data includes: Comparing the status words of adjacent sensor data in the two-dimensional array, and counting the number of continuous and moving target sensor data; Calculate the duration of the moving state according to the time interval between adjacent target sensor data and the number of continuous target sensor data; Counting the number of status evaluation words indicating a good status in the target sensor data; Calculate the duration of the good moving state according to the time interval between adjacent target sensor data and the number of state evaluation words used to indicate a good state; The good movement state duration ratio is obtained according to the ratio of the good movement state duration to the movement state duration.

2. The method for detecting the stability of an electronic device according to claim 1, characterized in that: Before storing the acquired sensor data in the two-dimensional array, the method for detecting the stability of the electronic device further includes: Creating a window, wherein the window is synchronized with a display page of the electronic device, and display content of the window is the same as the display content of the electronic device; Monitor user click events through the window; If a user click event is monitored, the sensor data of the electronic device is obtained; Record the time interval between two adjacent sensor data acquisitions.

3. The method for detecting the stability of an electronic device according to claim 1, characterized in that: The calculating the sub-sensor data mean value of the sub-sensor data based on the two-dimensional array includes: Calculate the angle between the electronic device and the horizontal direction according to the sensor data; Selecting sensor data in the two-dimensional array whose angle between the electronic device and the horizontal direction is within a preset angle; According to the selected sensor data, the sub-sensor data mean of the sub-sensor data is obtained by calculating the absolute value, the sum and the average value.

4. The method for detecting the stability of an electronic device according to claim 1, characterized in that: The acceleration data includes three sub-sensor data, namely, X-axis acceleration, Y-axis acceleration and Z-axis acceleration; The calculating the sub-sensor data mean value of the sub-sensor data based on the two-dimensional array includes: Calculate the horizontal velocity component and the vertical velocity component according to the sensor data; If the horizontal velocity component in the same set of sensor data is greater than the vertical velocity component, and the difference between the two velocity components in the horizontal direction does not exceed a preset value, then the sensor data is selected; According to the selected sensor data, the sub-sensor data mean value of each sub-sensor data is obtained by calculating the absolute value, the sum and the average value.

5. The method for detecting the stability of an electronic device according to claim 2, characterized in that: The determining the direction of the gravity component corresponding to the sensor data comprises: According to the screen size of the electronic device, creating a canvas that fills the entire screen of the electronic device; If a touchstart event is monitored, the original coordinates of the target point clicked by the user are obtained, and the original coordinates are converted into the first coordinates in the canvas coordinate system; If a touchmove event or a touchend event is monitored, the second coordinate of the original coordinate of the target point in the canvas coordinate system is obtained; Subtracting the x-axis coordinate and the y-axis coordinate of the first coordinate from the second coordinate to obtain an x-axis coordinate difference and a y-axis coordinate difference; Mapping the x-axis coordinate difference and the y-axis coordinate difference with corresponding sensor data and filling them in a canvas as coordinate points, wherein the center position of the canvas is a gravity component; The direction of the gravity component of the corresponding sensor data is determined according to the position of the coordinate point in the canvas.

6. The method for detecting the stability of an electronic device according to claim 2, characterized in that: The method for detecting the stability of an electronic device further includes: if a display page of the electronic device is refreshed or a page jumps, clearing the two-dimensional array and reacquiring sensor data of the electronic device, or, The method for detecting the stability of an electronic device further includes: if the display page of the electronic device is refreshed and the electronic device re-enters the initial state, or the page jumps, clearing the two-dimensional array and reacquiring the sensor data of the electronic device.

7. A device for detecting the stability of an electronic device, characterized in that: The device for detecting the stability of an electronic device comprises: A data storage module, used to store the acquired sensor data in a two-dimensional array according to the order of data acquisition, wherein the sensor data includes acceleration data and angular velocity data; A gravity component direction determination module, used to determine the direction of the gravity component corresponding to the sensor data; A first marking module, used for marking a state word for corresponding sensor data according to the direction of the gravity component, wherein the state word is a moving state or an initial state; A first calculation module, configured to calculate a sub-sensor data mean value of the sub-sensor data based on the two-dimensional array; A second marking module, used for marking a state evaluation word for the array value according to a size comparison result between the array value in the two-dimensional array and the corresponding sub-sensor data mean, wherein the state evaluation word is used to indicate a good state, or used to indicate a bad state; A second calculation module is used to calculate the continuous proportion according to the state mark in the two-dimensional array and the time interval between adjacent sensor data, wherein the state mark includes a state word and a state evaluation word, and the continuous proportion includes a moving state and a continuous proportion; A scoring module, used to determine a stability score according to the continuous proportion; The second calculation module specifically includes: A first statistical module is used to compare the status words of adjacent sensor data in the two-dimensional array and perform quantitative statistics on continuous and moving target sensor data; A first sub-calculation module, used for calculating the duration of the moving state according to the time interval between adjacent target sensor data and the number of continuous target sensor data; A second statistical module is used to count the number of status evaluation words indicating a good status in the target sensor data; A second sub-calculation module is used to calculate the duration of the good moving state according to the time interval between adjacent target sensor data and the number of state evaluation words indicating a good state; The third sub-calculation module is used to obtain the good movement state duration ratio according to the ratio of the good movement state duration to the movement state duration.

8. A computer device, characterized in that: The computer device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the computer device to execute the method for detecting the stability of an electronic device as described in any one of claims 1-6.

9. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the method for detecting the stability of an electronic device as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • System and method for detection on a stationary surface

    CN119355832A