WO2022262445A1 - 获取定位信息的方法、装置、电子设备以及存储介质 - Google Patents

获取定位信息的方法、装置、电子设备以及存储介质 Download PDF

Info

Publication number
WO2022262445A1
WO2022262445A1 PCT/CN2022/090380 CN2022090380W WO2022262445A1 WO 2022262445 A1 WO2022262445 A1 WO 2022262445A1 CN 2022090380 W CN2022090380 W CN 2022090380W WO 2022262445 A1 WO2022262445 A1 WO 2022262445A1
Authority
WO
WIPO (PCT)
Prior art keywords
vehicle
electronic device
location information
mounted device
specified
Prior art date
Application number
PCT/CN2022/090380
Other languages
English (en)
French (fr)
Inventor
丁杨洋
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2022262445A1 publication Critical patent/WO2022262445A1/zh

Links

Images

Classifications

    • 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/02Services making use of location information
    • H04W4/023Services making use of location information using mutual or relative location information between multiple location based services [LBS] targets or of distance thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • 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

Definitions

  • the present application relates to the technical field of terminals, and more specifically, to a method, device, electronic device, and storage medium for acquiring positioning information.
  • a user may collect location information through an electronic device during a trip, and send the location information to other devices.
  • embodiments of the present application propose a method, device, electronic device, and storage medium for acquiring positioning information, so as to improve the above problems.
  • the embodiment of the present application provides a method for obtaining location information, which is applied to electronic devices.
  • the method includes: if the same vehicle-mounted device that has not been connected is continuously detected within a specified period of time, start obtaining the location information of the electronic device. location information; and send the location information to the specified device.
  • the embodiment of the present application provides a device for acquiring location information, which runs on electronic equipment.
  • the device includes: a location information acquisition unit, configured to continuously detect the same location that has not been connected within a specified period of time.
  • the in-vehicle device starts to acquire the location information of the electronic device;
  • the positioning information sending unit is configured to send the location information to a designated device.
  • the embodiment of the present application provides an electronic device, including one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors Execute to implement the method described above.
  • the embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, wherein the above-mentioned method is executed when the program code is executed by a processor.
  • FIG. 1 shows a schematic diagram of an application scenario of a method for obtaining positioning information proposed by an embodiment of the present application
  • FIG. 2 shows a flow chart of a method for obtaining positioning information proposed by an embodiment of the present application
  • FIG. 3 shows a flow chart of a method for acquiring positioning information proposed by another embodiment of the present application
  • Fig. 4 shows a schematic diagram of a user standing beside a vehicle in the embodiment of the present application
  • FIG. 5 shows a flow chart of a method for obtaining positioning information proposed by another embodiment of the present application.
  • FIG. 6 shows a schematic diagram of vehicles traveling in parallel in the embodiment of the present application.
  • FIG. 7 shows a flow chart of a method for acquiring positioning information proposed by another embodiment of the present application.
  • FIG. 8 shows a structural block diagram of a device for obtaining positioning information in an embodiment of the present application
  • FIG. 9 shows a structural block diagram of an electronic device for executing a method for acquiring positioning information according to an embodiment of the present application in real time in the present application;
  • FIG. 10 shows a storage unit used to store or carry program codes for implementing the method for acquiring positioning information according to an embodiment of the present application in real time in the present application.
  • electronic devices can activate the positioning function to collect positioning information. For example, when a user uses an electronic device to hail a taxi, the taxi-hailing application in the electronic device may call the positioning function of the electronic device to record the location of the electronic device, so as to obtain the driving track of the vehicle the user is in.
  • the vehicle-mounted equipment will be continuously detected within a specified period of time, and then the Within a specified time period, if the same vehicle-mounted device that has not been connected is continuously detected, start to acquire the location information of the electronic device, and send the location information to the specified device. Therefore, through the above method, the electronic device can automatically trigger to acquire the location information of the electronic device and send the location information according to the detection result of the vehicle-mounted device, thereby improving the convenience of triggering the electronic device to locate. Moreover, because the process of triggering the positioning does not require the user's participation, the collection of location information is safer and more concealed.
  • the method provided in this embodiment may also include the following process: if the same vehicle-mounted device that has not been connected is continuously detected within a specified period of time, and the speed of the electronic device is greater than the speed threshold, start acquiring Location information of electronic devices.
  • the method provided by this embodiment may further include the following process: if the same vehicle-mounted device that has not been connected is continuously detected within a specified period of time, and the signal strength of the wireless signal sent by the vehicle-mounted device is greater than Intensity threshold, start to obtain the location information of the electronic device.
  • the method provided in this embodiment may further include the following process: within a specified time period, the same vehicle-mounted device that has not been connected can be detected in multiple device detection processes.
  • the method provided in this embodiment may also include the following process: start timing when it is determined that there is an unconnected vehicle-mounted device detected for the first time by specifying the wireless signal scanned by the communication device, if the timing is Within the specified time length, the vehicle-mounted device detected at the start time of the specified time length is continuously detected, and the location information of the electronic device is started to be acquired.
  • the method provided in this embodiment may further include the following process: after detecting that the same vehicle-mounted device has not been connected for a specified number of times, start counting the specified time length.
  • the method provided in this embodiment may further include the following process: if the same in-vehicle device that is not connected is continuously detected within a specified period of time, and the distance between the in-vehicle device and the electronic device is When the distance is smaller than the threshold, start to acquire the location information of the electronic device.
  • the method provided in this embodiment may further include the following procedure: obtaining the distance calculation rule adapted to the vehicle device from the wireless signal sent by the vehicle device, wherein the distance calculation rule is used to calculate The distance between the in-vehicle device and the electronic device.
  • different types of vehicles have different distance calculation rules or distance calculation parameters for calculating the distance between the vehicle-mounted device and the electronic device.
  • the method provided in this embodiment may further include the following process: if a wireless signal sent by the vehicle-mounted device based on a predetermined communication mode is received, determine that the vehicle-mounted device is detected.
  • the method provided in this embodiment may further include the following process: when a wireless signal is received and an identifier indicating that the device type is a vehicle-mounted device is added to the wireless signal, determine the The wireless signal is sent by the vehicle-mounted device, and it is determined that the vehicle-mounted device is detected.
  • the method provided by this embodiment may also include the following process: scan the broadcast data packet based on Bluetooth communication, and after scanning the broadcast data packet sent by the vehicle-mounted device, send it from the scanned vehicle-mounted device Obtain the identification of the vehicle-mounted device from the broadcast data packet.
  • the method provided in this embodiment may further include the following process: determining the device type of the vehicle-mounted device according to the composition format of the data carried in the wireless signal sent by the vehicle-mounted device.
  • the method provided in this embodiment may further include the following process: sending the acquired location information to the server.
  • the method provided in this embodiment may further include the following process: sending the acquired location information to an electronic device associated with the electronic device.
  • the method provided in this embodiment may further include the following process: if the on-vehicle device cannot be detected continuously within a specified period of time, stop acquiring location information.
  • the method provided in this embodiment may further include the following process: if the vehicle-mounted device cannot be detected continuously within a specified period of time, then detect the current speed of the electronic device; if the current speed If the speed is lower than the speed threshold, stop acquiring position information.
  • the scene shown in FIG. 1 includes an electronic device 100 , a server 200 and a satellite 300 .
  • the electronic device 100 can communicate with the server 200 and the satellite 300 .
  • the satellite 300 may directly send the location information of the electronic device 100 to the electronic device 100 , or may send the location information of the electronic device to the electronic device 100 through a base station to which the electronic device is connected. After the electronic device 100 acquires its location information, it can send the location information to the server 200 .
  • the electronic device 100 may be a smart phone, a tablet computer, a smart bracelet or a smart watch, and the like.
  • the server 200 can be a single physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud computing, cloud services, cloud storage, and artificial intelligence platforms. .
  • FIG. 2 is a flow chart of a method for obtaining positioning information proposed by an embodiment of the present application, which is applied to electronic devices, and the method includes:
  • detecting the vehicle-mounted device may be understood as detecting a wireless signal transmitted by the vehicle-mounted device. That is to say, the vehicle-mounted device can transmit wireless signals based on a predetermined communication method, and if the electronic device can receive the wireless signal transmitted by the vehicle-mounted device during the device detection process, the electronic device determines that the vehicle-mounted device has been detected. For example, the vehicle-mounted device may transmit a broadcast signal based on Bluetooth. If the electronic device can receive the broadcast signal transmitted by the vehicle-mounted device during the device detection process, the electronic device determines that the vehicle-mounted device has been detected.
  • the start moment of the specified time length can be determined in multiple ways.
  • the time when an unconnected vehicle-mounted device is detected for the first time can be used as the starting time of the specified time length.
  • the designated communication device in the electronic device can start to detect the wireless signal transmitted by the external device through the designated communication device, and the designated communication device itself can also transmit the wireless signal.
  • the electronic device determines that there is an unconnected on-board device detected for the first time through the wireless signal scanned by the designated communication device, it will start counting, and within the designated time period of timing, it can continue to detect
  • the vehicle-mounted device is detected at the beginning of the time length, the location information of the electronic device will be acquired. For example, when the electronic device detects the unconnected vehicle-mounted device C1 for the first time, it starts to count. Device location information.
  • the electronic device may start counting the specified time length after detecting that the same vehicle-mounted device has not been connected for a specified number of times. It should be noted that, in some cases, the user just holds the electronic device and stands beside the vehicle, but in this case, the electronic device can still detect the wireless signal emitted by the vehicle beside him. If the electronic device directly Starting the timing of the specified time length will cause the electronic device to be falsely triggered and started to obtain the location information of the electronic device, which in turn will cause waste of resources of the electronic device.
  • the probability of falsely triggering and starting to obtain the position information of the electronic device can be reduced to a greater extent.
  • the specified number of times is 2 times
  • the electronic device can continue to detect the unconnected vehicle-mounted device C2 for the first time, and if it detects the vehicle-mounted device C2 again, it will determine 2 consecutive detections
  • the in-vehicle device C2 When the in-vehicle device C2 is reached, it will start counting the specified time length, and if the in-vehicle device C2 can be continuously detected within the specified time, it will start to obtain the location information of the electronic device.
  • continuously detecting the same in-vehicle device that has not been connected may include: being able to detect the same in-vehicle device that has not been connected in multiple device detection processes. It should be noted that after the specified communication device of the electronic device is started, it will detect the external device at a specified frequency, that is, the electronic device will perform multiple detections of the external device within the specified time length In the process of detecting the external device multiple times, if the same vehicle-mounted device can be detected each time, it is determined that the same vehicle-mounted device can be continuously detected within a specified time period.
  • the device can add an identification of the device type to the transmitted wireless signal, so that after other devices receive the wireless signal, they can extract the identification of the device type from the wireless signal, so that according to the The identification determines which type of device sends the currently received wireless signal.
  • a vehicle-mounted device may add an identification indicating that the device type is a vehicle-mounted device in a wireless signal without transmission, so that when the electronic device receives a wireless signal, and the wireless signal adds an identification indicating that the device type is a vehicle-mounted device , it can be determined according to the identification that the received wireless signal is sent by the vehicle-mounted device, and then the electronic device also determines that the vehicle-mounted device has been detected.
  • the vehicle-mounted device may add an identifier identifying itself as the vehicle-mounted device in the broadcast signal sent.
  • the broadcast signal can be understood as a signal for sending a broadcast data packet, and then the vehicle-mounted device can carry a corresponding identifier representing itself as a vehicle-mounted device in a specific field in the transmitted broadcast data packet.
  • a broadcast packet format as shown in the following table.
  • the field named Length is used to represent the length of the broadcast data packet
  • the field named Type represents the connection type of the current data packet
  • the field named MFG ID represents the sending of the broadcast data packet
  • the field named iBeacon indicates that the current broadcast data packet is generated based on iBeacon mode
  • the field named MD5 represents the MD5-based encrypted device identification carried in the broadcast data packet
  • the field name is Major , Minor, and Ref are used to carry characteristic values to distinguish different data packets sent by the same device.
  • an identifier corresponding to the vehicle-mounted device representing its own device type can be added to the field of 16 Byte length.
  • the data packet format and the name of each field shown in the above table are only exemplary, and the data packet format and field name of the broadcast data sent by the vehicle device can also be changed according to the actual carried data.
  • the electronic device can also scan the broadcast data packet based on Bluetooth communication, so that after scanning the broadcast data packet sent by the vehicle-mounted device, obtain the information of the vehicle-mounted device from the scanned broadcast data packet sent by the vehicle-mounted device. logo. For example, if the electronic device scans the broadcast data packet in the way of Bluetooth communication, after scanning the broadcast data packet sent by the vehicle-mounted device in the same way of Bluetooth communication, it can be read from the 16Byte length of the broadcast data packet shown in the above table. The identification of the on-board device is parsed from the field.
  • the bluetooth communication manner introduced in the foregoing embodiments is only exemplary.
  • the bluetooth communication method there may also be other communication methods, for example, a Wi-Fi Aware method may also be used.
  • the electronic device may determine the type of the device according to the composition format of the data carried in the wireless signal sent by the device.
  • the device can generate the data to be sent through a specified protocol, and the protocol defines the composition format of the generated data.
  • the electronic device can determine the type of the device by identifying the composition format of the data.
  • the corresponding relationship between the composition format and the type can be established in advance, then after obtaining the composition format of the data sent by the device, the type of the device can be obtained according to the correspondence between the composition format and the type.
  • starting to acquire the location information of the electronic device can be understood as invoking the positioning device of the electronic device to collect the location information, and can also be understood as reading the location information of the electronic device that has been collected by the positioning device.
  • obtaining location information may be understood as obtaining real-time location information, so that the electronic device can obtain the driving route of the vehicle where the vehicle-mounted device is located.
  • the vehicle-mounted device that has not been connected can be understood as that no communication connection has been established between the electronic device and the vehicle-mounted device. For example, taking Bluetooth communication as an example, if it is detected that the electronic device has not been paired with the vehicle-mounted device sending the wireless signal, then it can be determined that the vehicle-mounted device is not connected to the vehicle-mounted device.
  • S120 Send the location information to a designated device.
  • the obtained location information may be sent to the designated device.
  • the designated device may have multiple implementation manners.
  • the sending the location information to the specified device includes: sending the acquired location information to a server.
  • the server After the server receives the location information sent by the electronic device, it can store the location information, so that when a user needs to query the location of the electronic device, he can query the information sent by the electronic device from the server through the query interface provided by the server. location information.
  • the sending the location information to a designated device further includes: sending the acquired location information to an electronic device associated with the electronic device.
  • the server may not promptly send the received location information to other devices through the query interface, and after the electronic device obtains the location information, it will The acquired position information is sent to the electronic device associated with the electronic device, which is beneficial to enable the associated electronic device to obtain the position information of the electronic device more quickly and in a timely manner.
  • a method for obtaining location information will continue to detect the vehicle-mounted device within a specified period of time, and then start to obtain the same vehicle-mounted device that has not been connected within the specified period of time. location information of the electronic device, and send the location information to the designated device. Therefore, through the above method, the electronic device can automatically trigger to acquire the location information of the electronic device and send the location information according to the detection result of the vehicle-mounted device, thereby improving the convenience of triggering the electronic device to locate. Moreover, because the process of triggering the positioning does not require the participation of the user, the user experience is improved.
  • FIG. 3 is a flow chart of a method for obtaining positioning information proposed by an embodiment of the present application, which is applied to electronic devices, and the method includes:
  • the electronic device can still detect the wireless signal emitted by the vehicle beside him, so if the electronic device is Directly starting the timing of the specified time length may cause the electronic device to be falsely triggered and started to obtain the location information of the electronic device, which in turn will cause waste of resources of the electronic device.
  • the user puts his electronic device 100 in his trouser pocket and stands beside the vehicle 400 .
  • the vehicle-mounted equipment in the vehicle 400 can transmit wireless signals at a fixed frequency
  • the electronic device 100 can receive the signal transmitted by the vehicle-mounted equipment of the vehicle 400 after entering the coverage area of the wireless signal transmitted by the vehicle-mounted equipment of the vehicle 400. wireless signal.
  • the user may just stand beside the vehicle 400 instead of taking the vehicle 400.
  • the electronic device 100 still directly detects the same vehicle-mounted device (vehicle) that has not been connected within a specified period of time. 400 vehicle-mounted equipment), and then start to obtain the position information of the electronic device, which will cause the acquisition of the position information to not have the effect of monitoring the driving path.
  • the optional speed threshold can be understood as the threshold used to determine whether the user to which the electronic device belongs is actually in a vehicle.
  • the speed threshold may be 10 km per hour, or may also be 20 km per hour.
  • S220 Send the location information to a designated device.
  • the specified time length is 1 minute
  • the speed threshold is 10 km per hour
  • the electronic device discovers the vehicle-mounted device through a Bluetooth signal. Then, when the electronic device starts the bluetooth module, it will start to detect the bluetooth signals emitted by other devices. After detecting a broadcast signal sent by a device through Bluetooth communication, start to obtain the identifier of the device sending the broadcast signal through the broadcast signal, and if it is recognized that the identifier indicates that the device sending the broadcast signal is a vehicle-mounted device (for example, a vehicle-mounted device C), Then the electronic device starts timing with a length of 1 minute. If the vehicle-mounted device C can be continuously detected within the 1 minute, the electronic device further obtains its own speed. If the obtained speed is greater than 10 km per hour, it starts Obtain the location information of the electronic device, and send the obtained location information to the designated device.
  • a vehicle-mounted device for example, a vehicle-mounted device C
  • This embodiment provides a method for obtaining location information, so that the electronic device can automatically trigger the acquisition of the location information of the electronic device and send the location information according to the detection result of the vehicle-mounted device, thereby improving the The convenience of triggering electronic devices for location. Moreover, because the process of triggering the positioning does not require the participation of the user, the user experience is improved. Moreover, in this embodiment, the location information of the electronic device will not be acquired until it is detected that the speed of the electronic device is greater than the speed threshold, thereby reducing the possibility that the user to which the electronic device belongs is actually around the vehicle rather than in the vehicle. The probability of obtaining location information due to false start on the vehicle.
  • FIG. 5 is a flow chart of a method for obtaining positioning information proposed by an embodiment of the present application, which is applied to electronic devices, and the method includes:
  • the wireless signal has a certain degree of penetration, so that even if the electronic device is outside the vehicle, it can receive the wireless signal transmitted by the on-board equipment of the vehicle.
  • the vehicle 400 and the vehicle 500 are parallel on the same road, and the speed of the vehicle 400 and the vehicle 500 is the same, then in the case that the vehicle 400 and the vehicle 500 each send a wireless signal, the vehicle 400 The electronic equipment of the vehicle 500 can receive the wireless signal transmitted by the on-board equipment of the vehicle 500 .
  • the electronic equipment in the vehicle 500 can receive the wireless signal transmitted by the on-board equipment of the vehicle 400, and then the electronic equipment in the vehicle 500 may be triggered by the wireless signal transmitted by the on-board equipment of the vehicle 400 to start acquiring the electronic equipment.
  • the electronic device in the vehicle 400 may be triggered to start acquiring the position information of the electronic device due to the wireless signal transmitted by the on-board device of the vehicle 500 .
  • the electronic device can further determine whether to trigger the acquisition of the location information of the electronic device in combination with the received signal strength of the wireless signal transmitted by the vehicle-mounted device.
  • the signal strength of a wireless signal will attenuate with the distance traveled. Furthermore, the strength of the wireless signal received by the electronic equipment inside the vehicle is relatively higher than that received by the electronic equipment outside the vehicle. For example, the signal strength of the wireless signal transmitted by the on-vehicle device of the vehicle 400 received by the electronic device in the vehicle 400 is stronger than the signal strength of the wireless signal transmitted by the on-vehicle device of the vehicle 500 . Correspondingly, the signal strength of the wireless signal transmitted by the on-vehicle equipment of the vehicle 500 received by the electronic equipment in the vehicle 500 will be stronger than the signal strength of the wireless signal transmitted by the on-vehicle equipment of the vehicle 400 . Then, in this embodiment, the intensity threshold is a threshold that indicates that the electronic device receiving the wireless signal is inside the vehicle that transmits the wireless signal.
  • the strength threshold may be configured by placing the electronic device in the vehicle in advance, and then obtaining the signal strength of the wireless signal obtained by the electronic device in the vehicle. In this manner, if the signal strength acquired by the electronic device is a, then the strength threshold may be configured as a. Wherein, the signal strength may be received signal strength RSSI (Received Signal Strength Indication).
  • RSSI Receiveived Signal Strength Indication
  • the electronic device in addition to directly judging based on the signal strength of the wireless signal sent by the vehicle-mounted device, it can also be further determined according to The distance between the electronic device and the vehicle-mounted device calculated by the signal strength is used for judgment. In this way, if the electronic device continues to detect the same vehicle-mounted device that has not been connected within a specified period of time, and the distance between the vehicle-mounted device and the electronic device is less than the distance threshold, it can start to obtain the information of the electronic device. location information.
  • the wireless signal transmitted by the vehicle-mounted device may be affected by the position of the vehicle-mounted device inside the vehicle and its own shape, so that even though the vehicle-mounted device may be in a different location from the electronic device, the wireless signals transmitted by each The degree of attenuation of the signals is different, so that the electronic device measures that the two vehicle devices are at the same distance from the electronic device.
  • appropriate distance calculation rules or distance calculation parameters may be selected for multiple types of vehicles.
  • the electronic device in the process of calculating the distance between devices according to the signal strength, the electronic device will substitute the signal strength into the distance calculation rule, so as to obtain the distance output according to the distance calculation rule.
  • different distance calculation rules may calculate different distances. Then, for multiple types of vehicles, when the actual distance between the electronic device and the vehicle-mounted device is known in advance, a variety of distance calculation rules can be used to obtain the calculated distance, and then the calculated distance can be compared with the actual maximum distance. An approaching distance calculation rule is used as the distance calculation rule adapted to this type of vehicle.
  • the rules that can be used to calculate the distance between the electronic device and the vehicle-mounted device include a distance calculation rule p1, a distance calculation rule p2, and a distance calculation rule p3.
  • the vehicle type currently used to determine the adapted distance calculation rule is type G1.
  • the electronic device can be pre-placed at a position 1 meter away from the vehicle-mounted device, and then the electronic device uses the aforementioned distance calculation rule p1, distance calculation rule p2, and distance calculation rule p3 to calculate the distance between the vehicle-mounted device and the electronic device.
  • the distance calculated according to the wireless signal transmitted by the vehicle equipment and the distance calculation rule p1 is 0.9 meters
  • the distance calculated according to the wireless signal transmitted by the vehicle equipment and the distance calculation rule p2 is 0.95 meters
  • the distance calculated according to the wireless signal transmitted by the vehicle-mounted device and the distance calculation rule p3 is 0.98 meters (the closest to the actual distance is 1 meter)
  • the calculation rule adapted to the vehicle-mounted device of the type G1 vehicle is the distance calculation rule p3.
  • distance calculation rules adapted to each of multiple types of vehicles can be determined through the foregoing manner.
  • the vehicle-mounted device can carry its adapted distance calculation rule in the transmitted wireless signal, so that the device that needs to perform distance calculation can conveniently obtain the distance calculation rule adapted by the vehicle-mounted device.
  • the vehicle-mounted device can carry the distance calculation rule in the broadcast signal transmitted by itself, so that the electronic device can extract the adapted distance of the vehicle-mounted device from the broadcast signal after receiving the broadcast signal transmitted by the vehicle-mounted device.
  • Calculation Rules For example, if the calculation rule obtained by the electronic device from the broadcast signal is the distance calculation rule p3, then the distance calculation will be performed based on the distance calculation rule p3.
  • a distance calculation rule for distance calculation, in addition to using the signal strength of the wireless signal, another parameter is also used, and the other parameter can be determined as a distance calculation parameter.
  • a distance calculation rule is as follows:
  • d represents the calculated distance value
  • RSSI represents the signal strength of the wireless signal
  • M represents the reference distance
  • N represents the path loss factor
  • the parameter M and the parameter N are parameters other than signal strength, that is, distance calculation parameters. In this manner, the distance calculation rules for calculating the distance between different devices are the same, but different distance calculation parameters may be adapted to different devices.
  • the actual distance between the vehicle-mounted device and the electronic device can be obtained first, and then the electronic device can obtain the signal strength of the wireless signal transmitted by the vehicle-mounted device, and then change the electronic device The actual distance between the vehicle device and the actual distance, and each time the actual distance is changed, the electronic device will obtain the signal strength of the wireless signal transmitted by the current vehicle device, and then obtain multiple sets of actual distance and signal as shown in the following table Strength Correspondence.
  • the distance calculation parameters in the distance calculation rules can be calculated through the correspondence between multiple groups of actual distances and signal strengths in the above table, and then the calculated distance calculation parameters can be used as the distance calculation parameters corresponding to the on-board equipment.
  • the vehicle-mounted device can also carry the distance calculation parameters in the transmitted wireless signal so that other electronic devices can obtain it conveniently.
  • S320 Send the location information to a specified device.
  • the specified time length is 1 minute
  • the intensity threshold is q
  • the electronic device discovers the vehicle-mounted device through the Bluetooth signal.
  • the electronic device starts the bluetooth module, it will start to detect the bluetooth signals emitted by other devices.
  • After detecting a broadcast signal sent by a device through Bluetooth communication start to obtain the identifier of the device sending the broadcast signal through the broadcast signal, and if it is recognized that the identifier indicates that the device sending the broadcast signal is a vehicle-mounted device (for example, a vehicle-mounted device C), Then the electronic device starts timing with a length of 1 minute. If the vehicle-mounted device C can be continuously detected within the 1 minute, the electronic device further obtains the signal strength of the broadcast signal transmitted by the vehicle-mounted device C. If the signal strength is obtained If it is greater than q, start to acquire the location information of the electronic device, and send the acquired location information to the designated device.
  • the specified time length is 1 minute
  • the distance threshold is 1 meter
  • the electronic device discovers the vehicle-mounted device through a Bluetooth signal.
  • the electronic device starts the bluetooth module, it will start to detect the bluetooth signals emitted by other devices.
  • After detecting a broadcast signal sent by a device through Bluetooth communication start to obtain the identifier of the device sending the broadcast signal through the broadcast signal, and if it is recognized that the identifier indicates that the device sending the broadcast signal is a vehicle-mounted device (for example, a vehicle-mounted device C), Then the electronic device starts timing with a length of 1 minute. If the vehicle-mounted device C can be continuously detected within the 1 minute, then the electronic device further acquires the distance between the vehicle-mounted device C and the vehicle. If the acquired distance is less than 1 meter, Then start to obtain the location information of the electronic device, and send the obtained location information to the designated device.
  • a vehicle-mounted device for example, a vehicle-mounted device C
  • This embodiment provides a method for obtaining location information, so that the electronic device can automatically trigger the acquisition of the location information of the electronic device and send the location information according to the detection result of the vehicle-mounted device, thereby improving the The convenience of triggering electronic devices for location. Moreover, because the process of triggering the positioning does not require the participation of the user, the user experience is improved. Moreover, in this embodiment, the electronic device will further detect the signal strength of the wireless signal sent by the unconnected vehicle device, and then determine the user to which the electronic device belongs based on the received signal strength of the wireless signal of the vehicle device. Whether it is actually in the vehicle to which the vehicle-mounted device belongs, so as to reduce the probability of falsely triggering and starting to obtain location information.
  • FIG. 7 is a flow chart of a method for obtaining positioning information proposed by an embodiment of the present application, which is applied to electronic devices, and the method includes:
  • S420 Send the location information to a specified device.
  • the electronic device after the electronic device starts to acquire the location information of the electronic device, it can still continue to detect the wireless signal transmitted by the vehicle-mounted device. It can be understood that, by continuing to detect the wireless signal transmitted by the vehicle-mounted device, the electronic device can determine when the user of the electronic device will leave the vehicle to which the vehicle-mounted device belongs, so as to be able to timely determine the time to stop acquiring location information, so that Reduce power consumption of electronic equipment.
  • the in-vehicle device cannot be continuously detected may be understood as that the same in-vehicle device is not detected in each device detection performed within the specified time period.
  • the timing start moment of the designated time length can be the moment when the same vehicle-mounted device is not detected for the first time.
  • the electronic device may start to acquire the location information of the electronic device. And after starting to acquire the location information of the electronic device, continue to detect the vehicle-mounted device D. If the in-vehicle device D cannot be detected continuously within the specified time length, the acquisition of location information will be stopped.
  • the vehicle may temporarily turn off the device for transmitting wireless signals during driving, so that the on-board equipment will suspend the transmission of wireless signals.
  • the electronic device mistakenly recognizes that the user to whom the electronic device belongs has left the vehicle, and then stops acquiring location information.
  • the electronic device can further detect the current speed of the electronic device when the vehicle-mounted device cannot be detected within a specified period of time. If the current speed is less than the speed threshold (the speed threshold here can also be is the speed threshold for triggering position acquisition in the foregoing embodiments), then stop acquiring position information. Therefore, by combining the current speed of the electronic device, it is further determined whether the user who owns the electronic device has actually left the previous vehicle, avoiding false triggers to stop obtaining the location because the vehicle device only temporarily turns off the device that transmits the wireless signal. information.
  • the electronic device is triggered to start acquiring location information when it continuously detects the unconnected vehicle-mounted device C. Then, after the electronic device starts to obtain the location information of the electronic device, it will continue to detect the vehicle-mounted device C, and if the vehicle-mounted device C cannot be detected within a specified period of time, it will further obtain the speed of the electronic device itself , and stop acquiring position information when the acquired speed is lower than the speed threshold.
  • This embodiment provides a method for obtaining location information, so that the electronic device can automatically trigger the acquisition of the location information of the electronic device and send the location information according to the detection result of the vehicle-mounted device, thereby improving the The convenience of triggering electronic devices to locate. Moreover, because the process of triggering the positioning does not require the participation of the user, the user experience is improved. Moreover, in this embodiment, if the on-vehicle device cannot be detected continuously within a specified period of time, the acquisition of the location information is stopped, which further helps to reduce the power consumption of the electronic device.
  • FIG. 8 is a structural block diagram of a device 500 for obtaining positioning information proposed by an embodiment of the present application.
  • the device 500 runs on electronic equipment, and the device 500 includes:
  • the location information acquiring unit 510 is configured to start to acquire the location information of the electronic device if the same vehicle-mounted device that has not been connected is continuously detected within a specified time period.
  • the location information sending unit 520 is configured to send the location information to a designated device.
  • the positioning information acquisition unit 510 is specifically configured to start acquiring the position information of the electronic device if the same vehicle-mounted device that has not been connected is continuously detected within a specified period of time, and the speed of the electronic device is greater than a speed threshold .
  • the positioning information acquisition unit 510 is specifically configured to start to detect the same vehicle-mounted device that has not been connected within a specified time period, and the signal strength of the wireless signal sent by the vehicle-mounted device is greater than the strength threshold. Obtain the location information of the electronic device.
  • the same vehicle-mounted device that has not been connected is continuously detected within the specified time period, it includes: if the same vehicle-mounted device that has not been connected can be detected during multiple device detection processes within the specified time period. Car Equipment.
  • the positioning information acquisition unit 510 is specifically configured to start counting when an unconnected on-vehicle device is detected for the first time through the wireless signal scanned by the specified communication device. If within the specified time period of timing, Continue to detect the vehicle-mounted device detected at the beginning of the specified time length, and start to acquire the location information of the electronic device.
  • the positioning information acquiring unit 510 is further configured to start counting the specified time length after detecting that the same vehicle-mounted device has not been connected for a specified number of times.
  • the positioning information acquiring unit 510 is further configured to start acquiring the location information if the same unconnected vehicle-mounted device is continuously detected within a specified period of time, and the distance between the vehicle-mounted device and the electronic device is less than a distance threshold Location information of electronic devices.
  • the positioning information acquiring unit 510 is further configured to acquire a distance calculation rule adapted to the vehicle-mounted device from a wireless signal sent by the vehicle-mounted device, wherein the distance calculation rule is used to calculate the distance between the vehicle-mounted device and the The distance between the above electronic devices.
  • the positioning information acquiring unit 510 is further configured to determine that the vehicle-mounted device is detected if a wireless signal sent by the vehicle-mounted device based on a predetermined communication manner is received.
  • the positioning information acquiring unit 510 is further configured to determine that the wireless signal is sent by a vehicle device according to the identification when a wireless signal is received and an identification indicating that the device type is a vehicle device is added to the wireless signal. , to determine that the vehicle-mounted device is detected.
  • the positioning information acquisition unit 510 is also used to scan the broadcast data packet based on Bluetooth communication, and after scanning the broadcast data packet sent by the vehicle-mounted device, obtain it from the scanned broadcast data packet sent by the vehicle-mounted device The identification of the on-vehicle device.
  • the positioning information acquiring unit 510 is further configured to determine the device type of the vehicle-mounted device according to the composition format of the data carried in the wireless signal sent by the vehicle-mounted device.
  • the location information sending unit 520 is specifically configured to send the acquired location information to the server. Furthermore, the location information sending unit 520 is also specifically configured to send the acquired location information to an electronic device associated with the electronic device.
  • the location information sending unit 520 is further configured to stop acquiring location information if the on-vehicle device cannot be detected continuously within a specified period of time.
  • the positioning information sending unit 520 is further configured to detect the current speed of the electronic device if the vehicle-mounted device cannot be detected continuously within a specified period of time; if the current speed is less than a speed threshold, Then stop obtaining location information.
  • the device for obtaining location information provided by this embodiment will continue to detect the vehicle-mounted equipment within a specified time length, and then start to obtain the same vehicle-mounted device that has not been connected within the specified time length. location information of the electronic device, and send the location information to the designated device. Therefore, through the above method, the electronic device can automatically trigger to acquire the location information of the electronic device and send the location information according to the detection result of the vehicle-mounted device, thereby improving the convenience of triggering the electronic device to locate. Moreover, because the process of triggering the positioning does not require the participation of the user, the user experience is improved.
  • the embodiment of the present application also provides another electronic device 1000 that can implement the above method for obtaining location information.
  • the electronic device 1000 includes one or more (only one is shown in the figure) processors 102 , memory 104 , network module 106 , sensor module 108 and positioning module 110 coupled to each other.
  • the memory 104 stores programs capable of executing the contents of the foregoing embodiments, and the processor 102 can execute the programs stored in the memory 104 .
  • the processor 102 may include one or more processing cores.
  • the processor 102 uses various interfaces and circuits to connect various parts of the entire electronic device 1000, and executes or executes instructions, programs, code sets, or instruction sets stored in the memory 104, and calls data stored in the memory 104 to execute Various functions of the electronic device 1000 and processing data.
  • the processor 102 may adopt at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). implemented in the form of hardware.
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 102 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a modem, and the like.
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • the CPU mainly handles the operating system, user interface and application programs, etc.
  • the GPU is used to render and draw the displayed content
  • the modem is used to handle wireless communication. It can be understood that the above modem may also not be integrated into the processor 102, but implemented by a communication chip alone.
  • the memory 104 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory, ROM). Memory 104 may be used to store instructions, programs, codes, sets of codes, or sets of instructions.
  • the memory 104 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing the following method embodiments, and the like.
  • a device for acquiring location information may be stored in the memory 104 .
  • the device for acquiring location information may be the aforementioned device 500 .
  • the storage data area can also store data created by the electronic device 1000 during use (such as phonebook, audio and video data, chat record data) and the like.
  • the network module 106 is used to receive and send electromagnetic waves, realize mutual conversion between electromagnetic waves and electrical signals, and communicate with communication networks or other devices, such as audio playback devices.
  • the network module 106 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption/decryption chips, Subscriber Identity Module (SIM) cards, memory, etc. .
  • SIM Subscriber Identity Module
  • the network module 106 can communicate with various networks such as the Internet, intranet, wireless network or communicate with other devices through the wireless network.
  • the wireless network mentioned above may include a cellular telephone network, a wireless local area network or a metropolitan area network.
  • the network module 106 can perform information exchange with the base station.
  • the sensor module 108 may include at least one sensor.
  • the sensor module 108 may include, but is not limited to: a light sensor, a motion sensor, a pressure sensor, an infrared heat sensor, a distance sensor, an acceleration sensor, and other sensors.
  • the pressure sensor may be a sensor for detecting pressure generated by pressing on the electronic device 1000 . That is, the pressure sensor detects pressure generated by contact or press between the user and the electronic device, eg, contact or press between the user's ear and the mobile terminal. Therefore, the pressure sensor can be used to determine whether contact or pressure occurs between the user and the electronic device 1000, and the magnitude of the pressure.
  • the acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used to identify the application of the posture of the electronic device 1000 (such as horizontal and vertical screen switching, related games, Magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.
  • the electronic device 1000 may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, and a thermometer, which will not be repeated here.
  • the location module 110 is configured to collect location information of the electronic device 1000 .
  • the positioning module 110 can be a GPS (Global Positioning System) module, or a Beidou positioning module.
  • FIG. 10 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • Program codes are stored in the computer-readable storage medium 800, and the program codes can be invoked by a processor to execute the methods described in the foregoing method embodiments.
  • the computer readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium).
  • the computer-readable storage medium 800 has a storage space for program code 810 for executing any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products.
  • Program code 810 may, for example, be compressed in a suitable form.
  • the method, device, electronic device, and storage medium provided by this application will continuously detect vehicle-mounted equipment within a specified period of time, and then continuously detect unidentified location information within a specified period of time.
  • start to acquire the location information of the electronic device and send the location information to the designated device. Therefore, through the above method, the electronic device can automatically trigger to acquire the location information of the electronic device and send the location information according to the detection result of the vehicle-mounted device, thereby improving the convenience of triggering the electronic device to locate.
  • the process of triggering the positioning does not require the participation of the user, the user experience is improved.
  • first and second are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features.
  • the features defined as “first” and “second” may explicitly or implicitly include at least one of these features.
  • “plurality” means at least two, such as two, three, etc., unless otherwise specifically defined.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请实施例公开了一种获取定位信息的方法、装置、电子设备以及存储介质。所述方法包括:若在指定时间长度内,持续检测到未连接过的同一车载设备,开始获取电子设备的位置信息;将所述位置信息发送给指定设备。从而通过上述方式使得电子设备可以根据对车载设备的检测结果,来自动的触发开始获取电子设备的位置信息以及将位置信息进行发送,从而提升了触发电子设备进行定位的便利性。并且,因为触发进行定位的过程中也不需要用户的参与,提升了用户体验。

