Data processing method, device, equipment and storage medium

文档序号:1798134 发布日期:2021-11-05 浏览:30次 中文

阅读说明:本技术 一种数据处理方法、装置、设备和存储介质 (Data processing method, device, equipment and storage medium ) 是由 莫铭锟 于 2021-08-20 设计创作,主要内容包括:本申请实施例公开了一种数据处理方法、装置、设备和存储介质,首先获取位于终端设备上的运动传感器的运动数据,运动数据能够确定用户对终端设备触发的晃动操作,之后根据用户触发的晃动操作确定用户想要触发的应用程序的目标功能,终端设备最后执行目标功能,由此可见,本申请实施例提供的数据处理方法,能够通过终端设备的运动数据确定用户对终端设备触发的晃动操作,根据晃动操作确定并执行目标功能,无需用户触摸点击终端设备的屏幕,就能够触发执行目标功能,满足用户需求,提高用户体验。(The embodiment of the application discloses a data processing method, a device, equipment and a storage medium, firstly motion data of a motion sensor positioned on terminal equipment is obtained, the motion data can determine shaking operation triggered by a user on the terminal equipment, then the target function of an application program which the user wants to trigger is determined according to the shaking operation triggered by the user, and the terminal equipment finally executes the target function.)

1. A data processing method is applied to terminal equipment, and is characterized in that the method comprises the following steps:

acquiring motion data of a motion sensor of the terminal equipment;

determining shaking operation triggered by the user on the terminal equipment according to the motion data;

determining a corresponding target function according to the shaking operation;

and executing a target function corresponding to the shaking operation.

2. The method of claim 1, wherein the determining the corresponding target function according to the shaking operation comprises:

and determining a target function according to the shaking operation and the corresponding relation, wherein the corresponding relation is the corresponding relation between the shaking operation and the target function.

3. The method of claim 2, further comprising:

acquiring a parameter of each click operation in a plurality of click operations triggered by a user on a target application displayed on terminal equipment, wherein each click operation in the plurality of click operations is used for triggering and executing a corresponding function in the target application;

determining a target function from one or more functions corresponding to the plurality of click operations according to the parameters of the click operations;

and generating a corresponding relation between the shaking operation and the target function.

4. The method of claim 3, wherein the determining a target function from one or more functions corresponding to the plurality of click operations according to the parameter of the click operation comprises:

acquiring the number of times of triggering execution of each function in one or more functions triggered and executed by the click operations;

and determining a target function from the one or more functions according to the triggered execution times.

5. The method of claim 3, wherein the one or more functions comprise a first function;

determining a target function from one or more functions corresponding to the plurality of click operations according to the parameter of the click operation includes:

acquiring a position coordinate of each click operation in a plurality of click operations for triggering execution of the first function;

determining the probability of the first function being hit and triggered according to the distance between the position coordinate of each click operation and the position coordinate of the first function;

determining the first function as a target function in response to the probability being less than or equal to a threshold.

6. The method of claim 3, wherein the generating the correspondence between the shaking operation and the target function comprises:

determining parameters of the shaking operation according to the position information displayed on the display screen of the terminal equipment by the target function, wherein the parameters of the shaking operation comprise the direction, the angle and/or the amplitude of the shaking operation;

generating a corresponding relation between the parameters of the shaking operation and the target function;

the determining the corresponding target function according to the shaking operation comprises:

and determining a corresponding target function according to the parameters of the shaking operation.

7. The method of claim 1, wherein the determining the corresponding target function according to the shaking operation comprises:

determining a target area displayed by the terminal equipment according to the shaking operation;

and determining a target function located in the target area.

8. The method of claim 1, wherein the executing the target function corresponding to the shaking operation comprises:

generating a click instruction for triggering and executing the target function according to the shaking operation;

and triggering and executing the target function according to the click command.

9. The method of claim 1, wherein the obtaining motion data of a motion sensor of the terminal device comprises:

acquiring the gravity data detected by a gravity sensor of the terminal equipment;

the determining of the shaking operation triggered by the user to the terminal device according to the motion data comprises:

