CN114257681A - Method for controlling terminal to start driving mode, terminal and storage medium - Google Patents
Method for controlling terminal to start driving mode, terminal and storage medium Download PDFInfo
- Publication number
- CN114257681A CN114257681A CN202011023272.5A CN202011023272A CN114257681A CN 114257681 A CN114257681 A CN 114257681A CN 202011023272 A CN202011023272 A CN 202011023272A CN 114257681 A CN114257681 A CN 114257681A
- Authority
- CN
- China
- Prior art keywords
- terminal
- driving
- automobile
- equipment
- period
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 238000004891 communication Methods 0.000 claims abstract description 56
- 238000004422 calculation algorithm Methods 0.000 claims description 14
- 238000003064 k means clustering Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 238000012549 training Methods 0.000 description 6
- 238000004590 computer program Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000006399 behavior Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 238000010408 sweeping Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 210000001072 colon Anatomy 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Landscapes
- Telephone Function (AREA)
Abstract
The embodiment of the invention relates to the technical field of terminals, and discloses a method for controlling a terminal to start a driving mode, a terminal and a storage medium. The method comprises the steps of judging whether equipment in communication connection with the terminal is an automobile or not, if so, further judging whether current time falls into a preset driving time period or not, and if so, controlling the terminal to start a driving mode. That is, the method determines that the terminal automatically starts the driving mode through the communication connection scene of the terminal and the preset driving time according with the driving habit of the user, does not need manual setting, provides convenience for the user and enhances the driving safety.
Description
Technical Field
The embodiment of the invention relates to the technical field of terminals, in particular to a method for controlling a terminal to start a driving mode, a terminal and a storage medium.
Background
With the popularization of mobile phones and automobiles, a scene of using the mobile phone is sometimes inevitable in the driving process, and the direct use of the mobile phone is a dangerous and illegal behavior from the safety point of view, so that a plurality of mobile phone manufacturers add the function of a driving mode at present. That is, after the mobile phone starts the driving mode, the voice broadcasting service can be provided for the user, such as the caller name of the incoming call and the sender name of the short message, so as to help the user to know the importance degree of the call or the short message, thereby facilitating the user to select and process the call or the short message. In addition, the system can help the user not to be disturbed by incoming calls or short messages when driving.
However, the current driving mode is very non-humanized, and requires the user to actively set the starting and the use, but many users almost ignore the function, or often forget to set the driving mode before driving.
Disclosure of Invention
The technical problem mainly solved by the embodiments of the present invention is to provide a method, a terminal and a storage medium for controlling a terminal to start a driving mode, so that the terminal can automatically start the driving mode without manual setting.
In order to solve the technical problem, in a first aspect, an embodiment of the present invention provides a method for controlling a terminal to start a driving mode, including:
acquiring equipment information of equipment in communication connection with the terminal;
judging whether the equipment is an automobile or not according to the equipment information;
if yes, judging whether the current time falls into a preset driving time period or not;
and if the current time falls into the preset driving time period, controlling the terminal to start a driving mode.
In order to solve the above technical problem, in a second aspect, an embodiment of the present invention provides an apparatus for controlling a terminal to start a driving mode, including:
the acquisition module is used for acquiring the equipment information of equipment in communication connection with the terminal;
the first judgment module is used for judging whether the equipment is an automobile or not according to the equipment information;
the second judgment module is used for judging whether the current time falls into a preset driving time period or not if the equipment is an automobile;
and the first control module is used for controlling the terminal to start the driving mode if the current time falls into the preset driving time period.
In order to solve the above technical problem, in a third aspect, an embodiment of the present invention provides a terminal, including:
at least one processor, and
a memory communicatively coupled to the at least one processor, wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect as described above.
In order to solve the technical problem described above, in a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium storing computer-executable instructions for causing a terminal to perform the method described in the first aspect.
The embodiment of the invention has the following beneficial effects: different from the situation in the prior art, in the method for controlling the terminal to start the driving mode provided by the embodiment of the invention, whether the device in communication connection with the terminal is an automobile is judged, if so, whether the current time falls into a preset driving time period is further judged, and if the current time falls into the preset driving time period, the terminal is controlled to start the driving mode. That is, the method determines that the terminal automatically starts the driving mode through the communication connection scene of the terminal and the preset driving time according with the driving habit of the user, does not need manual setting, provides convenience for the user and enhances the driving safety.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
FIG. 1 is a schematic block diagram of an implementation environment in accordance with various embodiments of the present invention;
fig. 2 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for controlling a terminal to start a driving mode according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a display of a communication name of a device in a terminal according to an embodiment of the present invention;
FIG. 5 is a schematic sub-flow chart of step 220 of the method shown in FIG. 3;
FIG. 6 is a schematic sub-flow chart of step 221 of the method of FIG. 5;
FIG. 7 is a schematic sub-flow chart of step 222 of the method of FIG. 5;
fig. 8 is a flowchart illustrating a method for controlling a terminal to start a driving mode according to another embodiment of the present invention;
FIG. 9 is a schematic diagram illustrating a calculation of a preset driving period according to an embodiment of the present invention;
FIG. 10 is a schematic sub-flow chart of step 290 of the method of FIG. 8;
fig. 11 is a schematic structural diagram of a device for controlling a terminal to start a driving mode according to an embodiment of the present invention.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that various changes and modifications can be made by those skilled in the art without departing from the spirit of the invention. All falling within the scope of the present invention.
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that, if not conflicted, the various features of the embodiments of the invention may be combined with each other within the scope of protection of the present application. Additionally, while functional block divisions are performed in device schematics, with logical sequences shown in flowcharts, in some cases, the steps shown or described may be performed in a different order than the block divisions in the devices, or in the flowcharts. Further, the terms "first," "second," "third," and the like, as used herein, do not limit the data and the execution order, but merely distinguish the same items or similar items having substantially the same functions and actions.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Before describing the method for controlling a terminal to start a driving mode provided by the present application, an application scenario related to the present application is first described, and fig. 1 is a schematic diagram of an implementation environment related to various embodiments of the present application. The implementation environment may include: a terminal 10, a device 20 communicatively connected to said terminal. The terminal 10 and the device 20 may be in communication connection in a wireless manner or in a wired manner, and in fig. 1, the device 20 is in communication connection with the terminal 10 in a wireless manner. Wherein, this communication connection mode includes: bluetooth, Wi-Fi (Wireless Fidelity), NFC (Near Field Communication), and the like.
The terminal 10 may be an electronic device having functions of talking, receiving and sending messages, and the electronic device may be various handheld devices having wireless communication functions, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to wireless modems, and various forms of User Equipment (UE), Mobile Stations (MS), terminal Equipment (terminal device), and the like, for example, a smart phone, a tablet computer, a smart watch, a PDA (Personal Digital Assistant), and the like.
The device 20 is a device located in the connection scene of the terminal 10, and may be various devices having a wireless communication function, including the above electronic devices, and household appliances, trip devices, and the like, which are in communication connection with the terminal in daily life, for example, a bluetooth sound, a sweeping robot, a balance car, or an automobile.
In some embodiments, the number of the devices may be one or multiple, that is, the terminal may be communicatively connected to multiple devices at the same time. In the implementation environment shown in fig. 1, the terminal 10 is a smart phone, and the device 20 is an automobile.
Referring to fig. 2, fig. 2 is a block diagram of a terminal 10 according to an embodiment of the present invention, where the terminal 10 may be configured to execute a method for controlling the terminal to turn on a driving mode according to an embodiment of the present invention, and it should be understood that the hardware structure of the terminal 10 shown in fig. 2 is only an example, and the terminal includes at least one processor 11 (one processor is taken as an example in fig. 2) and a memory 12, which are communicatively connected through a bus or in other manners.
The processor 11 is configured to provide computing and control capabilities to control the terminal 10 to perform corresponding tasks, for example, control the terminal 10 to perform any method for controlling the terminal to start a driving mode according to the following embodiments of the present invention.
The memory 12, which is a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the method for controlling a terminal to start a driving mode according to an embodiment of the present invention. The processor 11 may implement the method for controlling the terminal to turn on the driving mode in any of the method embodiments described below by running non-transitory software programs, instructions, and modules stored in the memory 12. In particular, the memory 12 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 12 may also include memory located remotely from the processor 11, which may be connected to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Referring to fig. 3, the present embodiment provides a method for controlling a terminal to turn on a driving mode, which is applied to a terminal, where the terminal may be the terminal 10 in the implementation environment shown in fig. 1 and is executed by the processor 11 of the terminal 10 shown in fig. 2. As shown in fig. 3, the method 200 includes, but is not limited to, the following steps:
step 210: and acquiring the equipment information of equipment in communication connection with the terminal.
The device may be a device in the implementation environment shown in fig. 1, and may be, for example, a stereo, a headset, a sweeping robot, a balance car, or an automobile. When the terminal needs to interact with the equipment, the terminal can be in communication connection with the equipment. The communication connection mode comprises: bluetooth, Wi-Fi (Wireless Fidelity), NFC (Near Field Communication), and the like.
It will be appreciated that each device has its own device information. The device information reflects a communication name and a communication address of the device, wherein the communication name is a name displayed in the terminal when the device is in communication connection with the terminal, such as a bluetooth name or a wireless local area network name, and the communication address is an identification code written into device hardware when the device leaves a factory, such as a bluetooth Mac address and a wireless local area network address.
And when the equipment is in communication connection with the terminal, the communication name of the equipment is displayed in the terminal. That is, when the terminal makes a communication connection with the device, the communication name of the device to which the terminal is in communication connection may be acquired from the terminal. For example, as shown in fig. 4, when the terminal is a smartphone and the communication connection is bluetooth, the bluetooth function of the smartphone is turned on, and the communication name of the device communicatively connected to the smartphone, such as "vehicle mp 3" and "bluetooth headset" in fig. 4(a), can be viewed. When the communication connection is a wireless local area network, the wireless local area network function of the smart phone is turned on, and the communication name of the device in communication connection with the smart phone, such as "vehicle-mounted wifi" in fig. 4(b), can be checked, so that the type of the device in communication connection with the smart phone can be determined by the communication name. It is to be understood that the viewing methods shown in fig. 4(a) and 4(b) are only for exemplary illustration of the communication name, and are not a method in which the terminal acquires the communication name of the device. In addition, when the terminal is in communication connection with the device, the communication address of the device can be acquired by the terminal. That is, the device information of the device communicatively connected to the terminal may be sent to the processor of the terminal by the communication module of the terminal, or may be sent to the terminal by another module or the device, which is not particularly limited herein.
Step 220: and judging whether the equipment is an automobile or not according to the equipment information, and if so, executing step 230.
And identifying the equipment in communication connection with the terminal, specifically, acquiring the type of the equipment through the equipment information of the equipment. For example, the type of the device may be obtained from a field of the communication name, and the type of the device may also be obtained from a communication address corresponding to the communication name.
When the communication connection is a bluetooth connection, the device information includes a bluetooth name and a bluetooth Mac address of the device. Specifically, in some embodiments, referring to fig. 5, the step 220 includes a step 221 and/or a step 222.
Step 221: and determining whether the equipment is an automobile or not according to the Bluetooth name.
The bluetooth name is one of the communication names in step 210, and is a communication name when bluetooth is used for communication connection. Generally, the bluetooth name is related to the type of the device, and can be set by self, so that whether the device is an automobile can be quickly determined according to the characteristics of the bluetooth name. For example, in some bluetooth names, car name fields such as "car" and "car" are included, and the type of the device can be determined by identifying whether these car names are included in the bluetooth names, for example, when the bluetooth name is "car mp 3", the corresponding device can be determined as a car by identifying that the bluetooth name includes the field "car".
Specifically, in some embodiments, referring to fig. 6, the step 221 includes:
step 2211: judging whether the Bluetooth name comprises an automobile characteristic field, if so, executing step 2212, and if not, executing step 2213
Step 2212: determining that the device is an automobile.
Step 2213: determining that the device is not an automobile.
Wherein, the automobile characteristic field is at least one of automobile brand, automobile model and automobile name. If the Bluetooth name comprises at least one of the automobile brand, the automobile model or the automobile name, determining that the equipment is the automobile, otherwise, determining that the equipment is not the automobile. It is understood that the car feature field is preset, and may be a database determined by collecting bluetooth names carried by various car manufacturers. Thus, the field identification of the Bluetooth name is matched with the automobile characteristic field to determine whether the equipment is an automobile.
Step 222: and determining whether the equipment is an automobile or not according to the Bluetooth Mac address.
The bluetooth Mac address is an identification code written inside hardware when produced by a device manufacturer, and is a unique network identifier of the device. The bluetooth Mac address is composed of 6 bytes, 16 digits, and is usually represented as 12 16 digits, and every 2 16 digits are separated by a colon, for example, 08: 00: 20: 0A: 8C: 6D, the first 3 bytes of which represent OUI (organization Unique identifier), is a code distributed by the registration management organization of IEEE to different manufacturers to distinguish different manufacturers, and the last 3 bytes are distributed by the manufacturers. That is, the bluetooth Mac address characterizes the type of device, so that it can be determined whether the device is an automobile or not based on the bluetooth Mac address.
Specifically, in some embodiments, referring to fig. 7, the step 222 includes:
step 2221: and acquiring the manufacturer of the equipment according to the Bluetooth Mac address.
Step 2222: and judging whether the manufacturer is an automobile manufacturer, if so, executing a step 2223, and if not, executing a step 2224.
Step 2223: determining that the device is an automobile.
Step 2224: determining that the device is not an automobile.
The first 3 fields of the bluetooth Mac address represent the manufacturer of the device and are the unique identifier of the device manufacturer, and the manufacturer of the device can be determined by comparing the first 3 fields of the bluetooth Mac address with the existing OUI database. And further, judging whether the manufacturer is an automobile manufacturer, if so, determining that the equipment is the automobile, and if not, determining that the equipment is not the automobile.
It should be noted that, when determining whether the device is an automobile, in some embodiments, the step 221 may be used alone for the identification determination, and in other embodiments, the step 222 may be used alone for the identification determination. In still other embodiments, the combination of step 221 and step 222 may be used to perform the identification determination, for example, it may be determined whether the device is a car by bluetooth name, and when it is determined that the device is not a car, it may be further determined whether the device is a car by bluetooth Mac address, and the combination of step 221 and step 222 may be used to accurately determine whether the device is a car. It is understood that in other embodiments, the step 221 and the step 222 are not sequential, and may be executed in parallel, so that the execution may be switched.
Step 230: and judging whether the current time falls into a preset driving time period, if so, executing the step 240, and if not, executing the step 250.
Step 240: and controlling the terminal to start a driving mode.
Step 250: and acquiring the current speed of the terminal, and judging whether the current speed of the terminal is greater than or equal to a preset speed threshold, if so, executing step 260.
Step 260: and controlling the terminal to start a driving mode.
And when the equipment in communication connection with the terminal is determined to be the automobile, the situation that the user is near the automobile or in the automobile is indicated, whether the user drives the automobile is further determined through the driving habit of the user, and therefore whether the terminal needs to start the driving mode is determined.
The preset driving time period is a time period set according to the driving habits of the user, and for example, the preset driving time period may be a time period set according to the working hours of the user, wherein the working day is 7: 00-9: 00, 6:00-8 at night: 00. of course, the preset driving time period may also be determined according to the historical driving time period data of the user, so as to better conform to the driving habits of the user.
In the embodiment, the method determines that the terminal automatically starts the driving mode through the communication connection scene of the terminal and the preset driving time according with the driving habit of the user, does not need manual setting, provides convenience for the user and enhances the driving safety.
In some embodiments, the preset driving period includes at least one driving period, for example, working days including 2 driving periods, non-working days including 1 or 3 driving periods, etc.
To determine driving periods that conform to the driving habits of the user, in some embodiments, referring to fig. 8, the method further comprises:
step 270: at least two historical driving period data are acquired.
Step 280: and performing clustering algorithm learning on the at least two historical driving period data to obtain at least one clustering center.
Step 290: and acquiring at least one driving time interval according to the at least one clustering center.
The historical driving period data is effective data of historical driving of the user, and a historical driving period may include a start time and an end time of one driving, or a historical driving time may include a start time and a duration of one driving. The at least two historical driving period data are a sample data set for recording the historical driving period of the user, and are equivalent to a training set.
And inputting the training set into a clustering algorithm model for training, and classifying the training set to obtain at least one cluster. Each cluster has a respective cluster center, and the Euclidean distance from a point in each cluster to the cluster center is the smallest, so that the at least two historical driving periods are classified, and each class corresponds to one driving period. For each cluster type, a driving period that can represent this cluster can be obtained according to its cluster center. It is understood that the clustering algorithm may be a K-means clustering algorithm, and the K-means clustering algorithm can rapidly and accurately obtain the clustering center. In other embodiments, the clustering algorithm may also be a common hierarchical clustering, a density-based scanning clustering, or a gaussian clustering algorithm.
As shown in fig. 9, taking the historical driving period including the start time and duration of one driving as an example, the distribution scatter diagram of the training set is shown in fig. 9(a), with the abscissa being the driving start time and the ordinate being the driving duration. And (3) inputting the training set into a K-means clustering algorithm for learning, setting K to be 2, classifying the data in the graph (a) in the graph 9 to obtain two clusters (cluster1 and cluster2) in the graph (B) in the graph 9, and calculating clustering centers A and B. The cluster center A is the geometric center of the cluster1 and can reflect the period of the cluster1, and the cluster center B is the geometric center of the cluster2 and can reflect the period of the cluster 2. Thus, the corresponding driving time period can be acquired through the center of each cluster. It should be noted that the K value is set according to the trip habit of the user, for example, if the user trips twice a day on a working day, the K value is 2, and if the user trips 3 times on a non-working day, the K value is 3. It can be understood that the preset driving time period can be divided into a preset driving time period of a working day and a preset driving time of a non-working day, so that the preset driving time period is more matched with the daily driving habits of the user.
In some embodiments, taking the cluster center as the driving period, specifically, referring to fig. 10, the step 290 includes:
step 291: and determining a starting point of the driving period as the driving starting time of the corresponding clustering center.
Step 292: determining an end point of the driving period as a time point of a sum of a start time of the corresponding cluster center and a driving duration of the corresponding cluster center.
In this embodiment, the start time of the cluster center learned by the clustering algorithm is used as the start point of the driving period, and the time point of the sum of the start time of the cluster center and the driving duration is used as the end point of the driving period, for example, if the cluster center corresponding to the driving period is (x)1,y1) Wherein x is1To start time, y1For the duration of the drive, the starting point of the drive period is x1The end point is x1+y1Corresponding point in time. The clustering center can accurately reflect the historical driving habits of the users, so that the historical driving habits of the users can be accurately reflected in the driving time period, and further, the terminal can intelligently and accurately start the driving mode.
It is understood that, in other embodiments, the driving time period may be obtained by deforming the cluster center, for example, the starting point of the driving time period is a first preset percentage of the starting time of the corresponding cluster center, and/or the ending point of the driving time period is a time point of the sum of a second preset percentage of the driving duration of the corresponding cluster center and the preset percentage of the driving starting time, for example, if the cluster center corresponding to the driving time period is (x)2,y2) Wherein x is2To start time, y2For a driving duration, the start of the driving period may be 0.8 ×2The end point may be 0.8x2+1.2y2Time ofAnd (4) point. In this implementation, the cluster center is adjusted by setting the first preset percentage and the second preset percentage, for example, the driving time period is widened, so as to avoid the driving mode which is not normally started due to omission. It is understood that in other embodiments, the driving time interval may also be reduced by setting the first preset percentage and the second preset percentage, for example, the starting point of the driving time interval is 1.1 ×2End point of 1.1 × (X)2+0.9y2To avoid an abnormal starting of the driving mode due to erroneous determination. It is understood that the first preset percentage and the second preset percentage may be set according to the actual situation and requirement of the user.
In this embodiment, the preset driving period is obtained by performing clustering algorithm learning on the historical driving period of the user, and the driving habit of the user can be reflected better, so that it is beneficial to accurately determine whether the user is in a driving state according to whether the current time falls into the preset driving period in the subsequent step 230.
If the equipment in communication connection with the terminal is an automobile and the current time falls into the preset driving time period, the terminal is automatically controlled to start a driving mode if the user needs to drive in the same way as daily, the setting of the user is not needed, convenience is provided for the user, and the driving safety is enhanced.
It will be appreciated that the travel time of the user may also be random, not every time for a fixed period of time, i.e. there is an unusual driving behaviour, e.g. a driving trip on a temporary business trip on a weekday. In order to match the non-daily driving behavior of the user, in some embodiments, whether the user drives a trip is further identified by the speed of the terminal. Specifically, the current speed of the terminal is obtained, whether the current speed of the terminal is greater than or equal to a preset speed threshold value or not is judged, and if yes, the terminal is controlled to start a driving mode.
It is understood that the current speed of the terminal may be obtained through a GPS positioning system or an acceleration sensor built in the terminal, or may be a received vehicle speed, and the obtaining manner of the current speed is not limited herein. It should be noted that the preset speed threshold is an empirical value set manually, and may be set according to actual conditions.
In this embodiment, for the daily driving trip of the terminal user, the terminal automatically starts the driving mode without manual setting according to the communication connection scene of the terminal and the preset driving time according with the driving habit of the user; and for the non-daily driving trip of the terminal user, the automatic terminal starting driving mode is further determined according to the current speed of the terminal, the terminal is identified successively, the control is accurate and has no omission, convenience is provided for the user, and the driving safety is enhanced.
It should be noted that, in the foregoing embodiments, a certain order does not necessarily exist between the steps, and it can be understood by those skilled in the art from the description of the embodiments of the present invention that, in different embodiments, the steps may have different execution orders, that is, may be executed in parallel, may also be executed interchangeably, and the like.
As another aspect of the embodiments of the present invention, an apparatus for controlling a terminal to turn on a driving mode is provided. The device may be a software module, the software module includes a plurality of instructions, and the instructions are stored in a memory, and the processor may access the memory and call the instructions to execute the instructions, so as to complete the method for controlling the terminal to start the driving mode described in each of the above embodiments.
In some embodiments, the device for controlling the terminal to start the driving mode may also be built by hardware devices, for example, the device may be built by one or more than two chips, and each chip may work in coordination with each other to complete the method for controlling the terminal to start the driving mode described in the above embodiments. For another example, the apparatus may also be constructed from various types of logic devices, such as a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), a single chip, an arm (acorn RISC machine), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components.
Referring to fig. 11, fig. 11 is a device 300 for controlling a terminal to start a driving mode according to an embodiment of the present invention, where the device 300 includes a first obtaining module 310, a first determining module 320, a second determining module 330, and a first control module 340.
The first obtaining module 310 is configured to obtain a device communicatively connected to the terminal. The first determining module 320 is configured to determine whether the device is an automobile. The second determining module 330 is configured to determine whether the current time falls within a preset driving time period if the device is an automobile. The first control module 340 is configured to control the terminal to start a driving mode if the current time falls within the preset driving time period.
In this embodiment, the apparatus 300 for controlling the terminal to start the driving mode may determine that the terminal automatically starts the driving mode through the communication connection scene and the preset driving time of the terminal, and does not need to manually set, thereby providing convenience for the user and enhancing driving safety.
In some embodiments, the apparatus 300 further comprises a third determining module 350 and a second controlling module 360. The third determining module 350 is configured to obtain the current speed of the terminal if the current time does not fall within a preset driving time period, and determine whether the current speed of the terminal is greater than or equal to a preset speed threshold. The second control module 360 is configured to control the terminal to start a driving mode if the current speed of the terminal is greater than or equal to a preset speed threshold.
In some embodiments, the first determining module further includes a first determining unit and a second determining unit (not shown). The first judging unit is used for: and acquiring the Bluetooth name of the equipment, and determining whether the equipment is an automobile or not according to the Bluetooth name. The second judgment unit is configured to: and acquiring a Bluetooth Mac address of the equipment, and determining whether the equipment is an automobile or not according to the Bluetooth Mac address.
In some embodiments, the first determining unit is specifically configured to: judging whether the Bluetooth name comprises an automobile characteristic field, wherein the automobile characteristic field is at least one of automobile brand, automobile model and automobile name; if so, determining that the equipment is an automobile; if not, determining that the equipment is not the automobile.
In some embodiments, the second determining unit is specifically configured to: acquiring a manufacturer of the equipment according to the Bluetooth Mac address; judging whether the manufacturer is an automobile manufacturer; if so, determining that the equipment is an automobile; if not, determining that the equipment is not the automobile.
In some embodiments, the preset driving period includes at least one driving period, and the apparatus 300 further includes a second obtaining module 370, a third obtaining module 380, and a fourth obtaining module 390.
The second obtaining module 370 is configured to obtain at least two historical driving period data. The third obtaining module 380 is configured to perform clustering algorithm learning on the at least two pieces of historical driving period data to obtain at least one clustering center. The fourth obtaining module 390 is configured to obtain at least one driving period according to the at least one cluster center.
In some embodiments, the historical driving period data includes a driving start time and a driving duration, and the fourth obtaining module 390 is specifically configured to: determining an upper limit of the driving period as the starting time of the corresponding cluster center, and determining a lower limit of the driving period as the sum of the starting time of the corresponding cluster center and the driving duration of the corresponding cluster center.
It should be noted that the apparatus 300 for controlling a terminal to start a driving mode can execute the method for controlling a terminal to start a driving mode provided by the embodiment of the present invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in the embodiment of the apparatus 300 for controlling a terminal to start a driving mode, reference may be made to the method for controlling a terminal to start a driving mode provided in the embodiment of the present invention.
Embodiments of the present invention also provide a non-transitory computer-readable storage medium, where computer-executable instructions are stored in the non-transitory computer-readable storage medium, and the computer-executable instructions are executed by one or more processors, such as one processor 11 in fig. 2, so that the one or more processors may execute the method for controlling a terminal to start a driving mode in any of the method embodiments.
Embodiments of the present invention also provide a computer program product, which includes a computer program stored on a non-transitory computer readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by an electronic device, the electronic device is caused to execute any one of the methods for controlling a terminal to turn on a driving mode.
It should be noted that the above-described embodiments of the apparatus are merely schematic, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may also be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (11)
1. A method for controlling a terminal to start a driving mode is characterized by comprising the following steps:
acquiring equipment information of equipment in communication connection with the terminal;
judging whether the equipment is an automobile or not according to the equipment information;
if yes, judging whether the current time falls into a preset driving time period or not;
and if the current time falls into the preset driving time period, controlling the terminal to start a driving mode.
2. The method of claim 1, further comprising:
if the current time does not fall into the preset driving time period, acquiring the current speed of the terminal, and judging whether the current speed of the terminal is greater than or equal to a preset speed threshold value or not;
and if so, controlling the terminal to start a driving mode.
3. A method according to claim 1 or 2, wherein the communication connection is a bluetooth connection, and the device information comprises a bluetooth name and a bluetooth Mac address of the device;
the judging whether the equipment is an automobile or not according to the equipment information comprises the following steps:
determining whether the equipment is an automobile or not according to the Bluetooth name; and/or the presence of a gas in the gas,
and determining whether the equipment is an automobile or not according to the Bluetooth Mac address.
4. The method of claim 3, wherein determining whether the device is an automobile based on the Bluetooth name comprises:
judging whether the Bluetooth name comprises an automobile characteristic field, wherein the automobile characteristic field is at least one of automobile brand, automobile model and automobile name;
and if so, determining that the equipment is the automobile.
5. The method of claim 3, wherein determining whether the device is an automobile based on the Bluetooth Mac address comprises:
acquiring a manufacturer of the equipment according to the Bluetooth Mac address;
judging whether the manufacturer is an automobile manufacturer;
and if so, determining that the equipment is the automobile.
6. The method of claim 1, wherein the preset driving period comprises at least one driving period,
the method further comprises the following steps:
acquiring at least two historical driving period data;
performing clustering algorithm learning on the at least two historical driving period data to obtain at least one clustering center;
and acquiring at least one driving time interval according to the at least one clustering center.
7. The method of claim 6, wherein the one of the historical driving period data comprises a driving start time and a driving duration, and the obtaining at least one driving period based on the at least one cluster center comprises:
determining a starting point of the driving period as the starting time of the corresponding clustering center;
determining an end point of the driving period as a time point of a sum of a start time of the corresponding cluster center and a driving duration of the corresponding cluster center.
8. The method of claim 6, wherein the clustering algorithm is a K-means clustering algorithm.
9. An apparatus for controlling a terminal to start a driving mode, comprising:
the acquisition module is used for acquiring the equipment information of equipment in communication connection with the terminal;
the first judgment module is used for judging whether the equipment is an automobile or not according to the equipment information;
the second judgment module is used for judging whether the current time falls into a preset driving time period or not if the equipment is an automobile;
and the first control module is used for controlling the terminal to start the driving mode if the current time falls into the preset driving time period.
10. A terminal, comprising:
at least one processor, and
a memory communicatively coupled to the at least one processor, wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
11. A non-transitory computer-readable storage medium having stored thereon computer-executable instructions for causing a terminal to perform the method of any one of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011023272.5A CN114257681A (en) | 2020-09-25 | 2020-09-25 | Method for controlling terminal to start driving mode, terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011023272.5A CN114257681A (en) | 2020-09-25 | 2020-09-25 | Method for controlling terminal to start driving mode, terminal and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114257681A true CN114257681A (en) | 2022-03-29 |
Family
ID=80790434
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011023272.5A Pending CN114257681A (en) | 2020-09-25 | 2020-09-25 | Method for controlling terminal to start driving mode, terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114257681A (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105246023A (en) * | 2015-08-28 | 2016-01-13 | 努比亚技术有限公司 | Driving assistant starting device and method |
CN107270923A (en) * | 2017-06-16 | 2017-10-20 | 广东欧珀移动通信有限公司 | Method, terminal and storage medium that a kind of route is pushed |
CN107315519A (en) * | 2017-06-30 | 2017-11-03 | 北京奇虎科技有限公司 | OS switching methods, device and mobile terminal under driving condition |
CN108834122A (en) * | 2018-07-02 | 2018-11-16 | Oppo(重庆)智能科技有限公司 | A kind of bluetooth recognition method, apparatus, equipment and storage medium |
CN109040452A (en) * | 2018-08-08 | 2018-12-18 | 深圳市广和通无线股份有限公司 | Terminal driving mode control method, terminal, computer equipment and storage medium |
CN109491284A (en) * | 2018-10-26 | 2019-03-19 | 广州小鹏汽车科技有限公司 | Control method for vehicle, device and terminal device based on user's trip habit |
CN111556466A (en) * | 2019-02-12 | 2020-08-18 | 青岛海信移动通信技术股份有限公司 | Bluetooth vehicle-mounted equipment identification method and terminal |
CN111582563A (en) * | 2020-04-24 | 2020-08-25 | 中山大学 | Individual journey time short-term prediction method, system, device and storage medium |
-
2020
- 2020-09-25 CN CN202011023272.5A patent/CN114257681A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105246023A (en) * | 2015-08-28 | 2016-01-13 | 努比亚技术有限公司 | Driving assistant starting device and method |
CN107270923A (en) * | 2017-06-16 | 2017-10-20 | 广东欧珀移动通信有限公司 | Method, terminal and storage medium that a kind of route is pushed |
CN107315519A (en) * | 2017-06-30 | 2017-11-03 | 北京奇虎科技有限公司 | OS switching methods, device and mobile terminal under driving condition |
CN108834122A (en) * | 2018-07-02 | 2018-11-16 | Oppo(重庆)智能科技有限公司 | A kind of bluetooth recognition method, apparatus, equipment and storage medium |
CN109040452A (en) * | 2018-08-08 | 2018-12-18 | 深圳市广和通无线股份有限公司 | Terminal driving mode control method, terminal, computer equipment and storage medium |
CN109491284A (en) * | 2018-10-26 | 2019-03-19 | 广州小鹏汽车科技有限公司 | Control method for vehicle, device and terminal device based on user's trip habit |
CN111556466A (en) * | 2019-02-12 | 2020-08-18 | 青岛海信移动通信技术股份有限公司 | Bluetooth vehicle-mounted equipment identification method and terminal |
CN111582563A (en) * | 2020-04-24 | 2020-08-25 | 中山大学 | Individual journey time short-term prediction method, system, device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105094305B (en) | Identify method, user equipment and the Activity recognition server of user behavior | |
CN106713662B (en) | Method and device for optimizing performance of positioning system and mobile terminal | |
CN111582605B (en) | Method and device for predicting destination site, electronic equipment and storage medium | |
US20150215986A1 (en) | Vehicle telematics connection retry | |
CN106851022B (en) | Mobile terminal forgetting reminding method and device | |
CN104735671A (en) | Malicious call recognition method and device | |
CN108681459B (en) | Firmware updating method, device and system for intelligent hardware equipment | |
US20200259942A1 (en) | Method for managing a call journal, device, computer program, and software product for this purpose | |
CN105262792A (en) | Vehicle abnormality processing method and vehicle-mounted terminal | |
CN110784846A (en) | Vehicle-mounted Bluetooth device identification method and device, electronic device and storage medium | |
CN106789583B (en) | Intelligent social contact method and system based on WiFi-Aware | |
CN109041064B (en) | Pseudo base station identification method and device and mobile terminal | |
CN111314902A (en) | Method and device for adaptively configuring parameters of terminal of Internet of vehicles | |
CN104322006A (en) | Wireless wake-up device for cellular module | |
CN113611104A (en) | Risk identification method and device for freight vehicle, storage medium and terminal | |
CN104063457A (en) | Information communication method, system and terminal | |
CN107948937B (en) | Passenger flow volume statistical method and device | |
CN105516988A (en) | Telephone filtering method and device, electronic equipment and server | |
CN114257681A (en) | Method for controlling terminal to start driving mode, terminal and storage medium | |
US20170363431A1 (en) | Location method and corresponding terminals, vehicle, computer program product and storage medium | |
CN108616870B (en) | Method and device for identifying terminal customized preferentially | |
CN106535161B (en) | Method and device for intelligent dialing of intelligent terminal and intelligent terminal | |
CN112118357B (en) | Intelligent terminal management method and device, storage medium and electronic device | |
CN113873495B (en) | Network access method and device of eSIM card | |
CN114064276A (en) | Vehicle-using scene perception method and vehicle-mounted system |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20220329 |