CN109375789B - Gravity sensor multiplexing method, mobile terminal and computer readable storage medium - Google Patents

Gravity sensor multiplexing method, mobile terminal and computer readable storage medium Download PDF

Info

Publication number
CN109375789B
CN109375789B CN201811273745.XA CN201811273745A CN109375789B CN 109375789 B CN109375789 B CN 109375789B CN 201811273745 A CN201811273745 A CN 201811273745A CN 109375789 B CN109375789 B CN 109375789B
Authority
CN
China
Prior art keywords
gravity
gravity data
screen
event
sensor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811273745.XA
Other languages
Chinese (zh)
Other versions
CN109375789A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201811273745.XA priority Critical patent/CN109375789B/en
Publication of CN109375789A publication Critical patent/CN109375789A/en
Application granted granted Critical
Publication of CN109375789B publication Critical patent/CN109375789B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1423Digital output to display device ; Cooperation and interconnection of the display device with other functional units controlling a plurality of local displays, e.g. CRT and flat panel display

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a gravity sensor multiplexing method, a mobile terminal and a computer readable storage medium, wherein the gravity sensor multiplexing method comprises the following steps: when the first screen is in a working state, detecting whether a turnover event exists according to gravity data reported by a gravity sensor; if a rollover event exists, determining the type of the rollover event; and determining a gravity data modification strategy based on the type of the overturning event, and modifying the gravity data reported from the current moment lifting force sensor based on the gravity data modification strategy to obtain modified gravity data. The invention realizes that the control action of the external force on the double-sided screen mobile terminal is detected when the first screen is taken as a main control screen and the control action of the external force on the current double-sided screen mobile terminal is detected when the second screen is taken as the main control screen.

Description