and determining that the user triggers shaking operation on the terminal equipment according to the gravity data.

10. A data processing apparatus, characterized in that the apparatus comprises:

the first acquisition unit is used for acquiring motion data of a motion sensor of the terminal equipment;

the first determining unit is used for determining shaking operation triggered by the user on the terminal equipment according to the motion data;

the second determining unit is used for determining a corresponding target function according to the shaking operation;

and the execution unit is used for executing the target function corresponding to the shaking operation.

11. The apparatus according to claim 10, wherein the second determining unit is specifically configured to:

and determining a target function according to the shaking operation and the corresponding relation, wherein the corresponding relation is the corresponding relation between the shaking operation and the target function.

12. The apparatus of claim 11, further comprising:

the second obtaining unit is used for obtaining a parameter of each click operation in a plurality of click operations triggered by the user on a target application displayed on the terminal device, wherein each click operation in the plurality of click operations is used for triggering and executing a corresponding function in the target application;

a third determining unit, configured to determine a target function from one or more functions corresponding to the plurality of click operations according to the parameter of the click operation;

a generating unit configured to generate a correspondence between the shake operation and the target function.

13. The apparatus according to claim 12, wherein the third determining unit is specifically configured to:

acquiring the number of times of triggering execution of each function in one or more functions triggered and executed by the click operations;

and determining a target function from the one or more functions according to the triggered execution times.

14. The apparatus of claim 12, wherein the one or more functions comprise a first function;

the third determining unit is specifically configured to:

acquiring a position coordinate of each click operation in a plurality of click operations for triggering execution of the first function;

determining the probability of the first function being hit and triggered according to the distance between the position coordinate of each click operation and the position coordinate of the first function;

determining the first function as a target function in response to the probability being less than or equal to a threshold.

15. The apparatus according to claim 12, wherein the generating unit is specifically configured to:

determining parameters of the shaking operation according to the position information displayed on the display screen of the terminal equipment by the target function, wherein the parameters of the shaking operation comprise the direction, the angle and/or the amplitude of the shaking operation;

generating a corresponding relation between the parameters of the shaking operation and the target function;

the second determining unit is specifically configured to:

and determining a corresponding target function according to the parameters of the shaking operation.

16. The apparatus according to claim 10, wherein the second determining unit is specifically configured to:

determining a target area displayed by the terminal equipment according to the shaking operation;

and determining a target function located in the target area.

17. The apparatus according to claim 10, wherein the execution unit is specifically configured to:

generating a click instruction for triggering and executing the target function according to the shaking operation;

and triggering and executing the target function according to the click command.

18. The apparatus according to claim 10, wherein the first obtaining unit is specifically configured to:

acquiring the gravity data detected by a gravity sensor of the terminal equipment;

the first determining unit is specifically configured to:

and determining that the user triggers shaking operation on the terminal equipment according to the gravity data.

19. A data processing apparatus, characterized in that the apparatus comprises: a processor and a memory;

the memory to store instructions;

the processor, configured to execute the instructions in the memory, to perform the method of any of claims 1 to 9.

20. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any of claims 1-9.

Technical Field

The present application relates to the field of computers, and in particular, to a data processing method, apparatus, device, and storage medium.

Background

With the rapid development of the related technologies of the terminal devices, a user can download a plurality of applications, such as a tremble or a small red book, in the terminal device, and various requirements of the user can be met by using different applications.

In practical application, a user may have a situation that the user cannot touch and click a screen of the terminal device, so that the function of the application program cannot be triggered, the user's requirement cannot be met, and the user experience is poor.

Disclosure of Invention

The embodiment of the application provides a data processing method, a data processing device, data processing equipment and a storage medium, which meet the requirements of users and improve the user experience.

The embodiment of the application provides a data processing method, which is applied to terminal equipment and comprises the following steps:

acquiring motion data of a motion sensor of the terminal equipment;

determining shaking operation triggered by the user on the terminal equipment according to the motion data;

determining a corresponding target function according to the shaking operation;

and executing a target function corresponding to the shaking operation.

Optionally, the determining the corresponding target function according to the shaking operation includes:

and determining a target function according to the shaking operation and the corresponding relation, wherein the corresponding relation is the corresponding relation between the shaking operation and the target function.

Optionally, the method further comprises:

acquiring a parameter of each click operation in a plurality of click operations triggered by a user on a target application displayed on terminal equipment, wherein each click operation in the plurality of click operations is used for triggering and executing a corresponding function in the target application;

determining a target function from one or more functions corresponding to the plurality of click operations according to the parameters of the click operations;

and generating a corresponding relation between the shaking operation and the target function.

Optionally, the determining, according to the parameter of the click operation, a target function from one or more functions corresponding to the plurality of click operations includes:

acquiring the number of times of triggering execution of each function in one or more functions triggered and executed by the click operations;

and determining a target function from the one or more functions according to the triggered execution times.

Optionally, the one or more functions comprise a first function;

determining a target function from one or more functions corresponding to the plurality of click operations according to the parameter of the click operation includes:

acquiring a position coordinate of each click operation in a plurality of click operations for triggering execution of the first function;

determining the probability of the first function being hit and triggered according to the distance between the position coordinate of each click operation and the position coordinate of the first function;

determining the first function as a target function in response to the probability being less than or equal to a threshold.

Optionally, the generating the correspondence between the shake operation and the target function includes:

determining parameters of the shaking operation according to the position information displayed on the display screen of the terminal equipment by the target function, wherein the parameters of the shaking operation comprise the direction, the angle and/or the amplitude of the shaking operation;

generating a corresponding relation between the parameters of the shaking operation and the target function;

the determining the corresponding target function according to the shaking operation comprises:

and determining a corresponding target function according to the parameters of the shaking operation.

Optionally, the determining the corresponding target function according to the shaking operation includes:

determining a target area displayed by the terminal equipment according to the shaking operation;

and determining a target function located in the target area.

Optionally, the executing the target function corresponding to the shaking operation includes:

generating a click instruction for triggering and executing the target function according to the shaking operation;

and triggering and executing the target function according to the click command.

Optionally, the acquiring motion data of a motion sensor of the terminal device includes:

acquiring the gravity data detected by a gravity sensor of the terminal equipment;

the determining of the shaking operation triggered by the user to the terminal device according to the motion data comprises:

and determining that the user triggers shaking operation on the terminal equipment according to the gravity data.

An embodiment of the present application further provides a data processing apparatus, where the apparatus includes:

the first acquisition unit is used for acquiring motion data of a motion sensor of the terminal equipment;

the first determining unit is used for determining shaking operation triggered by the user on the terminal equipment according to the motion data;

the second determining unit is used for determining a corresponding target function according to the shaking operation;

and the execution unit is used for executing the target function corresponding to the shaking operation.

Optionally, the second determining unit is specifically configured to:

and determining a target function according to the shaking operation and the corresponding relation, wherein the corresponding relation is the corresponding relation between the shaking operation and the target function.

Optionally, the apparatus further comprises:

the second obtaining unit is used for obtaining a parameter of each click operation in a plurality of click operations triggered by the user on a target application displayed on the terminal device, wherein each click operation in the plurality of click operations is used for triggering and executing a corresponding function in the target application;

a third determining unit, configured to determine a target function from one or more functions corresponding to the plurality of click operations according to the parameter of the click operation;

a generating unit configured to generate a correspondence between the shake operation and the target function.

Optionally, the third determining unit is specifically configured to:

acquiring the number of times of triggering execution of each function in one or more functions triggered and executed by the click operations;

and determining a target function from the one or more functions according to the triggered execution times.

Optionally, the one or more functions comprise a first function;

the third determining unit is specifically configured to:

acquiring a position coordinate of each click operation in a plurality of click operations for triggering execution of the first function;

determining the probability of the first function being hit and triggered according to the distance between the position coordinate of each click operation and the position coordinate of the first function;

determining the first function as a target function in response to the probability being less than or equal to a threshold.

Optionally, the generating unit is specifically configured to:

determining parameters of the shaking operation according to the position information displayed on the display screen of the terminal equipment by the target function, wherein the parameters of the shaking operation comprise the direction, the angle and/or the amplitude of the shaking operation;