Description

获取定位信息的方法、装置、电子设备以及存储介质
相关申请的交叉引用
本申请要求于2021年6月18日提交的申请号为202110679027.8的中国申请的优先权,其在此出于所有目的通过引用将其全部内容并入本文。
技术领域
本申请涉及终端技术领域,更具体地,涉及一种获取定位信息的方法、装置、电子设备以及存储介质。
背景技术
随着用于获取位置信息的器件的普及,更多的电子设备都可以支持定位功能,并且定位功能的使用场景也越来越多。例如,用户在行程过程中,可以通过电子设备进行位置信息的采集,并将位置信息发送到其他设备中。
发明内容
鉴于上述问题,本申请实施例提出了一种获取定位信息的方法、装置、电子设备以及存储介质,以改善上述问题。
第一方面,本申请实施例提供了一种获取定位信息的方法,应用于电子设备,所述方法包括:若在指定时间长度内,持续检测到未连接过的同一车载设备,开始获取电子设备的位置信息;将所述位置信息发送给指定设备。
第二方面,本申请实施例提供了一种获取定位信息的装置,运行于电子设备,所述装置包括:定位信息获取单元,用于若在指定时间长度内,持续检测到未连接过的同一车载设备,开始获取电子设备的位置信息;定位信息发送单元,用于将所述位置信息发送给指定设备。
第三方面,本申请实施例提供了一种电子设备,包括一个或多个处理器以及存储器;一个或多个程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行以实现上述的方法。
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有程序代码,其中,在所述程序代码被处理器运行时执行上述的方法。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了本申请实施例提出的一种获取定位信息的方法的应用场景的示意图;
图2示出了本申请一实施例提出的一种获取定位信息的方法的流程图;
图3示出了本申请另一实施例提出的一种获取定位信息的方法的流程图;
图4示出了本申请实施例中用户站在车辆旁的示意图;
图5示出了本申请再一实施例提出的一种获取定位信息的方法的流程图;
图6示出了本申请实施例中车辆并列行驶的示意图;
图7示出了本申请又一实施例提出的一种获取定位信息的方法的流程图;
图8示出了本申请实施例中获取定位信息的装置的结构框图;
图9示出了本申请实时中的用于执行根据本申请实施例的获取定位信息的方法的电子设备的结构框图;
图10示出了本申请实时中的用于保存或者携带实现根据本申请实施例的获取定位信息的方法的程序代码的存储单元。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
随着电子设备的定位功能的普及,在许多的应用场景下,电子设备都可以启动定位功能进行定位信息的采集。例如,用户在使用电子设备打车的过程中,电子设备中的打车应用可以调用电子设备的定位功能以记录电子设备的位置,从而获取到用户所在车辆的行驶轨迹。
但是,发明人发现,相关的触发电子设备进行定位的方式还较为不便。因此,发明人提出了本申请实施例中的获取定位信息的方法、装置、电子设备以及存储介质,在本申请实施例提供的方法中会在指定时间长度内持续对车载设备进行检测,进而在在指定时间长度内,持续检测到未连接过的同一车载设备的情况下,开始获取电子设备的位置信息,并将所述位置信息发送给指定设备。从而通过上述方式使得电子设备可以根据对车载设备的检测结果,来自动的触发开始获取电子设备的位置信息以及将位置信息进行发送,从而提升了触发电子设备进行定位的便利性。并且,因为触发进行定位的过程中也不需要用户的参与,使得位置信息的采集更加安全和隐蔽。
在一种实施方式中,本实施例提供的方法还可以包括如下流程:若在 指定时间长度内,持续检测到未连接过的同一车载设备,且所述电子设备的速度大于速度阈值,开始获取电子设备的位置信息。
在一种实施方式中,本实施例提供的方法还可以包括如下流程:若在指定时间长度内,持续检测到未连接过的同一车载设备,且所述车载设备发送的无线信号的信号强度大于强度阈值,开始获取电子设备的位置信息。
在一种实施方式中,本实施例提供的方法还可以包括如下流程:若在指定时间长度内,在多次设备检测过程中均能够检测到未连接过的同一车载设备。
在一种实施方式中,本实施例提供的方法还可以包括如下流程:通过指定通信器件所扫描到的无线信号而确定第一次检测到有未连接过的车载设备时开始计时,若在计时的指定时间长度内,持续检测到在所述指定时间长度开始时刻所检测到的所述车载设备,开始获取电子设备的位置信息。
在一种实施方式中,本实施例提供的方法还可以包括如下流程:在检测到未连接过的同一车载设备指定次数后,开始计时所述指定时间长度。
在一种实施方式中,本实施例提供的方法还可以包括如下流程:若在指定时间长度内,持续检测到未连接的同一车载设备,且所述车载设备与所述电子设备之间的距离小于距离阈值,开始获取电子设备的位置信息。
在一种实施方式中,本实施例提供的方法还可以包括如下流程:从车载设备发送的无线信号中获取所述车载设备所适配的距离计算规则,其中,所述距离计算规则用于计算所述车载设备与所述电子设备之间的距离。
在一种实施方式中,不同类型的车辆,计算车载设备与电子设备之间的距离的距离计算规则或者距离计算参数不同。
在一种实施方式中,本实施例提供的方法还可以包括如下流程:若接收到车载设备基于既定的通信方式发送的无线信号,确定检测到所述车载设备。
在一种实施方式中,本实施例提供的方法还可以包括如下流程:在接收到无线信号,且所述无线信号中增加有表征设备类型为车载设备的标识时,根据所述标识确定所述无线信号为车载设备发送,确定检测到所述车载设备。
在一种实施方式中,本实施例提供的方法还可以包括如下流程:基于蓝牙通信的方式进行广播数据包的扫描,在扫描到车载设备发送的广播数据包后,从扫描到的车载设备发送的广播数据包中获取所述车载设备的标识。
在一种实施方式中,本实施例提供的方法还可以包括如下流程:根据车载设备发送的无线信号所携带数据的组成格式,确定所述车载设备的设备类型。
在一种实施方式中,本实施例提供的方法还可以包括如下流程:将获取的位置信息发送给服务器。
在一种实施方式中,本实施例提供的方法还可以包括如下流程:将获 取的位置信息发送给与所述电子设备关联的电子设备。
在一种实施方式中,本实施例提供的方法还可以包括如下流程:若在指定时间长度内,持续检测不到所述车载设备,停止获取位置信息。
在一种实施方式中,本实施例提供的方法还可以包括如下流程:若在指定时间长度内,持续检测不到所述车载设备,则检测所述电子设备当前的速度;若所述当前的速度小于速度阈值,则停止获取位置信息。
下面先对本申请实施例涉及的一种应用环境进行介绍。
如图1所示,在图1所示的场景中包括有电子设备100、服务器200以及卫星300。其中,电子设备100可以与服务器200以及卫星300进行通信。在通信的过程中,卫星300可以将电子设备100的位置信息直接发送给电子设备100,也可以通过电子设备所连接的基站将电子设备的位置信息发送给电子设备100。电子设备100在获取到自己的位置信息后,则可以将位置信息发送到服务器200中。
其中,电子设备100可以是智能手机、平板电脑、智能手环或者智能手表等。服务器200可以是单个的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云计算、云服务、云存储、以及人工智能平台等基础云计算服务的云服务器。
下面将结合附图来对本申请所包括的实施例进行介绍。
请参阅图2,图2所示为本申请一实施例提出的一种获取定位信息的方法的流程图,应用于电子设备,该方法包括:
S110:若在指定时间长度内,持续检测到未连接过的同一车载设备,开始获取电子设备的位置信息。
在本实施例中,检测到车载设备可以理解为检测到车载设备所发射的无线信号。也就是说,车载设备可以基于既定的通信方式发射无线信号,若电子设备在设备检测过程中能够接收到车载设备发射的无线信号,则电子设备则确定检测到该车载设备。例如,车载设备可以基于蓝牙的方式发射广播信号,若电子设备可以在设备检测过程中,接收到车载设备发射的广播信号,则电子设备确定检测到该车载设备。
其中,指定时间长度的开始时刻可以有多种确定方式。作为一种方式,可以以第一次检测到有未连接过的车载设备的时刻为该指定时间长度的开始时刻。需要说明的是,电子设备中的指定通信器件在启动后,则可以开始通过该指定通信器件对外部设备发射的无线信号进行检测,并且,指定通信器件自身也可以发射无线信号。那么当电子设备通过该指定通信器件所扫描到的无线信号而确定第一次检测到有未连接过的车载设备时则会开始计时,并且在计时的指定时间长度内,能够持续检测到在指定时间长度开始时刻所检测到车载设备,则会开始获取电子设备的位置信息。例如,电子设备在第一次检测到未连接过的车载设备C1时,开始进行计时,若在计时达到该指定时间长度时,电子设备可以持续检测到该车载设备C1,那么则会开始获取电子设备的位置信息。
作为另外一种方式,电子设备可以在检测到未连接过的同一车载设备指定次数后,开始计时该指定时间长度。需要说明的是,在一些情况下,用户只是拿着电子设备站在车辆的旁边,但是在这种情况下,电子设备依然可以检测到身旁的车辆所发射的无线信号,如果电子设备就直接开始指定时间长度的计时,就会造成电子设备误触发启动开始获取电子设备的位置信息,进而也就会造成电子设备的资源浪费。那么在检测到未连接过的同一车载设备指定次数后,再开始计时该指定时间长度,则可以更大程度的降低误触发启动开始获取电子设备的位置信息的概率。
示例性的,该指定次数为2次,那么电子设备可以在第一次检测到未连接过的车载设备C2时,继续进行检测,若再次检测到该车载设备C2时,则确定连续2次检测到车载设备C2,进而会开始计时指定时间长度,并且在该指定长度内能够持续检测到车载设备C2,则会开始获取电子设备的位置信息。
其中,持续检测到未连接过的同一车载设备可以包括:在多次设备检测过程中均能够检测到未连接过的同一车载设备。需要说明的是,电子设备的指定通信器件在启动后,会以指定的频率进行外部设备的检测,也就是说,在指定时间长度内电子设备会进行多次的外部设备的检测,若电子设备在多次的检测外部设备的过程中,每次均能够检测到同一个车载设备,则确定在指定时间长度内能够持续的检测同一个车载设备。
再者,需要说明的是,设备在所发射的无线信号中可以增加关于设备类型的标识,从而使得其他设备接收到无线信号后,可以从无线信号中提取出关于设备类型的标识,以便根据该标识确定当前所接收到的无线信号是何种类型的设备所发送。例如,车载设备可以在无发射的无线信号中,增加关于表征设备类型为车载设备的标识,从而使得电子设备在接收到无线信号,且该无线信号中增加有表征设备类型为车载设备的标识时,可以根据该标识确定出所接收到的无线信号是由车载设备发送,进而电子设备也就确定检测到了车载设备。
以蓝牙通信为例,车载设备可以在所发送的广播信号中增加标识自己为车载设备的标识。其中,广播信号可以理解为发送广播数据包的信号,进而车载设备可以在所发送的广播数据包中的特定字段中携带对应的表征自己为车载设备的标识。如下表所示的一种广播数据包的格式。
Figure PCTCN2022090380-appb-000001
在上表所示的广播数据包的格式中名称为Length字段用于表征广播数据包的长度,名称为Type的字段表征当前数据包的连接类型,名称为MFG ID的字段表征发送该广播数据包的蓝牙模块的生产商的ID,名称为iBeacon的字段表征当前的广播数据包为基于iBeacon模式生成,名称为 MD5的字段表征广播数据包所携带的基于MD5方式加密后的设备标识,字段名称Major、Minor以及Ref均用于携带特征值,以区别同一设备发送的不同数据包。那么可以看出的是,在上表所示的广播数据包中可以在16Byte长度的字段处添加车载设备对应的表征自己设备类型的标识。需要说明的是,上表所示的数据包格式以及每个字段的名称只是示例性的,车载设备所发送的广播数据的数据包格式以及字段名称还可以根据实际所携带的数据进行改变。
相应的,电子设备也可以基于蓝牙通信的方式进行广播数据包的扫描,从而在扫描到车载设备发送的广播数据包后,从扫描到的车载设备发送的广播数据包中获取所述车载设备的标识。例如,若电子设备以蓝牙通信的方式进行广播数据包的扫描,那么在扫描到车载设备同样以蓝牙通信的方式发送的广播数据包后,可以从上表所示的广播数据包的16Byte长度的字段中解析出车载设备的标识。
需要说明的是,前述实施例中所介绍的蓝牙通信方式只是示例性的。除了蓝牙通信方式外,还可以有其他的通信方式,例如,还可以为Wi-Fi Aware方式。
作为另外一种方式,电子设备可以根据设备发送的无线信号所携带数据的组成格式来确定设备的类型。在这种方式中,设备在通过无线信号发送数据的过程中,可以通过指定的协议来生成需要发送的数据,该协议则定义了所生成数据的组成格式。那么对应的,电子设备在接收到设备发送的数据后,则可以通过对该数据的组成格式的识别来确定出设备所对应的类型。可选的,可以预先建立组成格式与类型的对应关系,那么在获取得到设备发送的数据的组成格式后,再根据该组成格式与类型的对应关系来获取得到设备的类型。
在本申请实施例中,开始获取电子设备的位置信息可以理解为调用电子设备的定位器件进行位置信息的采集,也可以理解为读取电子设备已经通过定位器件所采集的位置信息。并且,在本申请实施例中,获取位置信息可以理解为获取实时位置信息,从而使得电子设备能够获取到车载设备所在车辆的行驶路径。
需要说明的是,未连接过的车载设备可以理解为电子设备未与该车载设备之间未建立过通信连接。例如,以蓝牙通信为例,若电子设备在检测到与发送无线信号的车载设备之间没有进行过配对,那么则可以确定该车载设备为未连接过的车载设备。
S120:将所述位置信息发送给指定设备。
在得到位置信息后,为了便于使得其他设备能够及时的获取到电子设备的位置,则可以将所获取到的位置信息发送给指定设备。其中,在本申请实施例中,指定设备可以有多种实施方式。
作为一种方式,所述将所述位置信息发送给指定设备,包括:将获取的位置信息发送给服务器。服务器在接收到电子设备发送的位置信息后, 可以对位置信息进行存储,从而使得当有用户需要查询该电子设备的位置时,可以通过服务器所提供的查询接口来从服务器中查询电子设备所发送的位置信息。
再者,所述将所述位置信息发送给指定设备,还包括:将获取的位置信息发送给与所述电子设备关联的电子设备。需要说明的是,电子设备在将位置信息发送给服务器之后,服务器可能并不会及时的将所接收到的位置信息发送通过查询接口发送给其他设备,而电子设备在获取得到位置信息后,将获取的位置信息发送给与所述电子设备关联的电子设备,有利于使得关联的电子设备能够更加快速及时的获取到电子设备的位置信息。
本实施例提供的一种获取定位信息的方法,会在指定时间长度内持续对车载设备进行检测,进而在在指定时间长度内,持续检测到未连接过的同一车载设备的情况下,开始获取电子设备的位置信息,并将所述位置信息发送给指定设备。从而通过上述方式使得电子设备可以根据对车载设备的检测结果,来自动的触发开始获取电子设备的位置信息以及将位置信息进行发送,从而提升了触发电子设备进行定位的便利性。并且,因为触发进行定位的过程中也不需要用户的参与,提升了用户体验。
请参阅图3,图3所示为本申请一实施例提出的一种获取定位信息的方法的流程图,应用于电子设备,该方法包括:
S210:若在指定时间长度内,持续检测到未连接过的同一车载设备,且所述电子设备的速度大于速度阈值,开始获取电子设备的位置信息。
需要说明的是,在一些情况下,用户只是带着电子设备站在车辆的旁边,但是在这种情况下,电子设备依然可以检测到身旁的车辆所发射的无线信号,那么如果电子设备就直接开始指定时间长度的计时,就可能会造成电子设备误触发启动开始获取电子设备的位置信息,进而也就会造成电子设备的资源浪费。
示例性的,如图4所示,用户将自己的电子设备100放在裤兜里面,并站在车辆400的旁边。其中,车辆400中的车载设备可以以固定的频率发射无线信号,那么电子设备100在进入到车辆400的车载设备所发射的无线信号的覆盖范围后,则可以接收到车辆400的车载设备所发射的无线信号。但是,该用户可能只是站在车辆400的旁边,而并不是会去搭乘车辆400,在这种情况下,电子设备100依然直接在指定时间长度内持续检测到未连接过的同一车载设备(车辆400的车载设备),后就开始获取电子设备的位置信息,会造成对于位置信息的获取是没有起到监测行驶路径的效果的。
再者,可以理解的是,用户在搭乘车辆的过程中,随身携带的电子设备所检测到的自身的移动速度是和车辆的速度匹配的,那么电子设备通过对自身速度的检测,可以识别到电子设备所属的用户是否实际是在车辆上,进而提升触发开始获取电子设备的位置信息的时机的准确性。可选的其中的速度阈值可以理解为用于确定电子设备所属用户实际是在搭乘车辆的阈 值。例如,该速度阈值可以为每小时10km,或者还可以为每小时20km。
S220:将所述位置信息发送给指定设备。
下面再通过一个实例来对本实施例中的方法进行说明。
在本实例中,指定时间长度为1分钟,速度阈值为每小时10km,电子设备通过蓝牙信号发现车载设备。那么当电子设备在启动蓝牙模块的情况下,会开始对其他设备所发射的蓝牙信号进行检测。若检测有设备通过蓝牙通信方式发送的广播信号后,开始通过该广播信号获取发送广播信号的设备的标识,若识别到该标识表征发送广播信号的设备为车载设备(例如,车载设备C),那么电子设备开始计时长度为1分钟的计时,若在该1分钟内能够持续检测到该车载设备C,那么电子设备进一步的获取自己的速度,若获取到自己的速度大于每小时10km,则开始获取电子设备的位置信息,并将获取到的位置信息发送给指定设备。
本实施例提供的一种获取定位信息的方法,从而通过上述方式使得电子设备可以根据对车载设备的检测结果,来自动的触发开始获取电子设备的位置信息以及将位置信息进行发送,从而提升了触发电子设备进行定位的便利性。并且,因为触发进行定位的过程中也不需要用户的参与,提升了用户体验。并且,在本实施例中还是会进一步的在检测到电子设备的速度大于速度阈值后,才会开始获取电子设备的位置信息,进而降低了电子设备所属用户实际是在车辆的周围,而不是在车辆上而造成的误启动获取位置信息的概率。
请参阅图5,图5所示为本申请一实施例提出的一种获取定位信息的方法的流程图,应用于电子设备,该方法包括:
S310:若在指定时间长度内,持续检测到未连接过的同一车载设备,且所述车载设备发送的无线信号的信号强度大于强度阈值,开始获取电子设备的位置信息。
需要说明的是,无线信号是具有一定的穿透性的,从而使得即使电子设备在车辆的外部也可以接收到车辆的车载设备所发射的无线信号。如图6所示,车辆400和车辆500在同一条路上并行的形式,并且车辆400和车辆500的速率是相同的,那么在车辆400和车辆500各自都会发送无线信号的情况下,车辆400内的电子设备则可以接收到车辆500的车载设备所发射的无线信号。同样的,车辆500内的电子设备则可以接收到车辆400的车载设备所发射的无线信号,进而车辆500内的电子设备可能会因为车辆400的车载设备所发射的无线信号而触发开始获取电子设备的位置信息,对应的,车辆400内的电子设备可能会因为车辆500的车载设备所发射的无线信号而触发开始获取电子设备的位置信息。那么为了更大概率的避免该种情况,电子设备可以进一步的结合所接收车载设备所发射无线信号的信号强度,来确定是否触发开始获取电子设备的位置信息。
可以理解的是,无线信号的信号强度会随着传播的距离而衰减。进而,处于车辆内的电子设备相比于车辆外的电子设备所接收到的无线信号的强 度会相对更高。例如,车辆400内的电子设备所接收到的车辆400的车载设备所发射的无线信号的信号强度,会比车辆500的车载设备所发射的无线信号的信号强度更强。对应的,车辆500内的电子设备所接收到的车辆500的车载设备所发射的无线信号的信号强度,会比车辆400的车载设备所发射的无线信号的信号强度更强。那么本实施例中的,强度阈值则为表征接收到无线信号的电子设备处于发射无线信号的车辆内的阈值。
其中,作为一种方式,可以通过预先将电子设备放置到车辆内,然后获取到车辆内的电子设备所获取到的无线信号的信号强度来配置强度阈值。在这种方式下,若电子设备获取到的信号强度为a,那么则可以将强度阈值配置为a。其中,信号强度可以为接收信号强度RSSI(Received Signal Strength Indication)。
作为另外一种方式,在进一步的确认电子设备是否在所检测到的车载设备所属车辆内的方式中,除了可以直接根据车载设备发送的无线信号的信号强度来进行判断外,还可以进一步的根据信号强度所计算得到的电子设备与车载设备之间的距离来进行判断。那么在这种方式下,电子设备可以在若在指定时间长度内,持续检测到未连接过的同一车载设备,且所述车载设备与电子设备之间的距离小于距离阈值,开始获取电子设备的位置信息。
需要说明的是,车载设备所发射的无线信号可能会受到车载设备处于车辆内部的位置以及自身形态的影响,从而使得即使车载设备可能与电子设备实际是在不同的位置,而因为各自发射的无线信号的衰减的程度的不同,而使得电子设备测量出该两个车辆设备与电子设备处于相同的距离。
那么为了能够更为准确的根据车载设备发射的无线信号,来获取得到电子设备与车载设备之间的距离,可以针对多个类型的车辆分别进行选取合适的距离计算规则或者距离计算参数。
需要说明的是,在根据信号强度来计算设备之间的距离的过程中,电子设备会将信号强度代入到距离计算规则中,从而得到根据距离计算规则所输出的距离。而对于相同的信号强度,不同的距离计算规则可能计算出的距离是不同的。那么对于多个类型的车辆,可以在预先已知电子设备与车载设备之间的实际距离的情况下,使用多种距离计算规则来获取计算出的距离,进而将所计算出的距离与实际最接近的一种距离计算规则来作为该类型的车辆适配的距离计算规则。
示例性的,可以用于计算电子设备和车载设备之间距离的规则包括有距离计算规则p1、距离计算规则p2以及距离计算规则p3。当前用于确定适配的距离计算规则的车辆类型为类型G1。在适配过程中,可以将电子设备预先放置在距离车载设备1米处的位置,然后电子设备分别使用前述的距离计算规则p1、距离计算规则p2以及距离计算规则p3来计算车载设备与电子设备之间的距离,若根据车载设备发射的无线信号以及距离计算规则p1所计算出的距离为0.9米,若根据车载设备发射的无线信号以及距离计算规则p2所计 算出的距离为0.95米,若根据车载设备发射的无线信号以及距离计算规则p3所计算出的距离为0.98米(最接近实际距离1米),那么则类型G1的车辆的车载设备所适配的计算规则为距离计算规则p3。类似的,通过前述方式可以确定多个类型的车辆各自所适配的距离计算规则。
作为一种方式,车载设备可以将自己所适配的距离计算规则携带在所发射的无线信号中,从而使得需要进行距离计算的设备可以便利的获取到车载设备所适配的距离计算规则。例如,车载设备可以将距离计算规则携带在自己所发射的广播信号中,从而使得电子设备在接收到车载设备所发射的广播信号后,就可以从广播信号中提取出车载设备所适配的距离计算规则。例如,若电子设备从广播信号中获取到的计算规则为距离计算规则p3,那么则会通过该距离计算规则p3来进行距离计算。
再者,需要说明的是,用于进行距离计算的距离计算规则中,除了会利用到无线信号的信号强度外,还会使用到另外的参数,该另外的参数可以确定为距离计算参数。示例性的,如下所示的一种距离计算规则:
Figure PCTCN2022090380-appb-000002
其中,d表征所计算出的距离值,RSSI表征无线信号的信号强度,M表征参考距离,N表征路径损耗因子。其中,参数M和参数N则为除了信号强度以外的参数,即为距离计算参数。在这种方式中,用于计算不同设备之间的距离的距离计算规则均是相同的,而对不同的设备可能会适配不同的距离计算参数。那么在配置不同设备对应的距离计算参数的过程中,可以先获取得到车载设备和电子设备之间的实际距离,然后电子设备再获取得到车载设备所发射的无线信号的信号强度,然后改变电子设备和车载设备之间的实际距离,并且在每次进行实际距离的改变后,电子设备都会获取一次当前车载设备所发射的无线信号的信号强度,进而得到如下表所示的多组实际距离与信号强度的对应关系。
ID 实际距离 信号强度
1 d1 Q1
2 d2 Q2
...... ...... ......
n dn Qn
那么通过上表中的多组实际距离与信号强度的对应关系则可以计算得到距离计算规则中的距离计算参数,进而将所计算得到的距离计算参数作为车载设备对应的距离计算参数。类似的,车载设备也可以将距离计算参数携带在所发射的无线信号中以便其他的电子设备可以便利的获取得到。
S320:将所述位置信息发送给指定设备。
下面再通过一个实例来对本实施例中涉及的一种方法进行说明。
在本实例中,指定时间长度为1分钟,强度阈值为q,电子设备通过蓝牙信号发现车载设备。那么当电子设备在启动蓝牙模块的情况下,会开始对其他设备所发射的蓝牙信号进行检测。若检测有设备通过蓝牙通信方 式发送的广播信号后,开始通过该广播信号获取发送广播信号的设备的标识,若识别到该标识表征发送广播信号的设备为车载设备(例如,车载设备C),那么电子设备开始计时长度为1分钟的计时,若在该1分钟内能够持续检测到该车载设备C,那么电子设备进一步的获取该车载设备C发射的广播信号的信号强度,若获取到信号强度大于q,则开始获取电子设备的位置信息,并将获取到的位置信息发送给指定设备。
下面再通过一个实例来对本实施例中的另一种方法进行说明。
在本实例中,指定时间长度为1分钟,距离阈值为1米,电子设备通过蓝牙信号发现车载设备。那么当电子设备在启动蓝牙模块的情况下,会开始对其他设备所发射的蓝牙信号进行检测。若检测有设备通过蓝牙通信方式发送的广播信号后,开始通过该广播信号获取发送广播信号的设备的标识,若识别到该标识表征发送广播信号的设备为车载设备(例如,车载设备C),那么电子设备开始计时长度为1分钟的计时,若在该1分钟内能够持续检测到该车载设备C,那么电子设备进一步的获取与车载设备C之间的距离,若获取到距离小于1米,则开始获取电子设备的位置信息,并将获取到的位置信息发送给指定设备。
本实施例提供的一种获取定位信息的方法,从而通过上述方式使得电子设备可以根据对车载设备的检测结果,来自动的触发开始获取电子设备的位置信息以及将位置信息进行发送,从而提升了触发电子设备进行定位的便利性。并且,因为触发进行定位的过程中也不需要用户的参与,提升了用户体验。并且,在本实施例中,电子设备还会进一步的检测该未连接过的车载设备所发送的无线信号的信号强度,进而通过接收到的车载设备的无线信号的信号强度来确定电子设备所属用户是否实际在车载设备所属车辆中,以降低误触发启动获取位置信息的概率。
请参阅图7,图7所示为本申请一实施例提出的一种获取定位信息的方法的流程图,应用于电子设备,该方法包括:
S410:若在指定时间长度内,持续检测到未连接过的同一车载设备,开始获取电子设备的位置信息。
S420:将所述位置信息发送给指定设备。
S430:若在指定时间长度内,持续检测不到所述车载设备,停止获取位置信息。
其中,电子设备在开始获取电子设备的位置信息后,也依然可以继续的对车载设备所发射的无线信号进行检测。可以理解的是,电子设备通过继续对车载设备所发射的无线信号进行检测,可以确定电子设备所属用户会在什么时候离开车载设备所属车辆,进而以便能够及时的确定停止获取位置信息的时刻,以便降低电子设备的功耗。
其中,指定时间长度内,持续检测不到所述车载设备可以理解为在该指定时间长度内,每次进行的设备检测均未检测到该同一车载设备。其中,该指定时间长度的计时开始时刻可以为在首次未检测到该同一车载设备的 时刻。示例性的,若电子设备在指定时间长度内,持续检测到未连接过的车载设备D,那么则电子设备可以开始获取电子设备的位置信息。并且在开始获取电子设备的位置信息后,继续的对车载设备D进行检测。若在指定时间长度内,持续检测不到车载设备D,则会停止获取位置信息。
再者,需要说明的是,车辆在行驶过程中也可能会有暂时关闭发射无线信号的器件的可能,从而使得车载设备会暂停进行无线信号的发射,那么在这种情况下,就可能会使得电子设备误识别到电子设备所属用户已经离开了车辆,进而停止继续获取位置信息。那么为了改善该问题,电子设备可以在指定时间长度内,持续检测不到所述车载设备的情况下,进一步的检测电子设备当前的速度,若当前的速度小于速度阈值(这里的速度阈值也可以为前述实施例中触发进行位置获取的速度阈值),则停止获取位置信息。从而通过结合电子设备当前的速度的方式,进一步的确定电子设备所属用户是否实际已经离开了之前所乘坐的车辆,避免因为车载设备只是暂时关闭发射无线信号的器件,而造成的误触发停止获取位置信息。
示例性的,电子设备是在持续检测到未连接过的车载设备C而触发开始进行位置信息获取的。那么电子设备在开始获取电子设备的位置信息后,依然会持续的对车载设备C进行检测,并在指定时间长度内持续检测不到该车载设备C的情况下,进一步的获取电子设备自身的速度,并且在获取到速度低于速度阈值的情况下,停止获取位置信息。
本实施例提供的一种获取定位信息的方法,从而通过上述方式使得电子设备可以根据对车载设备的检测结果,来自动的触发开始获取电子设备的位置信息以及将位置信息进行发送,从而提升了触发电子设备进行定位的便利性。并且,因为触发进行定位的过程中也不需要用户的参与,提升了用户体验。并且,在本实施例中,若在指定时间长度内,持续检测不到所述车载设备,停止获取位置信息,进而有利于降低电子设备的功耗。
请参阅图8,图8所示为本申请一实施例提出的一种获取定位信息的装置500的结构框图,该装置500运行于电子设备,该装置500包括:
定位信息获取单元510,用于若在指定时间长度内,持续检测到未连接过的同一车载设备,开始获取电子设备的位置信息。
定位信息发送单元520,用于将所述位置信息发送给指定设备。
作为一种方式,定位信息获取单元510,具体用于若在指定时间长度内,持续检测到未连接过的同一车载设备,且所述电子设备的速度大于速度阈值,开始获取电子设备的位置信息。
作为另外一种方式,定位信息获取单元510,具体用于若在指定时间长度内,持续检测到未连接过的同一车载设备,且所述车载设备发送的无线信号的信号强度大于强度阈值,开始获取电子设备的位置信息。
需要说明的是,所述若在指定时间长度内,持续检测到未连接过的同一车载设备,包括:若在指定时间长度内,在多次设备检测过程中均能够检测到未连接过的同一车载设备。
可选的,定位信息获取单元510,具体用于通过指定通信器件所扫描到的无线信号而确定第一次检测到有未连接过的车载设备时开始计时,若在计时的指定时间长度内,持续检测到在所述指定时间长度开始时刻所检测到的所述车载设备,开始获取电子设备的位置信息。
可选的,定位信息获取单元510,还用于在检测到未连接过的同一车载设备指定次数后,开始计时所述指定时间长度。
可选的,定位信息获取单元510,还用于若在指定时间长度内,持续检测到未连接的同一车载设备,且所述车载设备与所述电子设备之间的距离小于距离阈值,开始获取电子设备的位置信息。
可选的,定位信息获取单元510,还用于从车载设备发送的无线信号中获取所述车载设备所适配的距离计算规则,其中,所述距离计算规则用于计算所述车载设备与所述电子设备之间的距离。
可选的,定位信息获取单元510,还用于若接收到车载设备基于既定的通信方式发送的无线信号,确定检测到所述车载设备。
可选的,定位信息获取单元510,还用于在接收到无线信号,且所述无线信号中增加有表征设备类型为车载设备的标识时,根据所述标识确定所述无线信号为车载设备发送,确定检测到所述车载设备。
可选的,定位信息获取单元510,还用于基于蓝牙通信的方式进行广播数据包的扫描,在扫描到车载设备发送的广播数据包后,从扫描到的车载设备发送的广播数据包中获取所述车载设备的标识。
可选的,定位信息获取单元510,还用于根据车载设备发送的无线信号所携带数据的组成格式,确定所述车载设备的设备类型。
作为一种方式,定位信息发送单元520,具体用于将获取的位置信息发送给服务器。再者,定位信息发送单元520,还具体用于将获取的位置信息发送给与所述电子设备关联的电子设备。
作为一种方式,定位信息发送单元520,还用于若在指定时间长度内,持续检测不到所述车载设备,停止获取位置信息。
作为一种方式,定位信息发送单元520,还用于若在指定时间长度内,持续检测不到所述车载设备,则检测所述电子设备当前的速度;若所述当前的速度小于速度阈值,则停止获取位置信息。
本实施例提供的一种获取定位信息的装置,会在指定时间长度内持续对车载设备进行检测,进而在在指定时间长度内,持续检测到未连接过的同一车载设备的情况下,开始获取电子设备的位置信息,并将所述位置信息发送给指定设备。从而通过上述方式使得电子设备可以根据对车载设备的检测结果,来自动的触发开始获取电子设备的位置信息以及将位置信息进行发送,从而提升了触发电子设备进行定位的便利性。并且,因为触发进行定位的过程中也不需要用户的参与,提升了用户体验。
需要说明的是,本申请中装置实施例与前述方法实施例是相互对应的,装置实施例中具体的原理可以参见前述方法实施例中的内容,此处不再赘述。
下面将结合图9对本申请提供的一种电子设备进行说明。
请参阅图9,基于上述的获取定位信息的方法、装置,本申请实施例还提供的另一种可以执行前述获取定位信息的方法的电子设备1000。电子设备1000包括相互耦合的一个或多个(图中仅示出一个)处理器102、存储器104、网络模块106、传感器模块108以及定位模块110。其中,该存储器104中存储有可以执行前述实施例中内容的程序,而处理器102可以执行该存储器104中存储的程序。
其中,处理器102可以包括一个或者多个处理核。处理器102利用各种接口和线路连接整个电子设备1000内的各个部分,通过运行或执行存储在存储器104内的指令、程序、代码集或指令集,以及调用存储在存储器104内的数据,执行电子设备1000的各种功能和处理数据。可选地,处理器102可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器102可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器102中,单独通过一块通信芯片进行实现。
存储器104可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。存储器104可用于存储指令、程序、代码、代码集或指令集。存储器104可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。例如,存储器104中可以存储有获取定位信息的装置。该获取定位信息的装置可以为前述的装置500。存储数据区还可以存储电子设备1000在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。
所述网络模块106用于接收以及发送电磁波,实现电磁波与电信号的相互转换,从而与通讯网络或者其他设备进行通讯,例如和音频播放设备进行通讯。所述网络模块106可包括各种现有的用于执行这些功能的电路元件,例如,天线、射频收发器、数字信号处理器、加密/解密芯片、用户身份模块(SIM)卡、存储器等等。所述网络模块106可与各种网络如互联网、企业内部网、无线网络进行通讯或者通过无线网络与其他设备进行通讯。上述的无线网络可包括蜂窝式电话网、无线局域网或者城域网。例如,网络模块106可以与基站进行信息交互。
传感器模块108可以包括至少一种传感器。具体地,传感器模块108可包括但并不限于:光传感器、运动传感器、压力传感器、红外热传感器、距离传感器、加速度传感器、以及其他传感器。
其中,压力传感器可以检测由按压在电子设备1000产生的压力的传感器。即,压力传感器检测由用户和电子设备之间的接触或按压产生的压力,例如由用户的耳朵与移动终端之间的接触或按压产生的压力。因此,压力传感器可以用来确定在用户与电子设备1000之间是否发生了接触或者按压,以及压力的大小。
其中,加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别所述电子设备1000姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等。另外,所述电子设备1000还可配置陀螺仪、气压计、湿度计、温度计等其他传感器,在此不再赘述。
定位模块110,用于采集电子设备1000的位置信息。可选的,该定位模块110可以为GPS(Global Positioning System)模块,或者北斗定位模块。
请参考图10,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读存储介质800中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。
计算机可读存储介质800可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质800包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质800具有执行上述方法中的任何方法步骤的程序代码810的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码810可以例如以适当形式进行压缩。
综上所述,本申请提供的一种获取定位信息的方法、装置、电子设备以及存储介质,会在指定时间长度内持续对车载设备进行检测,进而在在指定时间长度内,持续检测到未连接过的同一车载设备的情况下,开始获取电子设备的位置信息,并将所述位置信息发送给指定设备。从而通过上述方式使得电子设备可以根据对车载设备的检测结果,来自动的触发开始获取电子设备的位置信息以及将位置信息进行发送,从而提升了触发电子设备进行定位的便利性。并且,因为触发进行定位的过程中也不需要用户的参与,提升了用户体验。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、 “第二”的特征可以明示或者隐含地包括至少一个该特征。在本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种获取定位信息的方法,其中,应用于电子设备,所述方法包括:
    若在指定时间长度内,持续检测到未连接过的同一车载设备,开始获取电子设备的位置信息;
    将所述位置信息发送给指定设备。
  2. 根据权利要求1所述的方法,其中,所述若在指定时间长度内,持续检测到未连接过的同一车载设备,开始获取电子设备的位置信息,包括:
    若在指定时间长度内,持续检测到未连接过的同一车载设备,且所述电子设备的速度大于速度阈值,开始获取电子设备的位置信息。
  3. 根据权利要求1所述的方法,其中,所述若在指定时间长度内,持续检测到未连接过的同一车载设备,开始获取电子设备的位置信息,包括:
    若在指定时间长度内,持续检测到未连接过的同一车载设备,且所述车载设备发送的无线信号的信号强度大于强度阈值,开始获取电子设备的位置信息。
  4. 根据权利要求1所述的方法,其中,所述若在指定时间长度内,持续检测到未连接过的同一车载设备,包括:
    若在指定时间长度内,在多次设备检测过程中均能够检测到未连接过的同一车载设备。
  5. 根据权利要求1-4任一所述的方法,其中,所述若在指定时间长度内,持续检测到未连接过的同一车载设备,开始获取电子设的位置信息,包括:
    通过指定通信器件所扫描到的无线信号而确定第一次检测到有未连接过的车载设备时开始计时,若在计时的指定时间长度内,持续检测到在所述指定时间长度开始时刻所检测到的所述车载设备,开始获取电子设备的位置信息。
  6. 根据权利要求5所述的方法,其中,所述方法还包括:
    在检测到未连接过的同一车载设备指定次数后,开始计时所述指定时间长度。
  7. 根据权利要求1-4任一所述的方法,其中,所述若在指定时间长度内,持续检测到未连接过的同一车载设备,开始获取电子设的位置信息,包括:
    若在指定时间长度内,持续检测到未连接的同一车载设备,且所述车载设备与所述电子设备之间的距离小于距离阈值,开始获取电子设备的位置信息。
  8. 根据权利要求7所述的方法,其中,所述方法还包括:
    从车载设备发送的无线信号中获取所述车载设备所适配的距离计算规则,其中,所述距离计算规则用于计算所述车载设备与所述电子设备之间的距离。
  9. 根据权利要求8所述的方法,其中,不同类型的车辆,计算车载设备与电子设备之间的距离的距离计算规则或者距离计算参数不同。
  10. 根据权利要求1-9任一所述的方法,其中,所述方法还包括:
    若接收到车载设备基于既定的通信方式发送的无线信号,确定检测到所述车载设备。
  11. 根据权利要求1-9任一所述的方法,其中,所述方法还包括:
    在接收到无线信号,且所述无线信号中增加有表征设备类型为车载设备的标识时,根据所述标识确定所述无线信号为车载设备发送,确定检测到所述车载设备。
  12. 根据权利要求11所述的方法,其中,所述方法还包括:
    基于蓝牙通信的方式进行广播数据包的扫描,在扫描到车载设备发送的广播数据包后,从扫描到的车载设备发送的广播数据包中获取所述车载设备的标识。
  13. 根据权利要求11所述的方法,其中,所述方法还包括:
    根据车载设备发送的无线信号所携带数据的组成格式,确定所述车载设备的设备类型。
  14. 根据权利要求1所述的方法,其中,所述将所述位置信息发送给指定设备,包括:
    将获取的位置信息发送给服务器。
  15. 根据权利要求14所述的方法,其中,所述将所述位置信息发送给指定设备,还包括:
    将获取的位置信息发送给与所述电子设备关联的电子设备。
  16. 根据权利要求1-15任一所述的方法,其中,所述将所述位置信息发送给指定设备之后还包括:
    若在指定时间长度内,持续检测不到所述车载设备,停止获取位置信息。
  17. 根据权利要求1-15任一所述的方法,其中,所述将所述位置信息发送给指定设备之后还包括:
    若在指定时间长度内,持续检测不到所述车载设备,则检测所述电子设备当前的速度;
    若所述当前的速度小于速度阈值,则停止获取位置信息。
  18. 一种获取定位信息的装置,其中,运行于电子设备,所述装置包括:
    定位信息获取单元,用于若在指定时间长度内,持续检测到未连接过的同一车载设备,开始获取电子设备的位置信息;
    定位信息发送单元,用于将所述位置信息发送给指定设备。
  19. 一种电子设备,其中,包括一个或多个处理器以及存储器;一个或多个程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行权利要求1-17任一所述的方法。
  20. 一种计算机可读存储介质,其中,所述计算机可读存储介质中存储有程序代码,其中,在所述程序代码被处理器运行时执行权利要求1-17任一所述的方法。