Gravity sensor multiplexing method, mobile terminal and computer readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a gravity sensor multiplexing method, a mobile terminal, and a computer readable storage medium.
Background
With the development of electronic technology, users have increasingly demanded a dual-screen mobile terminal such as a smart phone, a tablet computer, and the like, and a dual-screen mobile terminal, that is, a dual-screen mobile terminal having display screens on the front and back surfaces thereof, has been developed.
For a dual-screen mobile terminal, gravity data is acquired through a gravity sensor, and the gravity data is position information of the dual-screen mobile terminal in space and is generally expressed by (x, y, z), wherein an x axis and a y axis are configured on a horizontal plane, and a z axis is perpendicular to the horizontal plane.
When the user uses the screen 1, the data reported by the gravity sensor can accurately represent the position of the mobile terminal 1 in space when the user uses the screen 1, and when the user uses the screen 2, the data reported by the gravity sensor cannot accurately represent the position of the mobile terminal 2 in space when the screen 2 is turned (horizontally or vertically) compared with the screen 1 when the user uses the screen 2.
Disclosure of Invention
The invention mainly aims to provide a gravity sensor multiplexing method, a mobile terminal and a computer readable storage medium, and aims to solve the technical problem that only one gravity sensor can detect the spatial position of a double-sided screen mobile terminal when a specific surface is used in the prior art.
In order to achieve the above object, the present invention provides a gravity sensor multiplexing method, including:
when the first screen is in a working state, detecting whether a turnover event exists according to gravity data reported by a gravity sensor;
if a rollover event exists, determining the type of the rollover event;
and determining a gravity data modification strategy based on the type of the overturning event, and modifying the gravity data reported from the current moment lifting force sensor based on the gravity data modification strategy to obtain modified gravity data.
Optionally, after the step of detecting whether the overturning event exists according to the gravity data reported by the gravity sensor when the first screen is in the working state, the method further includes:
if a turnover event exists, detecting whether a screen switching function is started or not;
and if the screen switching function is started, enabling the second screen and closing the first screen.
Optionally, the step of detecting whether a rollover event exists according to the gravity data reported by the gravity sensor includes:
detecting whether target gravity data with absolute value of coordinate values on a first target axis smaller than a preset threshold exists in gravity data reported by a gravity sensor;
If the target gravity data exists in the gravity data reported by the gravity sensor, a turnover event exists.
Optionally, if there is a rollover event, the step of determining the type of rollover event includes:
acquiring historical data adjacent to the target gravity data in time in the gravity data reported by the gravity sensor;
determining a reference axis in which the data in the target gravity data and the historical data are unchanged;
if the reference axis is a second target axis, determining that the type of the rollover event is horizontal rollover;
if the reference axis is a third target axis, the type of rollover event is determined to be a vertical rollover.
Optionally, the step of determining a gravity data modification policy based on the type of the rollover event, and modifying gravity data reported from the current moment gravity sensor based on the gravity data modification policy to obtain modified gravity data includes:
and when the type of the overturning event is horizontal overturning, taking the negative sign of the values of the gravity data reported by the lifting force sensor at the current moment on the first target axis and the third target axis to obtain modified gravity data.
Optionally, the step of determining a gravity data modification policy based on the type of the rollover event, and modifying gravity data reported from the current moment gravity sensor based on the gravity data modification policy, so as to obtain modified gravity data further includes:
and when the type of the overturning event is vertical overturning, taking a negative sign on the values of the gravity data reported by the lifting force sensor at the current moment on the first target axis and the second target axis to obtain modified gravity data.
Optionally, after the step of obtaining the modified gravity data, the method further includes:
and sending the modified gravity data to an application which is currently in an operation state and depends on a gravity sensor.
In addition, to achieve the above object, the present invention also provides a mobile terminal including: the gravity sensor multiplexing device comprises a memory, a processor and a gravity sensor multiplexing program which is stored in the memory and can run on the processor, wherein the gravity sensor multiplexing program realizes the steps of the gravity sensor multiplexing method when being executed by the processor.
In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a gravity sensor multiplexing program which, when executed by a processor, implements the steps of the gravity sensor multiplexing method as described above.
According to the invention, when the first screen is in a working state, whether a turnover event exists is detected according to gravity data reported by the gravity sensor; if a rollover event exists, determining the type of the rollover event; and determining a gravity data modification strategy based on the type of the overturning event, and modifying the gravity data reported from the current moment lifting force sensor based on the gravity data modification strategy to obtain modified gravity data. According to the invention, when the mobile terminal is overturned (the main control screen is changed from the first screen to the second screen), the gravity data reported by the subsequent gravity sensor is modified according to the overturned type, so that the modified gravity data can represent the spatial position of the current mobile terminal (the mobile terminal taking the second screen as the main control screen). The method comprises the steps of detecting the spatial position change of the double-sided screen mobile terminal when a first screen is used as a main control screen through a gravity sensor, namely detecting the control action of external force on the double-sided screen mobile terminal, and detecting the spatial position change of the current double-sided screen mobile terminal when a second screen is used as the main control screen, namely detecting the control action of external force on the current double-sided screen mobile terminal.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention;
fig. 2 is a schematic diagram of a communication network system according to an embodiment of the present invention;
fig. 3a to 3d are schematic diagrams of actual measurement coordinates of a gravity sensor when a dual-screen mobile terminal is in a four-position state in the prior art;
FIG. 4 is a flow chart of a first embodiment of a gravity sensor multiplexing method according to the present invention;
fig. 5 is a schematic diagram of coordinate axis distribution in an embodiment of a gravity sensor multiplexing method according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present invention, and have no specific meaning per se. Thus, "module," "component," or "unit" may be used in combination.
In the embodiment of the invention, the gravity sensor multiplexing method is applied to the mobile terminal, and the terminal can be implemented in various forms. For example, the mobile terminal according to the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palm computer, a personal digital assistant (Personal Digital Assistant, PDA), or the like.
The following description will be given taking a tablet computer as an example, and those skilled in the art will understand that the configuration according to the embodiment of the present invention can be applied to other types of mobile terminals, in addition to elements particularly used for the purpose of movement.
Referring to fig. 1, fig. 1 is a schematic hardware structure of a mobile terminal implementing various embodiments of the present invention, where the terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an a/V (audio/video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not limiting of the mobile terminal and that the mobile terminal may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The following describes the components of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be used for receiving and transmitting signals during the information receiving or communication process, specifically, after receiving downlink information of the base station, processing the downlink information by the processor 110; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, global System for Mobile communications), GPRS (General Packet Radio Service ), CDMA2000 (Code Division Multiple Access, CDMA 2000), WCDMA (Wideband Code Division Multiple Access ), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, time Division synchronous code Division multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency Division Duplex Long term evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution, time Division Duplex Long term evolution), etc.
WiFi belongs to a short-distance wireless transmission technology, and a mobile terminal can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 102, so that wireless broadband Internet access is provided for the user. Although fig. 1 shows a WiFi module 102, it is understood that it does not belong to the necessary constitution of a mobile terminal, and can be omitted entirely as required within a range that does not change the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the terminal 100. The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive an audio or video signal. The a/V input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, the graphics processor 1041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound into audio data. The processed audio (voice) data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting the audio signal.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and/or the backlight when the mobile terminal 100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the terminal gesture (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; as for other sensors such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured for the terminal, the detailed description thereof will be omitted.
The display unit 106 is used to display information input by a user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the terminal. In particular, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1071 or thereabout by using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 110, and can receive and execute commands sent from the processor 110. Further, the touch panel 1071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 107 may include other input devices 1072 in addition to the touch panel 1071. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc., as specifically not limited herein.
Further, the touch panel 1071 may overlay the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or thereabout, the touch panel 1071 is transferred to the processor 110 to determine the type of touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in fig. 1, the touch panel 1071 and the display panel 1061 are two independent components for implementing the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 may be integrated with the display panel 1061 to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 108 serves as an interface through which at least one external device can be connected with the mobile terminal 100. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.
Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the home page display terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power source 111 (e.g., a battery) for supplying power to the respective components, and preferably, the power source 111 may be logically connected to the processor 110 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described herein.
As shown in fig. 1, the memory 109, which is a computer storage medium, may include an operating system, a network communication module, a user interface module, and a gravity sensor multiplexing program, and the processor 110 may be configured to call the gravity sensor multiplexing program stored in the memory 109 and perform the steps of:
when the first screen is in a working state, detecting whether a turnover event exists according to gravity data reported by a gravity sensor;
if a rollover event exists, determining the type of the rollover event;
and determining a gravity data modification strategy based on the type of the overturning event, and modifying the gravity data reported from the current moment lifting force sensor based on the gravity data modification strategy to obtain modified gravity data.
Further, the processor 110 may be configured to invoke the gravity sensor multiplexing program stored in the memory 109, and further perform the following steps:
If a turnover event exists, detecting whether a screen switching function is started or not;
and if the screen switching function is started, enabling the second screen and closing the first screen.
Further, the processor 110 may be configured to invoke the gravity sensor multiplexing program stored in the memory 109, and further perform the following steps:
detecting whether target gravity data with absolute value of coordinate values on a first target axis smaller than a preset threshold exists in gravity data reported by a gravity sensor;
if the target gravity data exists in the gravity data reported by the gravity sensor, a turnover event exists.
Further, the processor 110 may be configured to invoke the gravity sensor multiplexing program stored in the memory 109, and further perform the following steps:
acquiring historical data adjacent to the target gravity data in time in the gravity data reported by the gravity sensor;
determining a reference axis in which the data in the target gravity data and the historical data are unchanged;
if the reference axis is a second target axis, determining that the type of the rollover event is horizontal rollover;
if the reference axis is a third target axis, the type of rollover event is determined to be a vertical rollover.
Further, the processor 110 may be configured to invoke the gravity sensor multiplexing program stored in the memory 109, and further perform the following steps:
And when the type of the overturning event is horizontal overturning, taking the negative sign of the values of the gravity data reported by the lifting force sensor at the current moment on the first target axis and the third target axis to obtain modified gravity data.
Further, the processor 110 may be configured to invoke the gravity sensor multiplexing program stored in the memory 109, and further perform the following steps:
and when the type of the overturning event is vertical overturning, taking a negative sign on the values of the gravity data reported by the lifting force sensor at the current moment on the first target axis and the second target axis to obtain modified gravity data.
Further, the processor 110 may be configured to invoke the gravity sensor multiplexing program stored in the memory 109, and further perform the following steps:
and sending the modified gravity data to an application which is currently in an operation state and depends on a gravity sensor.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based will be described below.
Referring to fig. 2, fig. 2 is a schematic diagram of a communication network system according to an embodiment of the present invention, where the communication network system is an LTE system of a general mobile communication technology, and the LTE system includes a UE (User Equipment) 201, an e-UTRAN (Evolved UMTS Terrestrial Radio Access Network ) 202, an epc (Evolved Packet Core, evolved packet core) 203, and an IP service 204 of an operator that are sequentially connected in communication.
Specifically, the UE201 may be the terminal 100 described above, and will not be described herein.
The E-UTRAN202 includes eNodeB2021 and other eNodeB2022, etc. The eNodeB2021 may be connected with other eNodeB2022 by a backhaul (e.g., an X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide access from the UE201 to the EPC 203.
EPC203 may include MME (Mobility Management Entity ) 2031, hss (Home Subscriber Server, home subscriber server) 2032, other MMEs 2033, SGW (Serving Gate Way) 2034, pgw (PDN Gate Way) 2035 and PCRF (Policy and Charging Rules Function, policy and tariff function entity) 2036, and so on. The MME2031 is a control node that handles signaling between the UE201 and EPC203, providing bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location registers (not shown) and to hold user specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034 and PGW2035 may provide IP address allocation and other functions for UE201, PCRF2036 is a policy and charging control policy decision point for traffic data flows and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem ), or other IP services, etc.
Although the LTE system is described above as an example, it should be understood by those skilled in the art that the present invention is not limited to LTE systems, but may be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and the communication network system, various embodiments of the method of the present invention are provided.
As shown in fig. 3a to 3d, fig. 3a to 3d are schematic diagrams of actual measurement coordinates of a gravity sensor when a dual-screen mobile terminal is in a four-position state in the prior art.
As shown in fig. 3a, the dual-screen mobile terminal is in position state 1: horizontally placing and facing upwards, wherein black points in the figure represent the positions of the double-sided screen mobile terminal, and the actual measurement values of the gravity sensors are (0, 0 and 10); as shown in fig. 3b, the dual-screen mobile terminal is in position state 2: the gravity sensor is placed laterally and vertically, the front face faces to the right, black points in the diagram represent the positions of the double-sided screen mobile terminals, and the actual measurement value of the gravity sensor is (-10,0,0); as shown in fig. 3c, the dual-screen mobile terminal is in position state 3: the gravity sensor is placed laterally and vertically, the front face faces to the left, black points in the figure represent the positions of the double-sided screen mobile terminals, and the actual measurement value of the gravity sensor is 10,0,0; as shown in fig. 3d, the dual-screen mobile terminal is in position state 4: the double-sided screen mobile terminal is horizontally placed, the front face is downward, black points in the figure represent the positions of the double-sided screen mobile terminal, and at the moment, the actual measurement value of the gravity sensor is (0, -10).
For a double-sided screen mobile terminal, the double-sided screen mobile terminal comprises a first screen and a second screen, if only one gravity sensor exists in the double-sided screen mobile terminal, when the double-sided screen mobile terminal is horizontally placed and the first screen faces upwards, gravity data detected by the gravity sensor are (0, 10); when the double-sided screen mobile terminal is placed laterally and vertically, and the first screen faces right, gravity data detected by the gravity sensor is (-10,0,0), when the double-sided screen mobile terminal is placed laterally and vertically, and the first screen faces left, gravity data detected by the gravity sensor is (10,0,0), and when the double-sided screen mobile terminal is placed horizontally, and the first screen faces down, gravity data detected by the gravity sensor is (0, -10).
When the user uses the first screen as the main screen, the first screen is controlled to change from a state of being horizontally upwards to a state of being vertically upwards, at the moment, gravity data detected by the gravity sensor are changed to be (0, 10) to (-10,0,0), at the moment, the application depending on the gravity data in the double-sided screen mobile terminal can determine an operation action 1 of the user (for example, the double-sided screen mobile terminal is held flat and then turned right by 90 degrees) according to the change of the gravity data, and thus the operation action 1 is responded. For example, the application is a racing game, and if the gravity data changes to (0, 10) to (-10,0,0) are detected, it is explained that the user performs operation 1, and the racing is controlled to the right.
When the user uses the second screen as the main screen and runs the racing game on the second screen, if the user wants to control the racing car to the right, operation 1 needs to be performed, that is, the second screen is controlled to be changed from the state of being horizontally upwards to the state of being vertically upwards. That is, when the gravity data detected by the gravity sensor changes to (0, -10) to (10,0,0) corresponding to the first screen changing from the horizontal downward state to the vertical leftward state, the racing application cannot be determined that the user has performed the operation action 1 according to the gravity data change at this time, and the racing application cannot be controlled to the right, that is, the racing application cannot be normally used on the second screen.
In view of the foregoing problems with the prior art, various embodiments of the gravity sensor management method of the present invention are presented.
Referring to fig. 4, fig. 4 is a flowchart of a first embodiment of a gravity sensor multiplexing method according to the present invention.
In one embodiment, the gravity sensor multiplexing method includes:
step S10, when a first screen is in a working state, detecting whether a turnover event exists according to gravity data reported by a gravity sensor;
in this embodiment, the mobile terminal is a dual-screen mobile terminal, including a screen 1 and a screen 2, where the two screens are opposite to each other. Screen 1 or screen 2 may be set as the first screen in advance, and the other screen may be set as the second screen. If the screen 1 is set as the first screen, the mobile terminal is regarded as the mobile terminal 1 including only the screen 1 when the gravity sensor is set, and the gravity sensor is configured for the mobile terminal 1 based on the existing manner of setting the gravity sensor. In this case, taking fig. 3a to 3d as an example, when the dual-screen mobile terminal is horizontally placed with the screen 1 facing up, the actual measurement value of the gravity sensor is (0, 10); when the double-sided screen mobile terminal is placed laterally and vertically, and the screen 1 faces to the right, the actual measurement value of the gravity sensor is (-10,0,0); when the double-sided screen mobile terminal is placed laterally and vertically, and the screen 1 faces to the right left, the actual measurement value of the gravity sensor is (10,0,0); when the double-sided screen mobile terminal is horizontally placed and the screen 1 is downward, the actual measurement value of the gravity sensor is (0, -10).
If the screen 2 is set as the first screen, the mobile terminal is regarded as the mobile terminal 2 including only the screen 2 when the gravity sensor is set, and the gravity sensor is configured for the mobile terminal 2 based on the existing manner of setting the gravity sensor. In this case, taking fig. 3a to 3d as an example, when the dual-screen mobile terminal is horizontally placed with the screen 2 facing up, the actual measurement value of the gravity sensor is (0, 10); when the double-sided screen mobile terminal is placed laterally and vertically, and the screen 2 faces to the right, the actual measurement value of the gravity sensor is (-10,0,0); when the double-sided screen mobile terminal is placed laterally and vertically, and the screen 2 faces to the right left, the actual measurement value of the gravity sensor is (10,0,0); when the double-sided screen mobile terminal is horizontally placed and the screen 2 faces downwards, the actual measurement value of the gravity sensor is (0, -10).
In one embodiment, taking the screen 1 as the first screen as an example, when the screen 1 is detected to be in the working state, the first screen is determined to be in the working state. Wherein, whether the screen 1 is in an operating state or not is detected, which can be determined by whether a screen lighting instruction is received or not. If a screen lighting instruction for the screen 1 is received, the screen 1 is detected to be in the working state, namely, the first screen is judged to be in the working state. The receipt of the screen lighting instruction for the screen 1 may be triggered by the user by pressing a preset button, a click operation on the screen, a touch operation on the screen, or the like, which is not limited herein.
In this embodiment, the step of detecting whether a rollover event exists according to the gravity data reported by the gravity sensor includes:
detecting whether target gravity data with absolute value of coordinate values on a first target axis smaller than a preset threshold exists in gravity data reported by a gravity sensor;
if the target gravity data exists in the gravity data reported by the gravity sensor, a turnover event exists.
In this embodiment, according to the prior art, it may be set that when the mobile phone is turned to an angle smaller than 30 ° with the X axis, a turning event is considered to exist. In terms of numbers, since the maximum coordinate value of each axis of the gravity sensor is 10, if the absolute value of the z-axis (axis perpendicular to the horizontal plane) coordinate is < 10×sin30 °, a rollover event is considered to exist. I.e. an axis perpendicular to the horizontal plane, is taken as the target axis, and a rollover event occurs when the absolute value of the coordinate value on the target axis in the first gravity data is < 5 (i.e. the preset threshold). In this embodiment, the z-axis is taken as the first target axis, the y-axis is taken as the second target axis, and the x-axis is taken as the third target axis. According to the gravity data (x, y, z) reported by the gravity sensor, when detecting that a target gravity data (x 1, y1, z 1) exists and the absolute value of z1 is smaller than 5, a turnover event exists. At this time, for the user, the main manipulation screen is changed from the first screen to the second screen.
Step S20, if a rollover event exists, determining the type of the rollover event;
in this embodiment, the step of determining the type of the rollover event if the rollover event exists includes:
acquiring historical data adjacent to the target gravity data in time in the gravity data reported by the gravity sensor;
determining a reference axis in which the data in the target gravity data and the historical data are unchanged;
if the reference axis is a second target axis, determining that the type of the rollover event is horizontal rollover;
if the reference axis is a third target axis, the type of rollover event is determined to be a vertical rollover.
In this embodiment, when the target gravity data (x 1, y1, z 1) exists in the gravity data reported by the gravity sensor, the absolute value of z1 is smaller than 5. The existence of a rollover event is illustrated, but rollover includes both horizontal rollover and vertical rollover, and thus further determination of the type of rollover event is required. Referring to fig. 5, fig. 5 is a schematic diagram illustrating a coordinate axis distribution in an embodiment of a multiplexing method for gravity sensors according to the present invention. As shown in fig. 5, the x-axis is in the horizontal plane with the y-axis and the z-axis is perpendicular to the horizontal plane. Wherein the z-axis is taken as a first target axis, the y-axis is taken as a second target axis, and the x-axis is taken as a third target axis. If the mobile terminal is horizontally turned over, coordinate values on a y axis of data reported by the gravity sensor are unchanged in the turning over process, namely the mobile terminal turns over by taking the y axis (a second target axis) as a reference axis; if the mobile terminal is vertically turned over, coordinate values of data reported by the gravity sensor on an x-axis are unchanged in the turning over process, namely the mobile terminal is turned over by taking the x-axis (a third target axis) as a reference axis.
In this embodiment, historical data adjacent to the target gravity data in time in the gravity data reported by the gravity sensor is obtained, that is, the gravity data (x 0, y0, z 0) reported by the gravity sensor before reporting the target gravity data (x 1, y1, z 1) is obtained, if y1 is the same as y0 (in actual situations, detection errors may exist, an error range may be set, and when the difference value of the two is in the error range, the difference value is considered to be the same), the reference axis is illustrated as the y axis, that is, the reference axis is illustrated as the second target axis, and the type of the turning event is illustrated as horizontal turning; if x1 is the same as x0 (in practice, there may be a detection error, an error range may be set, and when the difference between the two is in the error range, the difference is considered to be the same), the reference axis is indicated as the x axis, that is, the reference axis is indicated as the third target axis, and the type of the rollover event is indicated as vertical rollover.
In this other embodiment, after step S10, the method further includes:
if a turnover event exists, detecting whether a screen switching function is started or not;
and if the screen switching function is started, enabling the second screen and closing the first screen.
That is, in the presence of a rollover event, it is further detected whether the screen switching function is turned on, which can be set by the user. When the screen switching function is turned on, the second screen is enabled, and the first screen is turned off. The screen switching can be allowed or forbidden according to the actual needs of the user when the overturn event exists. This step may be performed concurrently with step S20 described above.
And step S30, determining a gravity data modification strategy based on the type of the overturning event, and modifying the gravity data reported from the current moment lifting force sensor based on the gravity data modification strategy to obtain modified gravity data.
In an alternative embodiment of the present invention, step S30 includes:
and when the type of the overturning event is horizontal overturning, taking the negative sign of the values of the gravity data reported by the lifting force sensor at the current moment on the first target axis and the third target axis to obtain modified gravity data.
In this embodiment, when the mobile terminal is turned horizontally, because the directions of the x axis (the third target axis) and the z axis (the first target axis) are both changed to negative directions, the values of the gravity data reported from the lifting force sensor at the current moment on the first target axis and the third target axis are given negative signs, so as to obtain modified gravity data, so that after the mobile terminal is turned horizontally, the gravity data reported from the subsequent gravity sensor is modified, and the modified gravity data can represent the spatial position of the current mobile terminal (the mobile terminal using the second screen as the main control screen).
In another alternative embodiment of the present invention, step S30 further includes:
And when the type of the overturning event is vertical overturning, taking a negative sign on the values of the gravity data reported by the lifting force sensor at the current moment on the first target axis and the second target axis to obtain modified gravity data.
In this embodiment, before the mobile terminal is turned vertically, the user controls the first screen to change from a state in which the first screen is turned horizontally upwards.
In this embodiment, when the mobile terminal is turned vertically, because the directions of the y axis (the second target axis) and the z axis (the first target axis) are both negative, the values of the gravity data reported from the lifting force sensor at the current moment on the second target axis and the third target axis are given negative signs, so as to obtain modified gravity data, so that after the mobile terminal is turned horizontally, the gravity data reported from the subsequent gravity sensor is modified, and the modified gravity data can represent the spatial position of the current mobile terminal (the mobile terminal using the second screen as the main control screen).
In the embodiment, when the first screen is in a working state, whether a turnover event exists is detected according to gravity data reported by a gravity sensor; if a rollover event exists, determining the type of the rollover event; and determining a gravity data modification strategy based on the type of the overturning event, and modifying the gravity data reported from the current moment lifting force sensor based on the gravity data modification strategy to obtain modified gravity data. According to the embodiment, when the mobile terminal is turned over (the main control screen is changed from the first screen to the second screen), the gravity data reported by the subsequent gravity sensor is modified according to the turning type, so that the modified gravity data can represent the spatial position of the current mobile terminal (the mobile terminal taking the second screen as the main control screen). The method comprises the steps of detecting the spatial position change of the double-sided screen mobile terminal when a first screen is used as a main control screen through a gravity sensor, namely detecting the control action of external force on the double-sided screen mobile terminal, and detecting the spatial position change of the current double-sided screen mobile terminal when a second screen is used as the main control screen, namely detecting the control action of external force on the current double-sided screen mobile terminal.
Further, in an embodiment of the gravity sensor multiplexing method of the present invention, after the step of obtaining the modified gravity data, the method further includes:
and sending the modified gravity data to an application which is currently in an operation state and depends on a gravity sensor.
At present, some applications in the mobile terminal can rely on gravity data collected by a gravity sensor to determine the spatial position change of the mobile terminal, so that corresponding functions are realized.
In this embodiment, when the first screen is in a working state, the first screen is a main control screen for a user, and at this time, gravity data uploaded by the gravity sensor is directly sent to an application that is in a working state and depends on the gravity sensor, so that the application can determine, according to the gravity data, a spatial position change of the dual-screen mobile terminal that uses the first screen as the main control screen (that is, according to the gravity data, a control action of an external force on the current dual-screen mobile terminal is detected), thereby responding. When the turnover is detected, the main control screen is changed from the first screen to the second screen for the user, at this time, according to the turnover type, the gravity data uploaded by the gravity sensor is correspondingly modified, and then the modified gravity data is sent to the application which is currently in an operation state and depends on the gravity sensor, so that the application can determine the spatial position change of the double-sided screen mobile terminal taking the second screen as the main control screen according to the modified gravity data (namely, according to the modified gravity data, the control action of the external force on the current double-sided screen mobile terminal is detected), and the response is made.
In addition, the embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium is stored with a gravity sensor multiplexing program, and the gravity sensor multiplexing program realizes the steps of the gravity sensor multiplexing method when being executed by a processor.
The specific embodiments of the computer readable storage medium of the present invention are substantially the same as the embodiments of the gravity sensor multiplexing method described above, and will not be described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (5)

1. A gravity sensor multiplexing method, characterized in that the gravity sensor multiplexing method comprises:
When the first screen is in a working state, detecting whether a turnover event exists according to gravity data reported by a gravity sensor;
if a rollover event exists, determining the type of the rollover event;
determining a gravity data modification strategy based on the type of the overturning event, and modifying gravity data reported from a current moment hoisting force sensor based on the gravity data modification strategy to obtain modified gravity data;
when the first screen is in a working state, after the step of detecting whether a turnover event exists according to the gravity data reported by the gravity sensor, the method further comprises the following steps:
if a turnover event exists, detecting whether a screen switching function is started or not;
if the screen switching function is started, enabling a second screen and closing the first screen;
if the screen switching function is closed, the screen switching is forbidden;
the step of detecting whether a turnover event exists according to the gravity data reported by the gravity sensor comprises the following steps:
detecting whether target gravity data with absolute value of coordinate values on a first target axis smaller than a preset threshold exists in gravity data reported by a gravity sensor;
if the target gravity data exists in the gravity data reported by the gravity sensor, a turnover event exists;
Wherein, if there is a rollover event, the step of determining the type of rollover event includes:
acquiring historical data adjacent to the target gravity data in time in the gravity data reported by the gravity sensor;
determining a reference axis in which the data in the target gravity data and the historical data are unchanged;
if the reference axis is a second target axis, determining that the type of the rollover event is horizontal rollover;
if the reference axis is a third target axis, determining that the type of the rollover event is vertical rollover;
the step of determining a gravity data modification strategy based on the type of the overturning event, and modifying the gravity data reported from the current moment lifting force sensor based on the gravity data modification strategy to obtain modified gravity data comprises the following steps:
when the type of the overturning event is horizontal overturning, taking negative signs on values of the gravity data reported by the lifting force sensor at the current moment on the first target shaft and the third target shaft to obtain modified gravity data;
the step of determining a gravity data modification strategy based on the type of the overturning event, modifying gravity data reported from a current moment lifting force sensor based on the gravity data modification strategy, and obtaining modified gravity data further comprises the steps of:
And when the type of the overturning event is vertical overturning, taking a negative sign on the values of the gravity data reported by the lifting force sensor at the current moment on the first target axis and the second target axis to obtain modified gravity data.
2. The gravity sensor multiplexing method of claim 1, further comprising, after the step of obtaining modified gravity data:
and sending the modified gravity data to an application which is currently in an operation state and depends on a gravity sensor.
3. A mobile terminal, the mobile terminal comprising: the gravity sensor multiplexing device comprises a memory, a processor and a gravity sensor multiplexing program which is stored in the memory and can run on the processor, wherein the gravity sensor multiplexing program realizes the following steps when being executed by the processor:
when the first screen is in a working state, detecting whether a turnover event exists according to gravity data reported by a gravity sensor;
if a rollover event exists, determining the type of the rollover event;
determining a gravity data modification strategy based on the type of the overturning event, and modifying gravity data reported from a current moment hoisting force sensor based on the gravity data modification strategy to obtain modified gravity data;
When the first screen is in a working state, after the step of detecting whether a turnover event exists according to the gravity data reported by the gravity sensor, the method further comprises the following steps:
if a turnover event exists, detecting whether a screen switching function is started or not;
if the screen switching function is started, enabling a second screen and closing the first screen;
if the screen switching function is closed, the screen switching is forbidden;
the step of detecting whether a turnover event exists according to the gravity data reported by the gravity sensor comprises the following steps:
detecting whether target gravity data with absolute value of coordinate values on a first target axis smaller than a preset threshold exists in gravity data reported by a gravity sensor;
if the target gravity data exists in the gravity data reported by the gravity sensor, a turnover event exists;
wherein, if there is a rollover event, the step of determining the type of rollover event includes:
acquiring historical data adjacent to the target gravity data in time in the gravity data reported by the gravity sensor;
determining a reference axis in which the data in the target gravity data and the historical data are unchanged;
if the reference axis is a second target axis, determining that the type of the rollover event is horizontal rollover;
If the reference axis is a third target axis, determining that the type of the rollover event is vertical rollover;
the step of determining a gravity data modification strategy based on the type of the overturning event, and modifying the gravity data reported from the current moment lifting force sensor based on the gravity data modification strategy to obtain modified gravity data comprises the following steps:
when the type of the overturning event is horizontal overturning, taking negative signs on values of the gravity data reported by the lifting force sensor at the current moment on the first target shaft and the third target shaft to obtain modified gravity data;
the step of determining a gravity data modification strategy based on the type of the overturning event, modifying gravity data reported from a current moment lifting force sensor based on the gravity data modification strategy, and obtaining modified gravity data further comprises the steps of:
and when the type of the overturning event is vertical overturning, taking a negative sign on the values of the gravity data reported by the lifting force sensor at the current moment on the first target axis and the second target axis to obtain modified gravity data.
4. The mobile terminal of claim 3, wherein the gravity sensor multiplexing procedure, when executed by the processor, implements the steps of the gravity sensor multiplexing method of claim 1.
5. A computer-readable storage medium, wherein a gravity sensor multiplexing program is stored on the computer-readable storage medium, which when executed by a processor, implements the steps of the gravity sensor multiplexing method according to claim 1.
CN201811273745.XA 2018-10-29 2018-10-29 Gravity sensor multiplexing method, mobile terminal and computer readable storage medium Active CN109375789B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811273745.XA CN109375789B (en) 2018-10-29 2018-10-29 Gravity sensor multiplexing method, mobile terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811273745.XA CN109375789B (en) 2018-10-29 2018-10-29 Gravity sensor multiplexing method, mobile terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109375789A CN109375789A (en) 2019-02-22
CN109375789B true CN109375789B (en) 2024-01-26

Family

ID=65390269

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811273745.XA Active CN109375789B (en) 2018-10-29 2018-10-29 Gravity sensor multiplexing method, mobile terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109375789B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109976688B (en) * 2019-02-28 2022-04-26 维沃移动通信有限公司 Screen display method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN207337881U (en) * 2017-05-17 2018-05-08 北京点石经纬科技有限公司 Double-screen electronic facility for study
CN108170392A (en) * 2017-12-27 2018-06-15 努比亚技术有限公司 Double screen switching method, dual-screen mobile terminal and computer readable storage medium
CN108234773A (en) * 2018-01-29 2018-06-29 努比亚技术有限公司 A kind of switching method of double-sided screen, terminal and storage medium
CN108390988A (en) * 2018-01-02 2018-08-10 努比亚技术有限公司 Fast operating method, mobile terminal and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101821197B1 (en) * 2010-12-21 2018-01-23 엘지전자 주식회사 Mobile terminal and method for controlling the same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN207337881U (en) * 2017-05-17 2018-05-08 北京点石经纬科技有限公司 Double-screen electronic facility for study
CN108170392A (en) * 2017-12-27 2018-06-15 努比亚技术有限公司 Double screen switching method, dual-screen mobile terminal and computer readable storage medium
CN108390988A (en) * 2018-01-02 2018-08-10 努比亚技术有限公司 Fast operating method, mobile terminal and computer readable storage medium
CN108234773A (en) * 2018-01-29 2018-06-29 努比亚技术有限公司 A kind of switching method of double-sided screen, terminal and storage medium

Also Published As

Publication number Publication date
CN109375789A (en) 2019-02-22

Similar Documents

Publication Publication Date Title
CN112799577B (en) Method, terminal and storage medium for projecting small window
CN109663353B (en) Game operation method, mobile terminal and computer readable storage medium
CN110784898B (en) Network switching method, mobile terminal and computer readable storage medium
CN108184023B (en) Screen state control method, mobile terminal and computer readable storage medium
CN109195213B (en) Mobile terminal screen control method, mobile terminal and computer readable storage medium
CN109144705B (en) Application management method, mobile terminal and computer readable storage medium
CN109471579B (en) Terminal screen information layout adjustment method and device, mobile terminal and storage medium
CN107832032B (en) Screen locking display method and mobile terminal
CN110069167B (en) Touch point cleaning method, mobile terminal and computer readable storage medium
CN110113779B (en) eSIM card testing method, system and medium
CN112637410B (en) Method, terminal and storage medium for displaying message notification
CN108958936B (en) Application program switching method, mobile terminal and computer readable storage medium
CN110536011B (en) Content display method, terminal and computer readable storage medium
CN110096213B (en) Terminal operation method based on gestures, mobile terminal and readable storage medium
CN109389394B (en) Multi-screen payment control method, equipment and computer readable storage medium
CN113301251B (en) Auxiliary shooting method, mobile terminal and computer readable storage medium
CN111443818B (en) Screen brightness regulation and control method, equipment and computer readable storage medium
CN112423102A (en) Small window screen projection control method and device and computer readable storage medium
CN109711850B (en) Secure payment method, device and computer readable storage medium
CN111970738A (en) Network switching control method, equipment and computer readable storage medium
CN109375789B (en) Gravity sensor multiplexing method, mobile terminal and computer readable storage medium
CN107256108B (en) Screen splitting method, device and computer readable storage medium
CN107580106B (en) Call control method, mobile terminal and computer readable storage medium
CN110955397A (en) Method for setting frame rate of game terminal, game terminal and storage medium
CN112947831B (en) Screen-throwing reverse control method, mobile terminal and computer readable storage medium

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