CN113407045A - Cursor control method and device, electronic equipment and storage medium - Google Patents

Cursor control method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113407045A
CN113407045A CN202110718453.8A CN202110718453A CN113407045A CN 113407045 A CN113407045 A CN 113407045A CN 202110718453 A CN202110718453 A CN 202110718453A CN 113407045 A CN113407045 A CN 113407045A
Authority
CN
China
Prior art keywords
variation
determining
empty
cursor
horizontal azimuth
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110718453.8A
Other languages
Chinese (zh)
Other versions
CN113407045B (en
Inventor
谢昂
黄翀宇
罗晨
鲁威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202110718453.8A priority Critical patent/CN113407045B/en
Publication of CN113407045A publication Critical patent/CN113407045A/en
Application granted granted Critical
Publication of CN113407045B publication Critical patent/CN113407045B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0346Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of the device orientation or free movement in a 3D space, e.g. 3D mice, 6-DOF [six degrees of freedom] pointers using gyroscopes, accelerometers or tilt-sensors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Position Input By Displaying (AREA)

Abstract

The embodiment of the disclosure discloses a cursor control method, a cursor control device, an electronic device and a storage medium, wherein the method comprises the following steps: determining the variation of the space attitude of the empty mouse carrier equipment, wherein the variation comprises a first variation of a horizontal azimuth angle; correcting the first variable quantity based on the historical latest offset of the horizontal azimuth of the empty rat carrier equipment to obtain a second variable quantity of the corrected horizontal azimuth; determining the target position of the mouse cursor according to the second variable quantity; and controlling the air mouse cursor to move to the target position. The cursor control method provided by the disclosure improves the consistency between the cursor position and the space posture of the empty mouse carrier equipment, and realizes accurate remote control of the cursor.

Description

Cursor control method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of information technologies, and in particular, to a cursor control method and apparatus, an electronic device, and a storage medium.
Background
The air mouse is an air mouse, is a device for controlling the movement of a cursor on a display screen such as a display desktop and the like by rotating and moving in the air, gets rid of the dependence of a common mouse on a physical desktop, can be operated in a suspended mode, and can be used for realizing the movement control of the cursor only by moving a wrist.
An air mouse generally uses a portable input device (such as a remote controller, a smart phone, etc.) as a carrier device, and uses inertial sensors such as an accelerometer, a gyroscope, a magnetometer, etc. built in the carrier device to map attitude changes of the carrier device in a three-dimensional space to corresponding cursor position changes on electronic devices such as a computer/television, etc., so as to realize somatosensory mouse control on the electronic devices such as the computer/television, etc. The data of the accelerometer, the gyroscope and the magnetometer arranged in the carrier equipment are fused, so that the more accurate and stable spatial attitude of the carrier equipment can be obtained.
At present, most air mouse carrier devices only use an accelerometer and a gyroscope as data sources of an air mouse due to the hardware cost, the indoor magnetic field interference of the magnetometer and the like. However, the absence of the magnetometer causes the data source to lack the reference data in the direction of the magnetic north pole, so the estimation of the horizontal azimuth angle of the air mouse carrier device may be shifted, and the accumulated shift amount may become larger with time, causing the actual displacement of the cursor to deviate (be smaller than or larger than) the theoretical value, further causing the position of the cursor to be misaligned with the spatial attitude of the air mouse carrier device, which affects the user experience.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, embodiments of the present disclosure provide a cursor control method, an apparatus, an electronic device, and a storage medium, which improve consistency between a cursor position and a spatial posture of an empty mouse carrier device, and implement accurate remote control of a cursor.
In a first aspect, an embodiment of the present disclosure provides a cursor control method, including:
determining the variation of the space attitude of the empty mouse carrier equipment, wherein the variation comprises a first variation of a horizontal azimuth angle;
correcting the first variable quantity based on the historical latest offset of the horizontal azimuth of the empty rat carrier equipment to obtain a second variable quantity of the corrected horizontal azimuth;
determining the target position of the mouse cursor according to the second variable quantity;
and controlling the air mouse cursor to move to the target position.
In a second aspect, an embodiment of the present disclosure further provides a cursor control device, including:
the first determination module is used for determining the variation of the space attitude of the empty mouse carrier equipment, wherein the variation comprises a first variation of a horizontal azimuth angle;
the correction module is used for correcting the first variable quantity based on the historical latest offset of the horizontal azimuth of the empty mouse carrier equipment to obtain a second variable quantity of the corrected horizontal azimuth;
the second determining module is used for determining the target position of the mouse cursor according to the second variable quantity;
and the control module is used for controlling the air mouse cursor to move to the target position.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, where the electronic device includes:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a cursor control method as described above.
In a fourth aspect, the disclosed embodiments also provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the cursor control method as described above.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has at least the following advantages:
according to the cursor control method provided by the embodiment of the disclosure, after a variation (including a first variation of a horizontal azimuth) of a spatial attitude of an empty mouse carrier device is determined, the first variation is corrected based on a historical latest offset of the horizontal azimuth of the empty mouse carrier device, and a second corrected variation of the horizontal azimuth is obtained; and finally, determining the target position of the air mouse cursor according to the second variable quantity, and controlling the air mouse cursor to move to the target position. The first variable quantity is corrected based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier equipment, so that the determination precision of the space attitude variable quantity of the air mouse carrier equipment can be improved, the determination precision of the target position of an air mouse cursor is further improved, the accurate remote control of the cursor is realized, the consistency between the cursor position and the space attitude of the air mouse carrier equipment is improved, and the use experience of a user is favorably improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a flow chart of a cursor control method in an embodiment of the present disclosure;
FIG. 2 is a flow chart of a cursor control method in an embodiment of the present disclosure;
FIG. 3 is a flow chart of a cursor control method in an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a cursor control device in an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a flowchart of a cursor control method in the embodiment of the present disclosure. The method may be performed by a cursor control device, which may be implemented in software and/or hardware, and the device may be configured in an electronic device, such as a terminal, specifically including but not limited to a smart phone, a palm computer, a tablet computer, a portable wearable device, a smart home device (e.g., a desk lamp), and the like.
As shown in fig. 1, the method may specifically include the following steps:
and 110, determining the variation of the space attitude of the empty mouse carrier equipment, wherein the variation comprises a first variation of a horizontal azimuth angle.
The empty mouse carrier device refers to a terminal serving as an empty mouse remote controller, such as a smart phone or a remote controller.
In one embodiment, determining the amount of change in the spatial attitude of the empty rat carrier device comprises:
determining the spatial attitude of the empty mouse carrier device based on the sensing data of the motion sensor associated with the empty mouse carrier device; and determining the variation of the spatial attitude based on the spatial attitudes of the empty rat carrier device respectively determined by the sensing data of two adjacent frames, or in other words, determining the variation of the spatial attitude based on the spatial attitudes of the empty rat carrier device respectively determined by the sensing data detected at adjacent moments.
Specifically, the motion sensor may include two types of accelerometers and gyroscopes, or may include three types of accelerometers, gyroscopes, and magnetometers. The motion sensor is usually provided in the air mouse carrier device, for example, an accelerometer and a gyroscope are usually arranged in a smart phone; or additionally arranging equipment for realizing the function of the empty mouse carrier. The spatial attitude of the empty rat carrier equipment can be estimated by carrying out fusion calculation on the sensing data detected by the motion sensor. The spatial attitude of the air mouse carrier device is generally represented by a horizontal azimuth angle, a pitch angle and a roll angle. Wherein, the horizontal azimuth specifically refers to the horizontal declination between the pointing direction of the empty rat carrier equipment and the magnetic north pole. The pitch angle refers to an up-down pitch included angle between the empty mouse carrier equipment and the ground plane. The inclination angle refers to a left-right inclination angle between the empty rat carrier equipment and the ground plane.
And 120, correcting the first variable quantity based on the historical latest offset of the horizontal azimuth of the empty rat carrier equipment to obtain a second variable quantity of the corrected horizontal azimuth.
At present, most air mouse carrier devices only use an accelerometer and a gyroscope as data sources for determining the spatial attitude of the air mouse carrier device due to the reasons of hardware cost, large indoor magnetic field interference of a magnetometer and the like. However, the absence of the magnetometer causes the data source to lack the reference data in the direction of the magnetic north pole, so the estimation of the horizontal azimuth angle of the air mouse carrier device may be shifted, and the accumulated shift amount may become larger with time, causing the actual displacement of the cursor to deviate (be smaller than or larger than) the theoretical value, further causing the position of the cursor to be misaligned with the spatial attitude of the air mouse carrier device, which affects the user experience. To solve the problem, in the technical solution of this embodiment, a step of correcting the first variation of the horizontal azimuth based on the historical latest offset of the horizontal azimuth of the empty rat carrier device is added to improve the accuracy of determining the variation of the horizontal azimuth, thereby improving the accuracy of determining the position of the empty rat cursor, improving the consistency between the position of the cursor and the spatial attitude of the empty rat carrier device, realizing accurate remote control of the cursor, and improving user experience,
and step 130, determining the target position of the mouse cursor according to the second variable quantity.
In one embodiment, determining the target position of the mouse cursor according to the second variation comprises: determining the variation of the cursor position of the empty mouse according to the second variation based on the mapping relation between the variation of the space posture of the empty mouse carrier equipment and the variation of the cursor position; and determining the target position according to the variation of the mouse cursor position.
In another embodiment, the target position of the empty mouse cursor can be determined according to the spatial posture of the empty mouse carrier device and the mapping relation between the spatial posture of the empty mouse carrier device and the position of the empty mouse cursor.
In an embodiment in which the target position of the air mouse cursor is determined based on the mapping relationship between the amount of change in the spatial posture of the air mouse carrier device and the amount of change in the cursor position, the target position of the air mouse cursor may be determined specifically by the position of the air mouse cursor at the previous time and the amount of movement of the air mouse cursor in the time period from the previous time to the current time. In an embodiment of determining the target position of the empty mouse cursor based on the mapping relationship between the spatial posture of the empty mouse carrier device and the position of the empty mouse cursor, the mapping relationship between the initial position of the empty mouse carrier device and the preset initial position of the empty mouse cursor may be used to determine the relative position between the spatial posture of the empty mouse carrier device and the initial position at each moment, and further determine the target position of the empty mouse cursor according to the relative position and the preset initial position of the empty mouse cursor, and the relative position between the target position of the empty mouse cursor and the initial position thereof is consistent with the relative position between the spatial posture of the empty mouse carrier device and the initial position thereof.
And 140, controlling the air mouse cursor to move to the target position.
According to the cursor control method provided by the embodiment of the disclosure, after a variation (including a first variation of a horizontal azimuth) of a spatial attitude of an empty mouse carrier device is determined, the first variation is corrected based on a historical latest offset of the horizontal azimuth of the empty mouse carrier device, and a second corrected variation of the horizontal azimuth is obtained; and finally, determining the target position of the air mouse cursor according to the second variable quantity, and controlling the air mouse cursor to move to the target position. The first variable quantity is corrected based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier equipment, so that the determination precision of the space attitude variable quantity of the air mouse carrier equipment can be improved, the determination precision of the target position of an air mouse cursor is further improved, the accurate remote control of the cursor is realized, the consistency between the cursor position and the space attitude of the air mouse carrier equipment is improved, and the use experience of a user is favorably improved.
On the basis of the foregoing embodiment, fig. 2 is a flowchart illustrating a cursor control method according to an embodiment. On the basis of the above embodiment, the present embodiment adds a step of updating the offset of the horizontal azimuth of the air mouse carrier device, so as to solve the problem that the accumulated error of the offset is larger and larger as time is accumulated. The offset condition of the horizontal azimuth angle of the air mouse carrier equipment is estimated and updated in time and fed back to the correlation calculation of cursor target position updating in real time, so that the displacement of the cursor can accurately reflect the change of the space posture of the air mouse carrier equipment, the alignment of the cursor position and the space posture of the air mouse carrier equipment is guaranteed, the accurate remote control of the air mouse cursor is realized, and the use experience of an air mouse user under the condition of no magnetometer calibration can be improved.
As shown in fig. 2, the cursor control method includes the following steps:
and 210, determining the variation of the space attitude of the empty mouse carrier equipment, wherein the variation comprises a first variation of a horizontal azimuth angle.
And step 220, determining whether the empty mouse carrier equipment is in a standing state.
In one embodiment, the determining whether the empty rat carrier device is in a resting state comprises: determining whether the empty rat carrier device is in a static state based on sensing data of a motion sensor associated with the empty rat carrier device. Specifically, for example, the motion sensor includes an accelerometer, and if the data read by the accelerometer at the current time is 0, it may be determined that the empty and mouse carrier device at the current time is in a stationary state, that is, the empty and mouse carrier device is not moved or rotated, otherwise, it is determined that the empty and mouse carrier device at the current time is in a non-stationary state. Or, whether the empty rat carrier device is in a standing state or not can be determined by using the data of the gyroscope sensor read at two adjacent moments. In a general way, by monitoring the sensing data of the motion sensor (the accelerometer and the gyroscope), whether the air mouse carrier device is in a standing state at the current moment can be judged based on the amplitude, fluctuation and the like of the sensing data.
Step 230, if the empty rat carrier device is in a static state, determining a current offset of the horizontal azimuth, and updating a historical offset of the horizontal azimuth based on the current offset to obtain a historical latest offset of the horizontal azimuth.
Because the attitude angle of the empty mouse carrier device changes due to the change of the spatial attitude in the using process of the empty mouse carrier device, the offset of the horizontal azimuth angle of the empty mouse carrier device is inconvenient to estimate in the moving process of the empty mouse carrier device, or the offset of the horizontal azimuth angle of the empty mouse carrier device is estimated in the moving process of the empty mouse carrier device, so that the problems of large calculation amount, high calculation complexity or low precision exist. In view of the above problems, in this embodiment, the interaction gap between the user and the empty mouse carrier device is used as the timing for estimating and updating the horizontal azimuth offset, that is, the offset of the horizontal azimuth of the empty mouse carrier device is obtained when the empty mouse carrier device is in a static state, the historical offset is updated by using the offset, and the offset is used as the historical latest offset to participate in the subsequent step of correcting the first offset of the horizontal azimuth, so that the correction accuracy can be improved, and further, the remote control accuracy of the empty mouse cursor can be improved.
If the empty mouse carrier equipment is in a standing state, the spatial attitude angle of the empty mouse carrier equipment is theoretically kept unchanged, and the variable quantity of the horizontal azimuth angle of the empty mouse carrier equipment determined based on two adjacent frames of sensing data is the offset of the horizontal azimuth angle. Further, the offset of the air mouse carrier device at continuous time can be averaged during the standing state as the current offset of the horizontal azimuth.
Specifically, in an embodiment, the determining the current offset of the horizontal azimuth includes: determining a reference variation amount of the horizontal azimuth based on two adjacent frames of sensing data of a motion sensor associated with the empty rat carrier device; and determining the current offset according to the reference variable quantity. The determining the current offset according to the reference variation includes: determining the reference variation as the current offset; or, determining an average value of the reference variation in a time period in which the empty rat carrier apparatus is in a stationary state as the current offset. The current offset is determined based on the average value of the offsets determined by the two adjacent frames of sensing data in the time period when the empty rat carrier device is in the standing state, or in other words, the average value of the variation of the horizontal azimuth angle between two adjacent moments in the time period when the empty rat carrier device is in the standing state is determined as the current offset, so that the determination accuracy of the current offset can be further improved.
The historical offset of the horizontal azimuth is updated based on the current offset, specifically, the current offset is used to replace the historical offset, that is, the current offset becomes the historical offset, and the last updated historical offset is the latest historical offset.
And 240, correcting the first variable quantity based on the historical latest offset of the horizontal azimuth of the empty rat carrier equipment to obtain a second variable quantity of the corrected horizontal azimuth.
Specifically, in an embodiment, the correcting the first variation based on the historical latest offset of the horizontal azimuth of the empty rat carrier device includes: determining a difference between the first variance and the historical latest offset; determining the difference as a second variation of the corrected horizontal azimuth.
And step 250, determining the target position of the mouse cursor according to the second variable quantity.
And step 260, controlling the air mouse cursor to move to the target position.
In the technical solution of this embodiment, on the basis of the above embodiment, a step of updating the offset of the horizontal azimuth of the air mouse carrier device is added to solve the problem that the accumulated error of the offset is larger and larger as time accumulates. The offset condition of the horizontal azimuth angle of the air mouse carrier equipment is estimated and updated in time and fed back to the correlation calculation of cursor target position updating in real time, so that the displacement of the cursor can accurately reflect the change of the space posture of the air mouse carrier equipment, the alignment of the cursor position and the space posture of the air mouse carrier equipment is guaranteed, the accurate remote control of the air mouse cursor is realized, and the use experience of an air mouse user under the condition of no magnetometer calibration can be improved.
On the basis of the foregoing embodiment, fig. 3 is a schematic flowchart of a cursor control method in an implementation manner, which specifically includes: the method comprises the steps of reading sensing data of a motion sensor (an accelerometer and a gyroscope) related to the empty and mouse carrier equipment, determining the variable quantity of the space attitude of the empty and mouse carrier equipment based on the sensing data, correcting the variable quantity by utilizing the historical latest offset of a horizontal azimuth, and determining and updating the target position of a cursor based on the corrected variable quantity. After the sensing data of the motion sensor associated with the empty mouse carrier device is read, whether the empty mouse carrier device is in a standing state or not is judged, and if the empty mouse carrier device is in the standing state, estimation and updating operations of horizontal azimuth offset are carried out to obtain historical latest offset. And updating the offset of the horizontal azimuth in time when the empty rat carrier equipment is monitored to be in a standing state. And if the equipment is in a motion state, not performing the updating operation of the horizontal azimuth offset.
In this embodiment, the interactive gap between the user and the empty mouse carrier device is used as the timing for estimating and updating the horizontal azimuth offset, that is, the offset of the horizontal azimuth of the empty mouse carrier device is obtained when the empty mouse carrier device is in a static state, the historical offset is updated by using the offset, and the offset is used as the historical latest offset to participate in the subsequent step of correcting the first offset of the horizontal azimuth, so that the correction accuracy can be improved, and further the remote control accuracy of the empty mouse cursor can be improved.
Fig. 4 is a schematic structural diagram of a cursor control device in the embodiment of the present disclosure. As shown in fig. 4, the cursor control device specifically includes: a first determination module 410, a correction module 420, a second determination module 430, and a control module 440.
The first determining module 410 is configured to determine a variation of the spatial attitude of the empty rat carrier device, where the variation includes a first variation of a horizontal azimuth; a correction module 420, configured to correct the first variation based on a historical latest offset of the horizontal azimuth of the empty rat carrier device, and obtain a second variation of the corrected horizontal azimuth; a second determining module 430, configured to determine a target position of the mouse cursor according to the second variation; and the control module 440 is configured to control the empty mouse cursor to move to the target position.
Optionally, the cursor control device further includes:
the judging module is used for determining whether the empty mouse carrier equipment is in a standing state or not; a third determining module, configured to determine a current offset of the horizontal azimuth if the empty rat carrier device is in a stationary state; an update module to update a historical offset of the horizontal azimuth based on the current offset.
Optionally, the determining module is specifically configured to: determining whether the empty rat carrier device is in a static state based on sensing data of a motion sensor associated with the empty rat carrier device.
Optionally, the third determining module specifically includes:
a first determination unit configured to determine a reference variation amount of the horizontal azimuth based on two adjacent frames of sensing data of a motion sensor associated with the empty rat carrier device; and the second determining unit is used for determining the current offset according to the reference variation.
Optionally, the second determining unit is specifically configured to: determining the reference variation as the current offset; or, determining an average value of the reference variation in a time period in which the empty rat carrier apparatus is in a stationary state as the current offset.
Optionally, the correction module 420 includes:
a first determination unit configured to determine a difference between the first variation and the historical latest offset; a second determination unit configured to determine the difference as a second variation of the corrected horizontal azimuth.
Optionally, the second determining module 430 includes: the first determining unit is used for determining the variation of the cursor position of the empty mouse according to the second variation based on the mapping relation between the variation of the space posture of the empty mouse carrier device and the variation of the cursor position; and the second determining unit is used for determining the target position according to the variation of the mouse cursor position.
After determining a variation (the variation includes a first variation of a horizontal azimuth) of a spatial attitude of an empty mouse carrier device, correcting the first variation based on a historical latest offset of the horizontal azimuth of the empty mouse carrier device, and obtaining a second variation of the horizontal azimuth after correction; and finally, determining the target position of the air mouse cursor according to the second variable quantity, and controlling the air mouse cursor to move to the target position. The first variable quantity is corrected based on the historical latest offset of the horizontal azimuth angle of the air mouse carrier equipment, so that the determination precision of the space attitude variable quantity of the air mouse carrier equipment can be improved, the determination precision of the target position of an air mouse cursor is further improved, the accurate remote control of the cursor is realized, the consistency between the cursor position and the space attitude of the air mouse carrier equipment is improved, and the use experience of a user is favorably improved.
The cursor control device provided in the embodiments of the present disclosure may perform the steps in the cursor control method provided in the embodiments of the present disclosure, and the steps and the beneficial effects are not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the present disclosure. Referring now specifically to fig. 5, a schematic diagram of an electronic device 500 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device 500 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet), a PMP (portable multimedia player), a vehicle-mounted terminal (e.g., a car navigation terminal), a wearable electronic device, and the like, and fixed terminals such as a digital TV, a desktop computer, a smart home device, and the like. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, electronic device 500 may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes to implement the methods of embodiments as described in this disclosure in accordance with a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart, thereby implementing the method as described above. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 501.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
determining the variation of the space attitude of the empty mouse carrier equipment, wherein the variation comprises a first variation of a horizontal azimuth angle; correcting the first variable quantity based on the historical latest offset of the horizontal azimuth of the empty rat carrier equipment to obtain a second variable quantity of the corrected horizontal azimuth; determining the target position of the mouse cursor according to the second variable quantity; and controlling the air mouse cursor to move to the target position.
Optionally, when the one or more programs are executed by the electronic device, the electronic device may further perform other steps described in the above embodiments.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a cursor control method including: determining the variation of the space attitude of the empty mouse carrier equipment, wherein the variation comprises a first variation of a horizontal azimuth angle; correcting the first variable quantity based on the historical latest offset of the horizontal azimuth of the empty rat carrier equipment to obtain a second variable quantity of the corrected horizontal azimuth; determining the target position of the mouse cursor according to the second variable quantity; and controlling the air mouse cursor to move to the target position.
According to one or more embodiments of the present disclosure, in the cursor control method provided by the present disclosure, optionally, the method further includes: determining whether the empty rat carrier device is in a standing state; and if the empty mouse carrier equipment is in a standing state, determining the current offset of the horizontal azimuth angle, and updating the historical offset of the horizontal azimuth angle based on the current offset.
According to one or more embodiments of the present disclosure, in the cursor control method provided by the present disclosure, optionally, the determining whether the empty rat carrier device is in a stationary state includes: determining whether the empty rat carrier device is in a static state based on sensing data of a motion sensor associated with the empty rat carrier device.
According to one or more embodiments of the present disclosure, in the cursor control method provided by the present disclosure, optionally, the determining the current offset of the horizontal azimuth includes: determining a reference variation amount of the horizontal azimuth based on two adjacent frames of sensing data of a motion sensor associated with the empty rat carrier device; and determining the current offset according to the reference variable quantity.
According to one or more embodiments of the present disclosure, in the cursor control method provided by the present disclosure, optionally, the determining the current offset according to the reference variation includes: determining the reference variation as the current offset; or, determining an average value of the reference variation in a time period in which the empty rat carrier apparatus is in a stationary state as the current offset.
According to one or more embodiments of the present disclosure, in the cursor control method provided by the present disclosure, optionally, the correcting the first variation based on the historical latest offset of the horizontal azimuth of the empty rat carrier device includes: determining a difference between the first variance and the historical latest offset; determining the difference as a second variation of the corrected horizontal azimuth.
According to one or more embodiments of the present disclosure, in the cursor control method provided by the present disclosure, optionally, the determining the target position of the mouse cursor according to the second variation includes: determining the variation of the cursor position of the empty mouse according to the second variation based on the mapping relation between the variation of the space posture of the empty mouse carrier equipment and the variation of the cursor position; and determining the target position according to the variation of the mouse cursor position.
According to one or more embodiments of the present disclosure, there is provided a cursor control device including: the first determination module is used for determining the variation of the space attitude of the empty mouse carrier equipment, wherein the variation comprises a first variation of a horizontal azimuth angle; the correction module is used for correcting the first variable quantity based on the historical latest offset of the horizontal azimuth of the empty mouse carrier equipment to obtain a second variable quantity of the corrected horizontal azimuth; the second determining module is used for determining the target position of the mouse cursor according to the second variable quantity; and the control module is used for controlling the air mouse cursor to move to the target position.
According to one or more embodiments of the present disclosure, in the cursor control device provided by the present disclosure, optionally, the cursor control device further includes: the judging module is used for determining whether the empty mouse carrier equipment is in a standing state or not; a third determining module, configured to determine a current offset of the horizontal azimuth if the empty rat carrier device is in a stationary state; an update module to update a historical offset of the horizontal azimuth based on the current offset.
According to one or more embodiments of the present disclosure, in the cursor control device provided by the present disclosure, optionally, the determining module is specifically configured to: determining whether the empty rat carrier device is in a static state based on sensing data of a motion sensor associated with the empty rat carrier device.
According to one or more embodiments of the present disclosure, in the cursor control device provided by the present disclosure, optionally, the third determining module specifically includes: a first determination unit configured to determine a reference variation amount of the horizontal azimuth based on two adjacent frames of sensing data of a motion sensor associated with the empty rat carrier device; and the second determining unit is used for determining the current offset according to the reference variation.
According to one or more embodiments of the present disclosure, in the cursor control device provided by the present disclosure, optionally, the second determining unit is specifically configured to: determining the reference variation as the current offset; or, determining an average value of the reference variation in a time period in which the empty rat carrier apparatus is in a stationary state as the current offset.
In accordance with one or more embodiments of the present disclosure, in the cursor control device provided by the present disclosure, optionally, the correction module includes: a first determination unit configured to determine a difference between the first variation and the historical latest offset; a second determination unit configured to determine the difference as a second variation of the corrected horizontal azimuth.
In accordance with one or more embodiments of the present disclosure, in the cursor control device provided by the present disclosure, optionally, the second determining module includes: the first determining unit is used for determining the variation of the cursor position of the empty mouse according to the second variation based on the mapping relation between the variation of the space posture of the empty mouse carrier device and the variation of the cursor position; and the second determining unit is used for determining the target position according to the variation of the mouse cursor position.
In accordance with one or more embodiments of the present disclosure, there is provided an electronic device including:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement any of the cursor control methods provided by the present disclosure.
According to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a cursor control method as any one of the methods provided by the present disclosure.
Embodiments of the present disclosure also provide a computer program product comprising a computer program or instructions which, when executed by a processor, implement the cursor control method as described above.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A cursor control method, the method comprising:
determining the variation of the space attitude of the empty mouse carrier equipment, wherein the variation comprises a first variation of a horizontal azimuth angle;
correcting the first variable quantity based on the historical latest offset of the horizontal azimuth of the empty rat carrier equipment to obtain a second variable quantity of the corrected horizontal azimuth;
determining the target position of the mouse cursor according to the second variable quantity;
and controlling the air mouse cursor to move to the target position.
2. The method of claim 1, further comprising:
determining whether the empty rat carrier device is in a standing state;
and if the empty mouse carrier equipment is in a standing state, determining the current offset of the horizontal azimuth angle, and updating the historical offset of the horizontal azimuth angle based on the current offset.
3. The method of claim 2, wherein said determining whether said empty rat carrier device is in a resting state comprises:
determining whether the empty rat carrier device is in a static state based on sensing data of a motion sensor associated with the empty rat carrier device.
4. The method of claim 2, wherein determining the current offset of the horizontal azimuth comprises:
determining a reference variation amount of the horizontal azimuth based on two adjacent frames of sensing data of a motion sensor associated with the empty rat carrier device;
and determining the current offset according to the reference variable quantity.
5. The method of claim 4, wherein determining the current offset according to the reference variation comprises:
determining the reference variation as the current offset;
or, determining an average value of the reference variation in a time period in which the empty rat carrier apparatus is in a stationary state as the current offset.
6. The method according to any one of claims 1 to 5, wherein the correcting the first variation based on the historical latest offset of the horizontal azimuth of the empty rat carrier device comprises:
determining a difference between the first variance and the historical latest offset;
determining the difference as a second variation of the corrected horizontal azimuth.
7. The method according to any one of claims 1-5, wherein the determining the target position of the mouse cursor according to the second variation comprises:
determining the variation of the cursor position of the empty mouse according to the second variation based on the mapping relation between the variation of the space posture of the empty mouse carrier equipment and the variation of the cursor position;
and determining the target position according to the variation of the mouse cursor position.
8. A cursor control device, comprising:
the first determination module is used for determining the variation of the space attitude of the empty mouse carrier equipment, wherein the variation comprises a first variation of a horizontal azimuth angle;
the correction module is used for correcting the first variable quantity based on the historical latest offset of the horizontal azimuth of the empty mouse carrier equipment to obtain a second variable quantity of the corrected horizontal azimuth;
the second determining module is used for determining the target position of the mouse cursor according to the second variable quantity;
and the control module is used for controlling the air mouse cursor to move to the target position.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202110718453.8A 2021-06-28 2021-06-28 Cursor control method and device, electronic equipment and storage medium Active CN113407045B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110718453.8A CN113407045B (en) 2021-06-28 2021-06-28 Cursor control method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110718453.8A CN113407045B (en) 2021-06-28 2021-06-28 Cursor control method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113407045A true CN113407045A (en) 2021-09-17
CN113407045B CN113407045B (en) 2023-08-22

Family

ID=77679697

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110718453.8A Active CN113407045B (en) 2021-06-28 2021-06-28 Cursor control method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113407045B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115536A (en) * 2021-11-22 2022-03-01 北京字节跳动网络技术有限公司 Interaction method, interaction device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102411437A (en) * 2010-09-21 2012-04-11 申金坡 Method and device for carrying out compensation on dip angle of mouse after rotating around Z shaft
CN102495687A (en) * 2011-12-27 2012-06-13 深圳Tcl新技术有限公司 Method, video terminal and system for realizing simple air mouse
CN104598050A (en) * 2013-10-31 2015-05-06 深圳市启望科文技术有限公司 Motion sensing air mouse aligning method and device
CN105487685A (en) * 2015-11-20 2016-04-13 小米科技有限责任公司 Optimization method and apparatus for air mouse remote controller and terminal device
CN107229353A (en) * 2017-05-09 2017-10-03 歌尔科技有限公司 The displacement acquisition methods and device of sky mouse
CN111078029A (en) * 2019-12-05 2020-04-28 广州视源电子科技股份有限公司 Air mouse information determination method, device, equipment and storage medium
CN111831136A (en) * 2019-03-26 2020-10-27 深圳Tcl新技术有限公司 Bluetooth air mouse moving method, storage medium and smart television

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102411437A (en) * 2010-09-21 2012-04-11 申金坡 Method and device for carrying out compensation on dip angle of mouse after rotating around Z shaft
CN102495687A (en) * 2011-12-27 2012-06-13 深圳Tcl新技术有限公司 Method, video terminal and system for realizing simple air mouse
CN104598050A (en) * 2013-10-31 2015-05-06 深圳市启望科文技术有限公司 Motion sensing air mouse aligning method and device
CN105487685A (en) * 2015-11-20 2016-04-13 小米科技有限责任公司 Optimization method and apparatus for air mouse remote controller and terminal device
CN107229353A (en) * 2017-05-09 2017-10-03 歌尔科技有限公司 The displacement acquisition methods and device of sky mouse
CN111831136A (en) * 2019-03-26 2020-10-27 深圳Tcl新技术有限公司 Bluetooth air mouse moving method, storage medium and smart television
CN111078029A (en) * 2019-12-05 2020-04-28 广州视源电子科技股份有限公司 Air mouse information determination method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115536A (en) * 2021-11-22 2022-03-01 北京字节跳动网络技术有限公司 Interaction method, interaction device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113407045B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
JP2017146749A (en) Control program, control method, and computer
WO2021088498A1 (en) Virtual object display method and electronic device
CN112643665B (en) Calibration method and device for installation error of absolute pose sensor
CN113031783B (en) Motion trajectory updating method, head-mounted display device and computer readable medium
CN116079697A (en) Monocular vision servo method, device, equipment and medium based on image
CN111382701B (en) Motion capture method, motion capture device, electronic equipment and computer readable storage medium
CN113407045B (en) Cursor control method and device, electronic equipment and storage medium
CN113766293B (en) Information display method, device, terminal and storage medium
CN112590929B (en) Correction method, apparatus, electronic device, and medium for steering wheel of autonomous vehicle
CN112489224A (en) Image drawing method and device, readable medium and electronic equipment
CN117191080A (en) Calibration method, device, equipment and storage medium for camera and IMU external parameters
US11543485B2 (en) Determining location or orientation based on environment information
CN113741750B (en) Cursor position updating method and device and electronic equipment
CN115937046A (en) Road ground information generation method, device, equipment and computer readable medium
CN112597174B (en) Map updating method and device, electronic equipment and computer readable medium
CN113672137B (en) Cursor position updating method and device and electronic equipment
CN114529452A (en) Method and device for displaying image and electronic equipment
CN114332224A (en) Method, device and equipment for generating 3D target detection sample and storage medium
CN113515201B (en) Cursor position updating method and device and electronic equipment
CN116022159B (en) Vehicle movement control method, apparatus, electronic device, and computer-readable medium
US20230418072A1 (en) Positioning method, apparatus, electronic device, head-mounted display device, and storage medium
CN114563018B (en) Method and apparatus for calibrating head mounted display device
CN115817163B (en) Method, apparatus, electronic device and computer readable medium for adjusting wheel speed of vehicle
CN113741749B (en) Cursor position updating method and device and electronic equipment
CN115409875A (en) Image processing method and device and electronic device

Legal Events

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