PCT/CN2022/090380 2021-06-18 2022-04-29 获取定位信息的方法、装置、电子设备以及存储介质 WO2022262445A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110679027.8A CN115580834A (zh) 2021-06-18 2021-06-18 获取定位信息的方法、装置以及电子设备
CN202110679027.8 2021-06-18

Publications (1)

Publication Number Publication Date
WO2022262445A1 true WO2022262445A1 (zh) 2022-12-22

Family

ID=84526918

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/090380 WO2022262445A1 (zh) 2021-06-18 2022-04-29 获取定位信息的方法、装置、电子设备以及存储介质

Country Status (2)

Country Link
CN (1) CN115580834A (zh)
WO (1) WO2022262445A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117354839A (zh) * 2023-12-06 2024-01-05 安徽高灯微行科技有限公司 唤醒灵敏度调节方法、装置、计算机设备和存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103576123A (zh) * 2012-08-08 2014-02-12 欧姆龙汽车电子株式会社 便携机的位置判定系统、位置判定方法及位置判定装置
US20150090786A1 (en) * 2013-08-06 2015-04-02 Reinhard Surkau Method for continuous detection of a persons presence on public transportation
KR101553540B1 (ko) * 2014-07-10 2015-09-16 에스케이텔레콤 주식회사 차량 탑승 추론을 위한 장치 및 방법, 이를 위한 기록매체
CN106791009A (zh) * 2016-11-28 2017-05-31 北京奇虎科技有限公司 协助用户安全出行的方法及相关设备
CN106912026A (zh) * 2017-02-24 2017-06-30 广东小天才科技有限公司 一种乘车状态确定方法及装置
CN107481331A (zh) * 2016-06-06 2017-12-15 张欣 一种自动判别人员进入及离开车辆状态的方法和系统
CN111132000A (zh) * 2018-10-15 2020-05-08 上海博泰悦臻网络技术服务有限公司 一种位置共享的方法及系统

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103576123A (zh) * 2012-08-08 2014-02-12 欧姆龙汽车电子株式会社 便携机的位置判定系统、位置判定方法及位置判定装置
US20150090786A1 (en) * 2013-08-06 2015-04-02 Reinhard Surkau Method for continuous detection of a persons presence on public transportation
KR101553540B1 (ko) * 2014-07-10 2015-09-16 에스케이텔레콤 주식회사 차량 탑승 추론을 위한 장치 및 방법, 이를 위한 기록매체
CN107481331A (zh) * 2016-06-06 2017-12-15 张欣 一种自动判别人员进入及离开车辆状态的方法和系统
CN106791009A (zh) * 2016-11-28 2017-05-31 北京奇虎科技有限公司 协助用户安全出行的方法及相关设备
CN106912026A (zh) * 2017-02-24 2017-06-30 广东小天才科技有限公司 一种乘车状态确定方法及装置
CN111132000A (zh) * 2018-10-15 2020-05-08 上海博泰悦臻网络技术服务有限公司 一种位置共享的方法及系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117354839A (zh) * 2023-12-06 2024-01-05 安徽高灯微行科技有限公司 唤醒灵敏度调节方法、装置、计算机设备和存储介质
CN117354839B (zh) * 2023-12-06 2024-02-20 安徽高灯微行科技有限公司 唤醒灵敏度调节方法、装置、计算机设备和存储介质