generating a corresponding relation between the parameters of the shaking operation and the target function;

the second determining unit is specifically configured to:

and determining a corresponding target function according to the parameters of the shaking operation.

Optionally, the second determining unit is specifically configured to:

determining a target area displayed by the terminal equipment according to the shaking operation;

and determining a target function located in the target area.

Optionally, the execution unit is specifically configured to:

generating a click instruction for triggering and executing the target function according to the shaking operation;

and triggering and executing the target function according to the click command.

Optionally, the first obtaining unit is specifically configured to:

acquiring the gravity data detected by a gravity sensor of the terminal equipment;

the first determining unit is specifically configured to:

and determining that the user triggers shaking operation on the terminal equipment according to the gravity data.

An embodiment of the present application further provides a data processing apparatus, where the apparatus includes: a processor and a memory;

the memory to store instructions;

the processor is used for executing the instructions in the memory and executing the method of the method embodiment.

Embodiments of the present application further provide a computer-readable storage medium, which includes instructions that, when executed on a computer, cause the computer to perform the method described in the above method embodiments.

The data processing method provided by the embodiment of the application comprises the steps that firstly, motion data of a motion sensor located on a terminal device are obtained, the motion data can determine shaking operation triggered by a user on the terminal device, then, a target function of an application program which the user wants to trigger is determined according to the shaking operation triggered by the user, and the terminal device executes the target function finally.

Drawings

In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.

Fig. 1 is a flowchart of a data processing method according to an embodiment of the present application;

fig. 2 is a schematic view of a display window of a terminal device screen provided in the present application;

fig. 3 is a schematic view of a display window of another terminal device screen provided in the present application;

fig. 4 is a block diagram of a data processing apparatus according to an embodiment of the present application;

fig. 5 is a block diagram of a data processing device according to an embodiment of the present application.

Detailed Description

In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

Referring to fig. 1, the figure is a flowchart of a data processing method according to an embodiment of the present application.

The data processing method provided by the embodiment of the application can be applied to terminal equipment, and the terminal equipment can be equipment with a display function, such as a mobile phone or a tablet computer.

The processing method provided by the embodiment comprises the following steps:

and S101, acquiring the motion data of the motion sensor of the terminal equipment.

In an embodiment of the present application, the motion sensor is a sensor capable of acquiring motion data of the terminal device, and the motion data may include position data, displacement data, velocity data, acceleration data, and gravity data of the terminal device.

The motion data of the terminal device may be detected by a motion sensor provided in the terminal device. Different types of motion data can be acquired by different types of motion sensors, for example, gravity data of the terminal device can be detected by a gravity sensor.

And S102, determining shaking operation triggered by the user to the terminal equipment according to the motion data.

In the embodiment of the application, the user triggers the shaking operation on the terminal equipment, the terminal equipment shakes, the motion sensor can acquire the motion data generated by shaking the terminal equipment, and then the shaking operation triggered by the user on the terminal equipment can be determined according to the motion data of the terminal equipment detected by the motion sensor.

If the motion sensor is a gravity sensor, after the gravity data detected by the gravity sensor is obtained, the gravity data is used for determining that the user triggers and shakes the terminal equipment.

S103, determining a corresponding target function according to the shaking operation.

In an embodiment of the application, the target function is a function in a target application, and the target application is an application that is triggered by a user and displayed on a display screen of the terminal device. The type of the target application may be a video type application, a novel reading type application, or an album gallery type application, and the type of the target application is not particularly limited in the present application.

In the embodiment of the application, a user can install one or more applications on the terminal device, each application has one or more functions, and the function can be triggered and executed by clicking an area where a certain function of a target application is displayed on the terminal device.

In the embodiment of the application, after the shaking operation triggered by the user to the terminal device is determined according to the motion data, the target function which the user wants to trigger to execute can be determined according to the shaking operation.

Two possible implementations of determining the corresponding target function according to the shaking operation are described below:

a first possible implementation: the target function may be determined according to the shaking operation and the correspondence relationship between the shaking operation and the target function. That is to say, the shaking operation corresponds to the function of the application program one by one, and the purpose of triggering and executing the function of the application program without touching and clicking the screen of the terminal equipment can be achieved by triggering the shaking operation on the terminal equipment.

A second possible implementation: the target area displayed by the terminal equipment can be determined according to the shaking operation, and then the target function located in the target area is determined. That is to say, the shaking operation corresponds to the area where the function of the application program is located one by one, the area where the function is located is determined firstly, then the function located in the area is determined, and the shaking operation is triggered on the terminal device, so that the purpose of triggering and executing the function of the application program without touching and clicking the screen of the terminal device can be achieved

And S104, executing a target function corresponding to the shaking operation.

In the embodiment of the application, after the target function is determined according to the shaking operation, the terminal device executes the target function corresponding to the shaking operation.

In practical application, the terminal device may first generate a click instruction for triggering execution of a target function according to the shaking operation, and then trigger execution of a corresponding target function according to the click instruction.

The foregoing describes that the target function can be determined by the shake operation and the correspondence, and how to generate the correspondence between the shake operation and the target function is described below:

in the embodiment of the application, a parameter of each click operation in a plurality of click operations triggered by a user on a target application displayed on a terminal device is obtained, a target function is determined from one or more functions corresponding to the plurality of click operations according to the parameter of the click operation, and then a corresponding relation between a shaking operation and the target function is generated.

In the embodiment of the application, the terminal device may obtain a parameter of each click operation in a plurality of click operations triggered by a user on a target application displayed on the terminal device, where each click operation in the plurality of click operations is used for triggering execution of a corresponding function in the target application. The terminal device can directly acquire parameters of each click operation in a plurality of click operations triggered by a user on the target application displayed on the terminal device.

As an example, when the target application displayed on the terminal device is a small red book, the user clicks an area where the comment function located on the right side of the display screen of the terminal device is located, and the display screen displays a comment interface of the small red book.

As another example, when the target application displayed on the terminal device is a shake, the user may click on an area where the like function is located on the left side of the display screen of the terminal device, and the display screen displays a like interface.

In the embodiment of the application, the multiple click operations are used for triggering execution of one or more functions, that is, the multiple click operations acquired by the terminal device are used for triggering the same function of the target application, and may also be used for triggering different functions of the target application. The parameters of the clicking operation may include one or more of the number of times of the clicking operation, the position coordinates of the clicking operation on the screen, and the like.

In the embodiment of the application, the terminal device may acquire parameters of a click operation of a user in an area where one or more functions are clicked in the target application, and determine a target function which can be triggered and executed through a shaking operation from the one or more functions according to the parameters of the click operation of the user. When a user wants to trigger the target function of executing the target application, the user does not need to touch a display screen of the terminal equipment, only needs to shake the terminal equipment, and does not need to actively set the function in the application program triggered and executed by shaking the terminal equipment, so that the user experience is improved, and the personalized requirements of the user are met.

In the embodiment of the present application, the terminal device determines, according to the parameter of the click operation, a target function from one or more functions corresponding to a plurality of click operations, where the target function has the following two possible implementation manners:

the scene corresponding to the first possible implementation manner is that the user frequently touches the area where one or more functions are located on the screen to trigger and execute the one or more functions for multiple times, that is, the user frequently triggers and executes the functions frequently used by the user, the functions frequently used by the user can be determined as the target functions, the user can trigger and execute the frequently used functions through shaking operation, and user experience is improved. The terminal equipment obtains the number of times that each function of one or more functions triggered and executed by a plurality of click operations in a target application is triggered and executed by a user, determines a target function from the one or more functions according to the number of times that the function is triggered and executed, and corresponds to the shaking operation of the terminal equipment.

As an example, the number of times that each function in the plurality of functions is triggered to execute may be sorted, the function whose triggered execution number is in the top N bits may be determined as the target function, that is, the function whose triggered execution number is in the top N bits may be determined as a function commonly used by the user, and the function commonly used by the user may be determined as the target function, where N is a positive integer greater than or equal to 1.

As another example, the number of times each of the plurality of functions is triggered to be executed may be calculated, and when the number of times exceeds a threshold, the function whose number of times of triggered execution exceeds the threshold may be determined as the target function. The function whose number of triggered executions exceeds the threshold is a function frequently used by the user, and the function frequently used by the user can be determined as a target function. For example, the threshold may be 50.

The second possible implementation manner corresponds to a scenario that a user may have a situation that both hands are inconvenient or the terminal device is operated by one hand, and in this situation, the user may not accurately click a screen display area where a function to be triggered is located, but click the function once many times, so that the hit rate is low, and the user experience effect is poor. Therefore, in the embodiment of the application, the terminal device determines a certain function as a target function by acquiring the position coordinate of each click operation in a plurality of click operations for triggering execution of the function, and according to the distance between the position coordinate of each click operation and the position coordinate of the function, when the distance meets a preset condition. That is, when the user wants to click on the area where a certain function is located in the target application, the user may operate the terminal device with one hand, and click on the area where the function is located and the area nearby the area for multiple times, and if the distance between the position coordinate of the function and the position coordinate of the user click operation is within a preset range (the upper bound of the preset range is greater than the distance from the center point of the display area where the function is located to the boundary of the display area), it indicates that the user may want to trigger execution of the function. If the number of times of the click operation meeting the preset condition is larger than or equal to the threshold value, it indicates that the user has a high probability of triggering the execution of the function, so that the function can be determined as a target function and corresponds to the shaking operation of the terminal device.

As an example, when a user opens a target application, such as a small red book, and operates the terminal device with one hand in the left hand, the user wants to click on a region where a comment function is located on the right side of the display screen, but only clicks on a region near the region where the comment function is located, at this time, a distance between a position coordinate of each click operation and a position coordinate of the comment function may be calculated, that is, whether a distance between a position coordinate of the comment function and a position coordinate of each click operation is within a preset range is determined, and if the number of click operations within the preset range is greater than or equal to a threshold, the comment function is determined as the target function.

In the embodiment of the application, after the terminal device determines the target function, the terminal device directly generates the corresponding relationship between the target function and the parameter of the shaking operation, so that after the terminal device receives the shaking operation of the user corresponding to the parameter of the shaking operation, the terminal device triggers the execution of the target function according to the corresponding relationship. The parameter of the shaking operation may include one or more of a direction, an angle, an amplitude, and the like of the shaking operation.

The parameters of the shaking operation can be determined by two possible implementations, as exemplified by the direction of the shaking operation:

as a possible implementation manner, the terminal device may determine a parameter of the shaking operation according to the position information displayed on the display screen of the terminal device by the target function.

For example, the direction of the shake operation is determined according to the position of the target function displayed in the screen. If the position of the target function displayed in the screen is at the left side of the screen, determining the direction of the shaking operation as leftwards shaking; if the position of the target function displayed in the screen is at the right side of the screen, determining the direction of the shaking operation as shaking to the right; if the position of the target function displayed in the screen is above the screen, determining the direction of the shaking operation as upward shaking; if the position where the target function is displayed in the screen is below the screen, the direction of the shake operation may be determined as a downward shake.

In addition, the amplitude of the shaking may also be determined according to the position of the target function displayed in the screen. For example, the target function a and the target function B are both to the left of the screen center line, and the distance of the target function a from the screen center line is greater than that of the target function B, i.e., the target function a is closer to the left edge of the terminal device than the target function B. The shake amplitude of the target function a may be greater than the shake amplitude of the target function B.

The above examples do not limit the technical solutions of the present application, and those skilled in the art can design the solutions according to actual situations.

After the target function is determined, the terminal device may display a prompt message to remind the user that the target function may be executed through a shaking operation.

As an example, referring to fig. 2, the display window 201 of the terminal device screen includes a prompt information display area 202, and the prompt information display area 202 includes a prompt information text display area 2021, a determination control display area 2022, and a close control display area 2023. The text display area 2021 is used to display the prompt information specifically, for example, prompt information for triggering execution of a comment function by shaking the terminal device to the left may be displayed. The determination control display area 2022 includes a determination control, and in response to a touch operation of the user in an area where the determination control is located, the terminal device generates a correspondence between leftward shaking and a comment function. The closing control display area 2023 includes a closing control, and in response to a touch operation of the user in the area where the closing control is located, the terminal device closes the prompt information.

As another possible implementation manner, the terminal device may receive the parameter of the shaking operation determined by the user. That is to say, the parameter of the shaking operation can be set by the user, so that the user can operate the terminal device by adopting the parameter of the shaking operation familiar to the user, and the user experience is improved.

For example, the target application is a short video application and the target function is to turn on or off a comment function. After determining that the target function is obtained or receiving the information of the target function from the server, the terminal device may display a setting panel, so that the user sets a parameter of the shaking operation on the setting panel, as shown in fig. 3. The display window 301 of the terminal device screen in fig. 3 includes a shake operation setting panel 302, a setting display area 303, and a comment function setting display area 304. The setting display area 303 and the comment function setting display area 304 reflect a panel interface of the display window 301 that is triggered to execute the comment function during the display setting shaking operation. The shake operation setting panel 302 includes a shake operation setting display area 3021, a shake operation parameter display area 3022, a shake operation parameter selection area 3023, a determination control display area 3025 and a close control display area 3026, and a shake operation parameter selection control 3024 is included in the shake operation parameter selection area 3023.

The user knows the information of the parameter of the shaking operation through the shaking operation parameter display area 3022, selects the parameter of the shaking operation for triggering execution of the comment function through the area where the control in the touch shaking operation parameter selection area 3023 is located, the user touches the area where the control is determined, and the terminal device generates the corresponding relationship between the left shaking operation and the comment function.

Two possible implementation manners for determining the parameters of the shaking operation are briefly introduced above, and those skilled in the art can freely modify the two implementation manners according to actual situations.

It should be noted that, when the target application is capable of providing a function or some functions to be executed according to the shake operation trigger, after the target function is determined, the parameters of the shake operation corresponding to the target function should not be the same as the parameters of the existing shake operation, so as to avoid the occurrence of misoperation. Therefore, the terminal device can obtain the preset shaking operation parameters corresponding to the target application before generating the parameters of the target function and the shaking operation, and set the parameters of the shaking operation of the target function according to the preset shaking operation parameters or provide the parameters for a user to select.

For example, the target application is novel reading, and if the upward shaking is preset in the novel reading for triggering the upward page turning, the downward shaking is used for triggering the downward page turning. Then, when the target function of the target application is determined to be the comment area, the corresponding shaking operation direction can only be set to be leftwards shaking or rightwards shaking, but cannot be set to be upwards shaking or downwards shaking, so that the situation that the wrong function is triggered and executed to influence the user experience is avoided.

In addition, the correspondence between the target function and the parameter of the shake operation may be embodied as a correspondence between a position coordinate of the click command and the parameter of the shake operation, where the position coordinate of the click command is within a display area of the target function. When the terminal equipment receives shaking operation triggered by a user, a click instruction for triggering execution of a target function is automatically generated according to parameters and corresponding relations of the shaking operation, namely, a display area where the target function is clicked by the user is simulated, so that the terminal equipment triggers execution of the target function according to the click instruction. In the process, the target function can be triggered and executed without clicking a display screen of the terminal equipment by a user, so that the user experience is improved.

The data processing method provided by the embodiment of the application comprises the steps that firstly, motion data of a motion sensor located on a terminal device are obtained, the motion data can determine shaking operation triggered by a user on the terminal device, then, a target function of an application program which the user wants to trigger is determined according to the shaking operation triggered by the user, and the terminal device executes the target function finally.

Based on the data processing method provided by the above embodiment, the embodiment of the present application further provides a data processing apparatus, and the working principle of the data processing apparatus is described in detail below with reference to the accompanying drawings.

Referring to fig. 4, this figure is a block diagram of a data processing apparatus according to an embodiment of the present application.

The data processing apparatus 400 provided in this embodiment includes:

a first obtaining unit 410, configured to obtain motion data of a motion sensor of the terminal device;

a first determining unit 420, configured to determine, according to the motion data, a shaking operation triggered by the user on the terminal device;

a second determining unit 430, configured to determine a corresponding target function according to the shaking operation;

and an executing unit 440, configured to execute a target function corresponding to the shaking operation.

Optionally, the second determining unit is specifically configured to:

and determining a target function according to the shaking operation and the corresponding relation, wherein the corresponding relation is the corresponding relation between the shaking operation and the target function.

Optionally, the apparatus further comprises:

the second obtaining unit is used for obtaining a parameter of each click operation in a plurality of click operations triggered by the user on a target application displayed on the terminal device, wherein each click operation in the plurality of click operations is used for triggering and executing a corresponding function in the target application;

a third determining unit, configured to determine a target function from one or more functions corresponding to the plurality of click operations according to the parameter of the click operation;

a generating unit configured to generate a correspondence between the shake operation and the target function.

Optionally, the third determining unit is specifically configured to:

acquiring the number of times of triggering execution of each function in one or more functions triggered and executed by the click operations;

and determining a target function from the one or more functions according to the triggered execution times.

Optionally, the one or more functions comprise a first function;

the third determining unit is specifically configured to:

acquiring a position coordinate of each click operation in a plurality of click operations for triggering execution of the first function;

determining the probability of the first function being hit and triggered according to the distance between the position coordinate of each click operation and the position coordinate of the first function;

determining the first function as a target function in response to the probability being less than or equal to a threshold.

Optionally, the generating unit is specifically configured to:

determining parameters of the shaking operation according to the position information displayed on the display screen of the terminal equipment by the target function, wherein the parameters of the shaking operation comprise the direction, the angle and/or the amplitude of the shaking operation;

generating a corresponding relation between the parameters of the shaking operation and the target function;

the second determining unit is specifically configured to:

and determining a corresponding target function according to the parameters of the shaking operation.

Optionally, the second determining unit is specifically configured to:

determining a target area displayed by the terminal equipment according to the shaking operation;

and determining a target function located in the target area.

Optionally, the execution unit is specifically configured to:

generating a click instruction for triggering and executing the target function according to the shaking operation;

and triggering and executing the target function according to the click command.

Optionally, the first obtaining unit is specifically configured to:

acquiring the gravity data detected by a gravity sensor of the terminal equipment;

the first determining unit is specifically configured to:

and determining that the user triggers shaking operation on the terminal equipment according to the gravity data.

Based on the data processing method provided in the foregoing embodiment, an embodiment of the present application further provides a data processing apparatus, and as shown in fig. 5, the data processing apparatus 500 includes:

a processor 510 and a memory 520, the number of which may be one or more. In some embodiments of the present application, the processor and memory may be connected by a bus or other means.

The memory may include both read-only memory and random access memory, and provides instructions and data to the processor. The portion of memory may also include NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or subsets thereof, or expanded sets thereof, wherein the operating instructions may include various operating instructions for performing various operations. The operating system may include various system programs for implementing various basic services and for handling hardware-based tasks.

The processor controls the operation of the terminal device and may also be referred to as a CPU.

The method disclosed in the embodiments of the present application may be applied to a processor, or may be implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The processor described above may be a general purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.

The embodiment of the present application further provides a computer-readable storage medium for storing a program code, where the program code is used to execute any one implementation of the methods of the foregoing embodiments.

When introducing elements of various embodiments of the present application, the articles "a," "an," "the," and "said" are intended to mean that there are one or more of the elements. The terms "comprising," "including," and "having" are intended to be inclusive and mean that there may be additional elements other than the listed elements.

It should be noted that, as one of ordinary skill in the art would understand, all or part of the processes of the above method embodiments may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when executed, the computer program may include the processes of the above method embodiments. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.

The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to some descriptions of the method embodiment for relevant points. The above-described apparatus embodiments are merely illustrative, and the units and modules described as separate components may or may not be physically separate. In addition, some or all of the units and modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.

The foregoing is directed to embodiments of the present application and it is noted that numerous modifications and adaptations may be made by those skilled in the art without departing from the principles of the present application and are intended to be within the scope of the present application.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种人机交互方法及其交互平板、存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类