CN110602636B - Terminal Bluetooth switch control method, server and terminal - Google Patents

Terminal Bluetooth switch control method, server and terminal Download PDF

Info

Publication number
CN110602636B
CN110602636B CN201910882462.3A CN201910882462A CN110602636B CN 110602636 B CN110602636 B CN 110602636B CN 201910882462 A CN201910882462 A CN 201910882462A CN 110602636 B CN110602636 B CN 110602636B
Authority
CN
China
Prior art keywords
terminal
information
vehicle
position information
bluetooth
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
CN201910882462.3A
Other languages
Chinese (zh)
Other versions
CN110602636A (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201910882462.3A priority Critical patent/CN110602636B/en
Publication of CN110602636A publication Critical patent/CN110602636A/en
Application granted granted Critical
Publication of CN110602636B publication Critical patent/CN110602636B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • H04W4/48Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for in-vehicle communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Abstract

The invention provides a terminal Bluetooth switch control method, which comprises the following steps: receiving a starting notice sent by the vehicle machine, and inquiring a preset vehicle machine information and terminal information matching database according to vehicle machine information contained in the starting notice to obtain an inquiry result; judging whether at least one first terminal matched with the vehicle machine exists in the query result; when the inquiry result is judged to have at least one first terminal matched with the car machine, judging whether the position information of the at least one first terminal is matched with the position information of the car machine or not according to the position information of each first terminal and the position information of the car machine; and when the situation that the position information of at least one first terminal is matched with the position information of the vehicle machine is judged, the first terminal matched with the position information of the vehicle machine is used as a target terminal, and a Bluetooth starting instruction is sent to the target terminal, so that the target terminal can automatically start a Bluetooth switch after receiving the Bluetooth starting instruction. The invention relates to the technical field of communication.

Description

Terminal Bluetooth switch control method, server and terminal
Technical Field
The invention relates to the technical field of communication, in particular to a terminal Bluetooth switch control method, a server and a terminal.
Background
Bluetooth is a wireless technology standard that enables short-range data exchange between fixed devices, mobile devices, and building personal area networks. With the development of short-distance wireless communication technology, at present, more and more mobile phones and automobiles support bluetooth functions, in the driving process, if a user wants to use functions of a bluetooth phone, bluetooth music and the like of an automobile, the bluetooth function of the mobile phone needs to be manually opened, and then the mobile phone bluetooth module and the vehicle-mounted bluetooth module are paired, connected and data transmitted, after the driving process is finished, in order to avoid unnecessary power consumption and prevent potential safety hazards, the user needs to manually close the bluetooth function of the mobile phone again, the method for manually opening and closing the bluetooth function by the user during driving causes that the user is not convenient enough, and if the user forgets to open the bluetooth before driving, when the bluetooth function needs to be used during driving, the user needs to operate the mobile phone to open the bluetooth during driving, which inevitably brings potential safety hazards. Therefore, the research on how to control the switch of the Bluetooth function of the mobile phone in the driving process has positive significance
Disclosure of Invention
The invention aims to at least solve one of technical problems in the prior art, and provides a terminal Bluetooth switch control method, a server and a terminal, which are used for solving the problem that a user needs to manually turn on a Bluetooth switch in the driving process in the prior art.
In one aspect, the invention provides a terminal bluetooth switch control method, which includes:
receiving a starting notice sent by a vehicle machine, wherein the starting notice comprises vehicle machine information of the vehicle machine;
inquiring a preset vehicle information and terminal information matching database according to the vehicle information to obtain an inquiry result; the vehicle-machine information and terminal information matching database comprises historical matching records of the vehicle machine and at least one terminal and corresponding accumulated matching times;
judging whether at least one first terminal matched with the vehicle machine exists in the query result;
when the inquiry result is judged to have at least one first terminal matched with the vehicle-mounted device, judging whether the position information of the at least one first terminal is matched with the position information of the vehicle-mounted device or not according to the position information of each first terminal and the position information of the vehicle-mounted device;
and when the situation that the position information of at least one first terminal is matched with the position information of the vehicle machine is judged, the first terminal matched with the position information of the vehicle machine is used as a target terminal, and a Bluetooth starting instruction is sent to the target terminal, so that the target terminal can automatically start a Bluetooth switch after receiving the Bluetooth starting instruction.
Preferably, the step of determining whether at least one first terminal matched with the car machine exists in the query result specifically includes:
judging whether the accumulated matching times of the terminal and the vehicle machine exceed a preset threshold or not aiming at each terminal contained in the query result;
and when the accumulated matching times of the terminal corresponding to the vehicle machine exceeds a preset threshold value, determining that the terminal is a first terminal matched with the vehicle machine.
Preferably, the step of determining whether there is at least one matching between the location information of the first terminal and the location information of the car machine according to the location information of each first terminal and the location information of the car machine specifically includes:
respectively acquiring the position information of the first terminal and the position information of the vehicle machine according to the terminal information of the first terminal and the vehicle machine information of the vehicle machine;
for each first terminal, judging whether the position information of the first terminal and the position information of the vehicle machine meet preset conditions or not;
and when the position information of the first terminal and the position information of the vehicle machine meet the preset conditions, determining that the position information of the first terminal is matched with the position information of the vehicle machine.
Preferably, the step of determining whether there is at least one matching between the location information of the first terminal and the location information of the car machine according to the location information of each first terminal and the location information of the car machine specifically includes:
starting a timer;
performing the following steps for each of the first terminals:
respectively acquiring the position information of the first terminal and the position information of the vehicle machine according to the terminal information of the first terminal and the vehicle machine information of the vehicle machine;
judging whether the position information of the first terminal and the position information of the vehicle machine meet preset conditions or not, and further judging whether the timing of the timer is finished or not when the position information of the first terminal and the position information of the vehicle machine meet the preset conditions; when the position information of the first terminal and the position information of the vehicle machine are judged not to meet the preset condition, determining that the position information of the first terminal is not matched with the position information of the vehicle machine;
when the timing of the timer is judged not to be finished, monitoring whether the position information of the first terminal or the vehicle machine changes in real time; when the position information of the first terminal or the vehicle machine is monitored to be changed, the step of respectively acquiring the position information of the first terminal and the position information of the vehicle machine according to the terminal information of the first terminal and the vehicle machine information of the vehicle machine is continuously executed;
and when the timing of the timer is judged to be finished, determining that the position information of the first terminal is matched with the position information of the vehicle machine.
Preferably, the step of determining whether there is at least one matching between the location information of the first terminal and the location information of the car machine according to the location information of each first terminal and the location information of the car machine specifically includes:
initializing the change times to zero;
performing the following steps for each of the first terminals:
respectively acquiring the position information of the first terminal and the position information of the vehicle machine according to the terminal information of the first terminal and the vehicle machine information of the vehicle machine;
judging whether the position information of the first terminal and the position information of the vehicle-mounted device meet preset conditions or not, adding 1 to the change times when the position information of the first terminal and the position information of the vehicle-mounted device meet the preset conditions, and further judging whether the change times exceed a preset threshold value or not; when the position information of the first terminal and the position information of the vehicle machine are judged not to meet the preset condition, determining that the position information of the first terminal is not matched with the position information of the vehicle machine;
when the change times are judged not to exceed a preset threshold value, monitoring whether the position information of the first terminal or the vehicle machine changes in real time; when the position information of the first terminal or the vehicle machine is monitored to be changed, returning to the step of executing the step of respectively acquiring the position information of the first terminal and the position information of the vehicle machine according to the terminal information of the first terminal and the vehicle machine information of the vehicle machine;
and when the change times are judged to exceed a preset threshold value, determining that the position information of the first terminal is matched with the position information of the vehicle machine.
Preferably, the bluetooth opening instruction includes a bluetooth address of the vehicle machine, so that the target terminal automatically searches for the bluetooth address of the vehicle machine after receiving the bluetooth opening instruction, and performs automatic connection.
Preferably, after the step of sending the bluetooth activation instruction to the target terminal, the method further includes:
when the number of the target terminals is multiple, receiving a selection result sent by a vehicle machine, wherein the selection result comprises terminal information of the selected terminal, and the terminal information of the selected terminal is sent to the vehicle machine by a terminal which is in Bluetooth connection with the vehicle machine;
and according to the selection result, sending a Bluetooth closing instruction to other target terminals which are not successfully connected with the vehicle machine, so that the target terminals which are not successfully connected with the vehicle machine automatically close own Bluetooth switches after receiving the Bluetooth closing instruction.
Preferably, after the step of sending the bluetooth activation instruction to the target terminal, the method further includes:
receiving the corresponding relation between the vehicle information and the terminal information sent by the vehicle machine; the corresponding relation between the vehicle machine information and the terminal information represents the corresponding relation between the vehicle machine information of the vehicle machine and the terminal information of the terminal which is in Bluetooth connection with the vehicle machine, and the terminal information is sent to the vehicle machine by the terminal which is in Bluetooth connection with the vehicle machine;
inquiring whether a preset vehicle information and terminal information matching database already contains the corresponding relation between the vehicle information and the terminal information;
when the corresponding relation between the vehicle information and the terminal information is found in the vehicle information and terminal information matching database, adding 1 to the accumulated matching times of the corresponding relation between the vehicle information and the terminal information in the vehicle information and terminal information matching database;
when the corresponding relation table of the vehicle information and the terminal information does not contain the corresponding relation of the vehicle information and the terminal information, storing the corresponding relation of the vehicle information and the terminal information into a matching database of the vehicle information and the terminal information, and recording the cumulative matching times of the corresponding relation of the vehicle information and the terminal information as 1.
Preferably, the car machine information includes car machine SIM card identification information of the car machine; the terminal information comprises terminal SIM card identification information of the terminal;
the position information of the first terminal comprises information of a base station cell connected with a terminal SIM card of the first terminal; the position information of the vehicle machine comprises information of a base station cell connected with a vehicle machine SIM card of the vehicle machine.
In another aspect, the present invention provides a backend server, including a storage module, where a computer program is stored in the storage module, and the computer program is used to implement the method provided by the present invention when executed.
In yet another aspect, the present invention provides a terminal, including:
the receiving unit is used for receiving a Bluetooth starting instruction sent by the background server;
and the Bluetooth self-starting unit is used for automatically starting the Bluetooth switch after the receiving unit receives the Bluetooth starting instruction.
Preferably, the terminal further includes: the automatic connection unit and the Bluetooth self-closing unit;
the automatic connection unit is used for automatically searching the Bluetooth address of the vehicle-mounted device according to the Bluetooth address of the vehicle-mounted device contained in the Bluetooth starting instruction and automatically connecting after the receiving unit receives the Bluetooth starting instruction;
the Bluetooth self-closing unit is used for automatically closing the Bluetooth switch of the vehicle machine after detecting that the Bluetooth address of the vehicle machine is not searched by the automatic connection unit within preset time, and is also used for automatically closing the Bluetooth switch of the vehicle machine after receiving a Bluetooth closing instruction sent by the server.
The invention has the beneficial technical effects that:
compared with the prior art, the terminal Bluetooth switch control method provided by the embodiment of the invention realizes the Bluetooth self-starting process of the user terminal in the driving process, so that the user does not need to actively and manually start the terminal Bluetooth switch when getting on the vehicle, and the user can more conveniently use the Bluetooth function in the driving scene, the user experience is improved.
Drawings
Fig. 1 is a flowchart of a method for controlling a bluetooth switch of a terminal according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for controlling a terminal bluetooth switch according to a second embodiment of the present invention;
fig. 3 is a flowchart of an implementation manner of step S204 in a terminal bluetooth switch control method according to a second embodiment of the present invention;
fig. 4 is a flowchart of another implementation manner of step S204 in a terminal bluetooth switch control method according to a second embodiment of the present invention;
fig. 5 is a flowchart illustrating a further implementation manner of step S204 in a terminal bluetooth switch control method according to a second embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal according to a fourth embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, a terminal bluetooth switch control method, a server and a terminal provided by the present invention are described in detail below with reference to the accompanying drawings.
Example one
The embodiment provides a terminal bluetooth switch control method, which is implemented by a background server, and as shown in fig. 1, the method includes:
and S101, receiving a starting notice sent by the vehicle machine.
In the terminal Bluetooth switch control method provided by the invention, the related vehicle machine has an internet surfing function, namely, the vehicle machine can access the internet after being started.
Specifically, after the car machine is started successfully and connected to the internet, a start notification is sent to the background server, the start notification includes car machine information of the car machine, the car machine information is used for uniquely identifying the car machine, and the background server receives the start notification sent by the car machine and identifies the car machine information contained in the start notification.
And S102, inquiring a preset vehicle information and terminal information matching database according to the vehicle information to obtain an inquiry result.
And S103, judging whether at least one first terminal matched with the vehicle machine exists in the query result.
And after recognizing the vehicle information in the start notification, the background server takes the vehicle information as a query index and queries from a prepared vehicle information and terminal information matching database, wherein the vehicle information and terminal information matching database comprises historical matching records of the vehicle and at least one terminal and corresponding accumulated matching times. Therefore, the obtained query result contains the terminal information of all the terminals matched with the car machine and the accumulated matching times. It should be noted that the terminal matching with the car machine described in step S103 refers to a terminal that has been successfully connected with the car machine bluetooth and meets a certain condition, and the condition is not specifically limited in this implementation, and may be set by a person skilled in the art according to actual needs, for example, limit the accumulated matching times or limit terminal information.
In step S103, when it is determined that at least one first terminal matched with the car machine exists in the query result, step S104 is executed, and when it is determined that the first terminal matched with the car machine does not exist in the query result, the process is ended.
And S104, judging whether the position information of at least one first terminal is matched with the position information of the vehicle machine or not according to the position information of each first terminal and the position information of the vehicle machine.
When it is determined that there is a match between the location information of the at least one first terminal and the location information of the in-vehicle device, performing step S105; and when the situation that the position information of the first terminal is not matched with the position information of the vehicle machine is judged, ending the process.
And S105, taking the first terminal matched with the position information of the vehicle machine as a target terminal, and sending a Bluetooth starting instruction to the target terminal so that the target terminal can automatically start a Bluetooth switch after receiving the Bluetooth starting instruction.
In this embodiment, after selecting at least one first terminal with car machine assorted, further do further screening to first terminal according to the positional information at first terminal and the positional information of car machine to the target terminal that makes the final determination can more with the car machine phase-match, more satisfies the user demand, after determining target terminal, sends the bluetooth to target terminal and opens the instruction, and target terminal opens self bluetooth switch after receiving the bluetooth and opens the instruction automatically.
In the method for controlling the bluetooth switch of the terminal provided by this embodiment, when the car machine is started, the car machine sends a start notification to the background server, and after the background server receives the start notification, determining a target terminal matched with the vehicle machine according to a preset vehicle machine information and terminal information matching database, vehicle machine position information and terminal position information, and sends a Bluetooth starting instruction to the target terminal, the target terminal automatically starts a Bluetooth module switch after receiving the Bluetooth starting instruction, so as to be convenient for subsequent Bluetooth connection with the vehicle machine, compared with the prior art, the terminal Bluetooth switch control method provided by the invention realizes the Bluetooth self-starting process of the user terminal in the driving process, the user does not need to actively and manually start the terminal Bluetooth switch during driving, so that the user can use the Bluetooth function more conveniently in a driving scene, and the user experience is improved.
Example two
The embodiment provides a terminal bluetooth switch control method, as shown in fig. 2, the method includes:
and step S201, receiving a starting notice sent by the vehicle machine.
The starting notification comprises the vehicle machine information including the vehicle machine, the vehicle machine information is used for uniquely identifying the vehicle machine, and the background server receives the starting notification sent by the vehicle machine and identifies the vehicle machine information contained in the starting notification.
In this embodiment, the in-vehicle information includes in-vehicle SIM card identification information of the in-vehicle device, that is, in this embodiment, the in-vehicle device may insert an SIM card, the SIM card is used to provide internet traffic for the in-vehicle device, and the in-vehicle SIM card identification information is used to uniquely identify the in-vehicle device.
Step S202, a preset vehicle information and terminal information matching database is inquired according to the vehicle information to obtain an inquiry result.
And step S203, judging whether at least one first terminal matched with the vehicle machine exists in the query result.
After recognizing the car machine information in the start notification, the background server queries from a prepared car machine information and terminal information matching database by using the car machine information as a query index, wherein the car machine information and terminal information matching database contains historical matching records of a car machine and at least one terminal and corresponding accumulated matching times, so that the obtained query result contains terminal information of all terminals matched with the car machine and the accumulated matching times.
It should be noted that the terminal matched with the car machine refers to a terminal that has been successfully connected with the car machine bluetooth and meets a certain condition, in this embodiment, the first terminal matched with the car machine is determined by limiting the accumulated matching times of the terminal and the car machine, specifically, step S203 specifically includes: and judging whether the accumulated matching times of the terminal corresponding to the vehicle machine exceeds a preset threshold value or not for each terminal contained in the query result, and determining that the terminal is a first terminal matched with the vehicle machine when judging that the accumulated matching times of the terminal corresponding to the vehicle machine exceeds the preset threshold value.
In step S203, when it is determined that at least one first terminal matched with the car machine exists in the query result, step S204 is executed, and when it is determined that the first terminal matched with the car machine does not exist in the query result, the process is ended.
And S204, judging whether the position information of at least one first terminal is matched with the position information of the vehicle machine or not according to the position information of each first terminal and the position information of the vehicle machine.
In this embodiment, the location information of the first terminal and the car machine both refer to physical locations, specifically, the location information of the car machine refers to information of a base station cell connected to a car machine SIM card of the car machine, and the location information of the first terminal refers to information of a base station cell connected to a SIM card in the first terminal, but the present invention is not limited to using the base station cell to represent the location information of the terminal and the car machine, for example, the location information of the terminal and the car machine may also be used to represent the location information of the terminal and the car machine by using GPS positioning, and as long as the technical solutions capable of representing the physical locations of the car machine and the terminal both belong to the protection scope of the present invention.
In the invention, there are various embodiments for judging whether there is at least one matching between the position information of the first terminal and the position information of the car machine according to the position information of each first terminal and the position information of the car machine, and the embodiment provides three preferable embodiments.
As one preferred implementation, as shown in fig. 3, step S204 specifically includes:
step S2041a, respectively obtaining the position information of the first terminal and the position information of the car machine according to the terminal information of the first terminal and the car machine information of the car machine.
In this embodiment, by sending the SIM card identification information (e.g., IMSI number) of the SIM card in the terminal and the car-mounted SIM card identification information (e.g., IMSI number) of the car-mounted device to the operator server, information of the base station cell to which the terminal and the car-mounted device are currently connected can be obtained from the operator server.
Step S2042a, for each first terminal, determining whether the position information of the first terminal and the position information of the car machine meet a preset condition.
In this embodiment, determining whether the location information of the first terminal and the location information of the car machine meet the preset condition refers to whether a base station cell to which the first terminal is connected and a base station cell to which the car machine is currently connected are the same or have a neighboring cell relationship.
When the position information of the first terminal and the position information of the car machine are determined to satisfy the preset condition, it may be determined that the first terminal is currently on the car machine, at this time, it may be determined that the first terminal is matched with the car machine, that is, step S2043a is performed, and when the position information of the first terminal and the position information of the car machine are determined to not satisfy the preset condition, it is determined that the first terminal is not matched with the car machine, and step S2044a is correspondingly performed.
And step S2043a, determining that the position information of the first terminal is matched with the position information of the vehicle machine.
Step S2044a, determining that the location information of the first terminal does not match the location information of the vehicle.
As another preferred embodiment, as shown in fig. 4, step S204 specifically includes:
step S2041b, start the timer.
The following steps are performed for each first terminal:
step S2042b, obtaining the position information of the first terminal and the position information of the car machine according to the terminal information of the first terminal and the car machine information of the car machine, respectively.
The same as step S2042a in the previous embodiment.
Step S2043b, determining whether the position information of the first terminal and the position information of the vehicle device satisfy a preset condition.
The same as step S2043a in the previous embodiment.
When it is determined that the location information of the first terminal and the location information of the vehicle machine satisfy the preset condition, performing step S2044 b; when it is determined that the location information of the first terminal and the location information of the in-vehicle machine do not satisfy the preset condition, step S2045b is executed.
Step S2044b is performed to determine whether or not the counting of the timer is completed.
Step S2045b, determining that the location information of the first terminal does not match the location information of the vehicle.
In step S2044b, when it is determined that the counting of the timer has not ended, step S2046b is performed; when it is determined that the counting of the timer is finished, step S2047b is executed.
Step S2046b, monitoring whether the position information of the first terminal or the car machine changes in real time.
And when the position information of the first terminal or the car machine is monitored to be changed, returning to step S2042b, and when the position information of the first terminal or the car machine is not monitored to be changed, continuously monitoring.
Step S2047b, determining that the position information of the first terminal matches the position information of the car machine.
In the embodiment, a timer is set to continuously monitor the position information of the first terminal and the vehicle, and if the position information of the first terminal and the vehicle always meets a preset condition whether changing or not within the timing duration of the timer, it is proved that the first terminal probably exists on the vehicle.
As another preferred embodiment, as shown in fig. 5, step S204 specifically includes:
step S2041c, the number of times of change is initialized to zero.
The following steps are performed for each first terminal:
step S2042c, obtaining the position information of the first terminal and the position information of the car machine according to the terminal information of the first terminal and the car machine information of the car machine, respectively.
The same as step S2042b in the previous embodiment.
Step S2043c, determining whether the position information of the first terminal and the position information of the vehicle device satisfy a preset condition.
The same as step S2043b in the previous embodiment.
When it is determined that the location information of the first terminal and the location information of the in-vehicle device satisfy the preset condition, performing step S2044 c; when the position information of the first terminal and the position information of the in-vehicle device are determined not to satisfy the preset condition, step S2044 c' is executed.
Step S2044c, add 1 to the number of changes.
Step S2044 c', it is determined that the location information of the first terminal does not match the location information of the vehicle.
Step S2045c, it is determined whether the number of times of change exceeds a preset threshold.
When it is determined that the number of times of change does not exceed the preset threshold, performing step S2046 c; when it is determined that the number of times of change exceeds the preset threshold, step S2047c is executed.
Step S2046c, monitoring whether the position information of the first terminal or the car machine changes in real time.
And when the position information of the first terminal or the car machine is monitored to be changed, returning to step S2042c, and when the position information of the first terminal or the car machine is monitored not to be changed, continuously monitoring.
Step S2047c, determining that the position information of the first terminal matches the position information of the car machine.
In this embodiment, the number of times of changing the position information of the car machine or the first terminal is recorded, and when it is determined that the position information of the car machine and the first terminal always meets the preset condition within the preset number of times, it can be proved with a high probability that the first terminal exists on the car machine.
In step S204, when it is determined that there is a match between the location information of the at least one first terminal and the location information of the in-vehicle device, performing step S205; and when the situation that the position information of the first terminal is not matched with the position information of the vehicle machine is judged, ending the process.
And S205, taking the first terminal matched with the position information of the vehicle machine as a target terminal, and sending a Bluetooth starting instruction to the target terminal so that the target terminal can automatically start a Bluetooth switch after receiving the Bluetooth starting instruction.
In this embodiment, after selecting at least one first terminal with car machine assorted, further do further screening to first terminal according to the positional information at first terminal and the positional information of car machine to the target terminal that makes the final determination can more with the car machine phase-match, more satisfies the user demand, after determining target terminal, sends the bluetooth to target terminal and opens the instruction, and target terminal opens self bluetooth switch after receiving the bluetooth and opens the instruction automatically.
In this embodiment, the bluetooth start instruction includes a bluetooth address of the vehicle, and the target terminal identifies the vehicle bluetooth address included in the bluetooth start instruction after receiving the bluetooth start instruction, searches for the bluetooth address, and performs active connection after searching for the bluetooth address.
In addition, in this embodiment, the backend server may also send the bluetooth opening instruction to the car machine, so that the car machine can automatically start its own bluetooth module.
The terminal bluetooth switch control method provided by this embodiment further includes a step of sending a bluetooth shutdown instruction and a step of storing a correspondence between the vehicle information and the terminal information. Specifically, the step of sending the bluetooth shutdown instruction includes steps S206 to S207, and the step of storing the correspondence between the in-vehicle information and the terminal information includes steps S208 to S211.
And S206, receiving a selection result sent by the vehicle machine.
In practical applications, the number of the target terminals determined in steps S204 and S205 in the first embodiment may be multiple, and when the number of the target terminals is multiple, the in-vehicle device displays the terminals that can currently perform bluetooth connection on the in-vehicle device display device for the user to select, where it should be noted that the terminals displayed by the in-vehicle device include other terminals on the in-vehicle device that have the bluetooth switch turned on in addition to the multiple target terminals screened by the server for the in-vehicle device; and after receiving a selection instruction made by the user, the vehicle machine sends a selection result of the user to the background server, wherein the selection result comprises terminal information of the terminal selected by the vehicle machine, and the terminal information of the selected terminal is sent to the vehicle machine by the terminal which completes Bluetooth connection with the vehicle machine after being successfully connected with the vehicle machine.
The background server receives the selection result.
And step S207, according to the selection result, sending a Bluetooth closing instruction to other target terminals which are not successfully connected with the vehicle machine, so that the other target terminals which are not successfully connected with the vehicle machine automatically close the Bluetooth switch after receiving the Bluetooth closing instruction.
After receiving the selection result, the background server determines a target terminal which is not in bluetooth connection with the vehicle machine among the plurality of target terminals determined in step S204 according to the terminal information of the terminal included in the selection result, and sends a bluetooth close instruction to the target terminal which is not in bluetooth connection with the vehicle machine, and after receiving the bluetooth close instruction, the target terminal which is not in bluetooth connection with the vehicle machine automatically closes its own bluetooth switch, so as to avoid unnecessary power consumption and eliminate possible potential safety hazards.
It should be noted that the target terminals that are not bluetooth-connected to the in-vehicle device in step S207 may be all the target terminals determined in step S204, or may be a part of all the target terminals determined in step S204, specifically, when the user selects one of the target terminals to perform bluetooth connection in step S206, the target terminals that are not bluetooth-connected to the in-vehicle device are a part of all the target terminals determined in step S204, and when the user selects other terminals on the in-vehicle device that turn on the bluetooth switch in step S206, the target terminals that are not bluetooth-connected to the in-vehicle device are all the target terminals determined in step S204.
The step of storing the corresponding relation between the vehicle information and the terminal information comprises the following steps:
and S208, receiving the corresponding relation between the vehicle information and the terminal information sent by the vehicle.
In this embodiment, after the vehicle device successfully completes the bluetooth connection, the terminal information of the terminal that completes the bluetooth connection with itself and the corresponding relationship of the terminal information are sent to the background server, where the terminal information is sent to the vehicle device by the terminal that completes the bluetooth connection with the vehicle device after completing the bluetooth connection with the vehicle device.
Step S209, querying whether a preset vehicle information and terminal information matching database already contains a corresponding relationship between the vehicle information and the terminal information.
After receiving the correspondence between the car information and the terminal information sent by the car, the background server queries whether a preset matching database of the car information and the terminal information already contains the correspondence, and when the matching database of the car departure information and the terminal information already contains the correspondence between the car information and the terminal information, the background server executes the following step S210; when the corresponding relation table of the car departure information and the terminal information does not include the corresponding relation between the car departure information and the terminal information, step S211 is executed.
And step S210, adding 1 to the accumulated matching times of the corresponding relation between the vehicle information and the terminal information in the vehicle information and terminal information matching database.
Step S211, storing the corresponding relation between the vehicle information and the terminal information into a matching database of the vehicle information and the terminal information, and recording the accumulated matching times of the corresponding relation between the vehicle information and the terminal information as 1.
In this embodiment, after the car machine is connected to the terminal, the corresponding relationship between the car machine information and the terminal information and the corresponding accumulated matching times are updated to the preset car machine information and terminal information matching database, so that when the car machine is started next time, the data information in the database can be used for screening a suitable target terminal for the car machine. It should be noted that, when the same automobile engine is started, if the mobile phone bluetooth module and the vehicle-mounted bluetooth module are connected for multiple times, only one matching relationship is sent, that is, the corresponding relationship between the vehicle information and the terminal information is sent only when the first connection is successful, when the vehicle has a process of connecting bluetooth for multiple times in the process of starting for one time, in the subsequent connections, the vehicle determines whether the corresponding relationship between the vehicle information and the terminal information is sent by detecting whether the vehicle has a record of the corresponding relationship between the vehicle information and the terminal information sent in the starting of the vehicle, when the sending record is detected, the corresponding relationship between the vehicle information and the terminal information is not sent after the bluetooth connection is successful, and when the sending record is detected to be absent, the corresponding relationship between the vehicle information and the terminal information is sent after the bluetooth connection is successful.
In this embodiment, the step of sending the bluetooth close instruction and the step of storing the correspondence between the vehicle information and the terminal information are both steps implemented after the vehicle completes the bluetooth connection, and the execution sequence of the two steps is not specifically limited in the present invention, and may be performed simultaneously or sequentially, and fig. 2 only shows one execution sequence, but does not represent that the present invention is limited to only one execution sequence.
EXAMPLE III
The embodiment provides a backend server, which includes a storage module, where a computer program is stored in the storage module, and the computer program is used to implement the methods provided in the first and second embodiments of the present application when executed.
Example four
The present embodiment provides a terminal, as shown in fig. 5, the terminal includes: a receiving unit 11 and a Bluetooth self-starting unit 12; the receiving unit 11 is configured to receive a bluetooth start instruction sent by the background server; the bluetooth self-starting unit 12 is configured to automatically start a bluetooth switch of the receiving unit 11 after receiving the bluetooth start instruction.
The terminal that this embodiment provided is provided with the bluetooth and opens the instruction that the receiving element is used for receiving backend server and sends to and be provided with bluetooth self-starting unit and be used for opening the bluetooth switch of self after receiving the bluetooth and open the instruction, thereby make the user at the driving in-process, need not manual terminal bluetooth switch of opening, thereby it is more convenient to make the user use bluetooth function in the scene of driving a vehicle, has improved user experience.
Further, the terminal further includes: an automatic connection unit 13 and a bluetooth self-shutdown unit 14. The automatic connection unit 13 is configured to, after the receiving unit 11 receives the bluetooth start instruction, automatically search for a bluetooth address of the car machine according to a bluetooth name of the car machine included in the bluetooth start instruction, and perform automatic connection; the bluetooth self-closing unit 14 is configured to automatically close the bluetooth switch of the vehicle after detecting that the automatic connection unit 13 does not search for the bluetooth name of the vehicle in the preset duration, and is further configured to automatically close the bluetooth switch of the vehicle after receiving a bluetooth closing instruction sent by the server.
It will be understood that the above embodiments are merely exemplary embodiments taken to illustrate the principles of the present invention, which is not limited thereto. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit and substance of the invention, and these modifications and improvements are also considered to be within the scope of the invention.

Claims (9)

1. A terminal Bluetooth switch control method is characterized by comprising the following steps:
receiving a starting notice sent by a vehicle machine, wherein the starting notice comprises vehicle machine information of the vehicle machine;
inquiring a preset vehicle information and terminal information matching database according to the vehicle information to obtain an inquiry result; the vehicle-machine information and terminal information matching database comprises historical matching records of the vehicle machine and at least one terminal and corresponding accumulated matching times;
judging whether at least one first terminal matched with the vehicle machine exists in the query result;
when the inquiry result is judged to have at least one first terminal matched with the vehicle-mounted device, judging whether the position information of the at least one first terminal is matched with the position information of the vehicle-mounted device or not according to the position information of each first terminal and the position information of the vehicle-mounted device;
when the situation that the position information of at least one first terminal is matched with the position information of the vehicle-mounted device is judged, the first terminal matched with the position information of the vehicle-mounted device is used as a target terminal, and a Bluetooth starting instruction is sent to the target terminal, so that the target terminal can automatically start a Bluetooth switch after receiving the Bluetooth starting instruction;
the step of judging whether the position information of at least one first terminal is matched with the position information of the vehicle machine according to the position information of each first terminal and the position information of the vehicle machine specifically comprises:
starting a timer;
performing the following steps for each of the first terminals:
respectively acquiring the position information of the first terminal and the position information of the vehicle machine according to the terminal information of the first terminal and the vehicle machine information of the vehicle machine;
judging whether the position information of the first terminal and the position information of the vehicle machine meet preset conditions or not, and further judging whether the timing of the timer is finished or not when the position information of the first terminal and the position information of the vehicle machine meet the preset conditions; when the position information of the first terminal and the position information of the vehicle machine are judged not to meet the preset condition, determining that the position information of the first terminal is not matched with the position information of the vehicle machine;
when the timing of the timer is judged not to be finished, monitoring whether the position information of the first terminal or the vehicle machine changes in real time; when the position information of the first terminal or the vehicle machine is monitored to be changed, the step of respectively acquiring the position information of the first terminal and the position information of the vehicle machine according to the terminal information of the first terminal and the vehicle machine information of the vehicle machine is continuously executed;
when the timing of the timer is judged to be finished, determining that the position information of the first terminal is matched with the position information of the vehicle machine;
or, the step of judging whether there is at least one matching between the position information of the first terminal and the position information of the car machine according to the position information of each first terminal and the position information of the car machine specifically includes:
initializing the change times to zero;
performing the following steps for each of the first terminals:
respectively acquiring the position information of the first terminal and the position information of the vehicle machine according to the terminal information of the first terminal and the vehicle machine information of the vehicle machine;
judging whether the position information of the first terminal and the position information of the vehicle-mounted device meet preset conditions or not, adding 1 to the change times when the position information of the first terminal and the position information of the vehicle-mounted device meet the preset conditions, and further judging whether the change times exceed a preset threshold value or not; when the position information of the first terminal and the position information of the vehicle machine are judged not to meet the preset condition, determining that the position information of the first terminal is not matched with the position information of the vehicle machine;
when the change times are judged not to exceed a preset threshold value, monitoring whether the position information of the first terminal or the vehicle machine changes in real time; when the position information of the first terminal or the vehicle machine is monitored to be changed, returning to the step of executing the step of respectively acquiring the position information of the first terminal and the position information of the vehicle machine according to the terminal information of the first terminal and the vehicle machine information of the vehicle machine;
and when the change times are judged to exceed a preset threshold value, determining that the position information of the first terminal is matched with the position information of the vehicle machine.
2. The terminal bluetooth switch control method according to claim 1, wherein the step of determining whether at least one first terminal matched with the car machine exists in the inquiry result specifically comprises:
judging whether the accumulated matching times of the terminal and the vehicle machine exceed a preset threshold or not aiming at each terminal contained in the query result;
and when the accumulated matching times of the terminal corresponding to the vehicle machine exceeds a preset threshold value, determining that the terminal is a first terminal matched with the vehicle machine.
3. The terminal Bluetooth switch control method according to claim 1, wherein the Bluetooth start instruction includes a Bluetooth address of the vehicle machine, so that the target terminal automatically searches for the Bluetooth address of the vehicle machine and automatically connects after receiving the Bluetooth start instruction.
4. The method for controlling the bluetooth switch of the terminal according to claim 1, further comprising, after the step of sending the bluetooth on command to the target terminal:
when the number of the target terminals is multiple, receiving a selection result sent by a vehicle machine, wherein the selection result comprises terminal information of the selected terminal, and the terminal information of the selected terminal is sent to the vehicle machine by a terminal which is in Bluetooth connection with the vehicle machine;
and according to the selection result, sending a Bluetooth closing instruction to other target terminals which are not successfully connected with the vehicle machine, so that the target terminals which are not successfully connected with the vehicle machine automatically close own Bluetooth switches after receiving the Bluetooth closing instruction.
5. The method for controlling the bluetooth switch of the terminal according to claim 1, further comprising, after the step of sending the bluetooth on command to the target terminal:
receiving the corresponding relation between the vehicle information and the terminal information sent by the vehicle machine; the corresponding relation between the vehicle machine information and the terminal information represents the corresponding relation between the vehicle machine information of the vehicle machine and the terminal information of the terminal which is in Bluetooth connection with the vehicle machine, and the terminal information is sent to the vehicle machine by the terminal which is in Bluetooth connection with the vehicle machine;
inquiring whether a preset vehicle information and terminal information matching database already contains the corresponding relation between the vehicle information and the terminal information;
when the corresponding relation between the vehicle information and the terminal information is found in the vehicle information and terminal information matching database, adding 1 to the accumulated matching times of the corresponding relation between the vehicle information and the terminal information in the vehicle information and terminal information matching database;
when the corresponding relation table of the vehicle information and the terminal information does not contain the corresponding relation of the vehicle information and the terminal information, storing the corresponding relation of the vehicle information and the terminal information into a matching database of the vehicle information and the terminal information, and recording the cumulative matching times of the corresponding relation of the vehicle information and the terminal information as 1.
6. The terminal Bluetooth switch control method according to any one of claims 1-5, wherein the in-vehicle information includes in-vehicle SIM card identification information of the in-vehicle; the terminal information comprises terminal SIM card identification information of the terminal;
the position information of the first terminal comprises information of a base station cell connected with a terminal SIM card of the first terminal; the position information of the vehicle machine comprises information of a base station cell connected with a vehicle machine SIM card of the vehicle machine.
7. A backend server comprising a storage module in which a computer program is stored, wherein the computer program is adapted to perform the method of any one of claims 1 to 6 when executed.
8. A terminal, comprising:
a receiving unit, configured to receive a bluetooth activation instruction sent by a background server after performing the method according to any one of claims 1 to 6;
and the Bluetooth self-starting unit is used for automatically starting the Bluetooth switch after the receiving unit receives the Bluetooth starting instruction.
9. The terminal of claim 8, wherein the terminal further comprises: the automatic connection unit and the Bluetooth self-closing unit;
the automatic connection unit is used for automatically searching the Bluetooth address of the vehicle-mounted device according to the Bluetooth address of the vehicle-mounted device contained in the Bluetooth starting instruction and automatically connecting after the receiving unit receives the Bluetooth starting instruction;
the Bluetooth self-closing unit is used for automatically closing the Bluetooth switch of the vehicle machine after detecting that the Bluetooth address of the vehicle machine is not searched by the automatic connection unit within preset time, and is also used for automatically closing the Bluetooth switch of the vehicle machine after receiving a Bluetooth closing instruction sent by the server.
CN201910882462.3A 2019-09-18 2019-09-18 Terminal Bluetooth switch control method, server and terminal Active CN110602636B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910882462.3A CN110602636B (en) 2019-09-18 2019-09-18 Terminal Bluetooth switch control method, server and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910882462.3A CN110602636B (en) 2019-09-18 2019-09-18 Terminal Bluetooth switch control method, server and terminal

Publications (2)

Publication Number Publication Date
CN110602636A CN110602636A (en) 2019-12-20
CN110602636B true CN110602636B (en) 2021-10-22

Family

ID=68860765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910882462.3A Active CN110602636B (en) 2019-09-18 2019-09-18 Terminal Bluetooth switch control method, server and terminal

Country Status (1)

Country Link
CN (1) CN110602636B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103533671A (en) * 2013-11-12 2014-01-22 深圳如果技术有限公司 Bluetooth connection method, mobile terminal and vehicle terminal
CN104348953A (en) * 2013-07-26 2015-02-11 深圳市赛格导航科技股份有限公司 System for automatically matching vehicle-borne device and mobile phone terminal based on Bluetooth and method thereof
CN105491684A (en) * 2015-11-17 2016-04-13 广东好帮手电子科技股份有限公司 Method and system for automatically connecting on-board host computer and Bluetooth device
CN105578400A (en) * 2016-02-22 2016-05-11 浙江大学 Renting managing method of public vehicles under offline condition
CN105657166A (en) * 2016-01-04 2016-06-08 重庆长安汽车股份有限公司 Body control system and method based on Bluetooth communication
CN105682011A (en) * 2016-03-22 2016-06-15 广东欧珀移动通信有限公司 Playback device Bluetooth module control method and device, and audio and video playing system
CN105812562A (en) * 2016-03-09 2016-07-27 广东欧珀移动通信有限公司 Bluetooth control method and device applied to mobile terminal
CN107241690A (en) * 2017-07-13 2017-10-10 湖南海翼电子商务股份有限公司 The interconnection means and method being connected automatically for automobile and mobile terminal
CN107948958A (en) * 2017-11-16 2018-04-20 中科创达软件股份有限公司 A kind of method, apparatus and central equipment that information is transmitted based on BLE
CN108174017A (en) * 2017-11-29 2018-06-15 维沃移动通信有限公司 A kind of bluetooth open method and mobile terminal
CN108966194A (en) * 2018-07-24 2018-12-07 重庆长安汽车股份有限公司 Realize the system and method for mobile phone and the noninductive connection of car-mounted terminal bluetooth
US10200849B1 (en) * 2018-01-26 2019-02-05 Toyota Motor Engineering & Manufacturing North America, Inc. Systems and methods for auto-pair via a plurality of protocols
CN109413629A (en) * 2018-11-20 2019-03-01 智车优行科技(北京)有限公司 Bluetooth reconnection method

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008306358A (en) * 2007-06-06 2008-12-18 Denso Corp Short-range vehicle radio communication system, portable telephone with short-range radio communication function, and in-vehicle device with the short-range radio communication function
US20130072174A1 (en) * 2011-03-30 2013-03-21 Don Enty Method and apparatus for disabling certain communication features of a vehicle drivers wireless phone
US20160316319A1 (en) * 2012-12-14 2016-10-27 Dean A. Craine Driver cellular telephone text and email automatic deactivation system and method
CN203368573U (en) * 2013-07-26 2013-12-25 深圳市赛格导航科技股份有限公司 System enabling vehicle-mounted device to match mobile phone terminal automatically based on Bluetooth
CN105472193B (en) * 2015-11-25 2018-08-31 东莞市智捷自动化设备有限公司 A kind of on-vehicle safety information automatic opening method based on intelligent terminal
CN106658356B (en) * 2016-09-28 2020-08-14 Oppo广东移动通信有限公司 Connection method and device for Bluetooth communication
CN107623896A (en) * 2017-09-30 2018-01-23 珠海市魅族科技有限公司 Connect method, apparatus, mobile terminal and the storage medium of on-vehicle Bluetooth
US11067048B2 (en) * 2017-11-09 2021-07-20 Ford Global Technologies, Llc Vehicle device management
CN109788438A (en) * 2019-02-11 2019-05-21 胡金星 A kind of intelligent navigation car networking system based on big data

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104348953A (en) * 2013-07-26 2015-02-11 深圳市赛格导航科技股份有限公司 System for automatically matching vehicle-borne device and mobile phone terminal based on Bluetooth and method thereof
CN103533671A (en) * 2013-11-12 2014-01-22 深圳如果技术有限公司 Bluetooth connection method, mobile terminal and vehicle terminal
CN105491684A (en) * 2015-11-17 2016-04-13 广东好帮手电子科技股份有限公司 Method and system for automatically connecting on-board host computer and Bluetooth device
CN105657166A (en) * 2016-01-04 2016-06-08 重庆长安汽车股份有限公司 Body control system and method based on Bluetooth communication
CN105578400A (en) * 2016-02-22 2016-05-11 浙江大学 Renting managing method of public vehicles under offline condition
CN105812562A (en) * 2016-03-09 2016-07-27 广东欧珀移动通信有限公司 Bluetooth control method and device applied to mobile terminal
CN105682011A (en) * 2016-03-22 2016-06-15 广东欧珀移动通信有限公司 Playback device Bluetooth module control method and device, and audio and video playing system
CN107241690A (en) * 2017-07-13 2017-10-10 湖南海翼电子商务股份有限公司 The interconnection means and method being connected automatically for automobile and mobile terminal
CN107948958A (en) * 2017-11-16 2018-04-20 中科创达软件股份有限公司 A kind of method, apparatus and central equipment that information is transmitted based on BLE
CN108174017A (en) * 2017-11-29 2018-06-15 维沃移动通信有限公司 A kind of bluetooth open method and mobile terminal
US10200849B1 (en) * 2018-01-26 2019-02-05 Toyota Motor Engineering & Manufacturing North America, Inc. Systems and methods for auto-pair via a plurality of protocols
CN108966194A (en) * 2018-07-24 2018-12-07 重庆长安汽车股份有限公司 Realize the system and method for mobile phone and the noninductive connection of car-mounted terminal bluetooth
CN109413629A (en) * 2018-11-20 2019-03-01 智车优行科技(北京)有限公司 Bluetooth reconnection method

Also Published As

Publication number Publication date
CN110602636A (en) 2019-12-20

Similar Documents

Publication Publication Date Title
US8560022B2 (en) In-vehicle handsfree apparatus
CN105960004B (en) Mobile terminal positioning function control method and mobile terminal
CN102983890A (en) Method and device of pairing connection of equipment
CN105933986B (en) Method for identifying communication between portable electronic device and motor vehicle
CN102299729B (en) A kind of information transferring method and device
CN101461221A (en) Improved short range connectivity usability by using contact information
CN103037476A (en) Control method for wireless network access and control device for wireless network access
CN103596635A (en) Method for controlling wireless fidelity device in terminal, controlling device and terminal
EP3435639A1 (en) Mobile terminal and contact adding and sharing method thereof
US20060084381A1 (en) Method for establishing a connection between a mobile device and a second device
EP3099043A1 (en) Method and system for bluetooth-based transfer of contact list information
CN106255036A (en) A kind of eSIM changing method and terminal unit
CN105644472A (en) Rapid positioning method and vehicle-mounted system
CN105677338A (en) Application program display method and device
CN101958972A (en) Mobile phone Bluetooth-based location recognition method and mobile phone
US9451437B2 (en) System, apparatus, method, and computer-readable recording medium for changing user terminal settings
CN105282294A (en) Voice dialing method and device
CN110602636B (en) Terminal Bluetooth switch control method, server and terminal
CN107708064B (en) Method and system for positioning mobile phone by vehicle-mounted equipment
CN106487990B (en) Electronic device and information display control method
CN103314273B (en) Signal conditioning package
CN104244447A (en) Communication terminal and method and device for having access to user identification module of communication terminal remotely
KR101405554B1 (en) System for pairing Bluetooth automatically
CN106375551B (en) Information interaction method, device and terminal
CN110753308B (en) Positioning device and method for positioning 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