Also Published As

Publication number Publication date
CN115580834A (zh) 2023-01-06

Similar Documents

Publication Publication Date Title
CN109151796B (zh) Nan设备寻找方法、相关设备以及计算机可读存储介质
EP2676501B1 (en) Methods, apparatuses and computer program products for providing a private and efficient geolocation system
CN107566985B (zh) 一种移动终端主sim卡确定方法及装置
CN104202729B (zh) 一种联系人的添加方法、装置及系统
CN110933653B (zh) 消息传输方法、装置、终端及存储介质
CN111405466A (zh) 站点识别方法、到站提醒方法、装置、终端及存储介质
CN109275090B (zh) 信息处理方法、装置、终端及存储介质
CN111356077B (zh) 站点预测方法、装置、终端及存储介质
CN107948919B (zh) 一种共享资讯处理方法及移动终端
CN109217995B (zh) 一种数据处理方法、终端以及基站
WO2018145477A1 (zh) 一种网络接入方法及终端
CN109714716B (zh) 数据包转发方法、装置及移动终端
CN114463898A (zh) 一种快递取件提醒方法和装置
WO2022247390A1 (zh) 测量设备距离的方法、装置、电子设备以及可读存储介质
WO2022262445A1 (zh) 获取定位信息的方法、装置、电子设备以及存储介质
CN112291710A (zh) 测距方法、装置、存储介质及电子设备
CN108551525B (zh) 一种移动轨迹的状态确定方法和移动终端
CN109348424B (zh) 信息传输方法、装置以及电子装置
CN110622528B (zh) 一种信息推荐方法及装置
CN109565464A (zh) 红包数据处理方法及设备
CN114073118B (zh) 位置确定方法、装置、通信设备及存储介质
CN113114752A (zh) 基于公共交通场景的数据获取方法、装置、终端及服务器
CN109067847B (zh) 一种资源转移方法、接收终端、发送终端及服务器
CN112261735A (zh) 健康信息检测方法、系统及移动终端
CN109041212B (zh) 一种定位方法及可穿戴设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22823928

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE