Method and apparatus for processing parking space information
A method for processing parking space information includes detecting, before a driver sends information for requesting an effective parking space, whether an idle parking space exists in a traveling environment of a vehicle and recording information about the idle parking space. After the driver sends the information for requesting an effective parking space, stored information about one or more effective parking spaces is then recommended to the driver.
1 . A method comprising:
detecting, in a traveling process of a vehicle, whether an idle parking space exists in a traveling environment of the vehicle;
adding, when the idle parking space exists in the traveling environment, idle parking space information about the idle parking space to a first parking space information set, wherein the first parking space information set records the idle parking space information;
receiving first information, wherein the first information requests information about one or more effective parking spaces, and wherein the one or more effective parking spaces comprises one or more idle parking spaces that meets a preset condition, wherein the preset condition comprises a time difference between a time at which the idle parking space is detected and a current time being less than or equal to a preset duration; and
outputting effective parking space information about the one or more effective parking spaces in response to the first information, wherein the effective parking space information comprises the idle parking space information in the first parking space information set.
2 . The method of claim 1 , further comprising receiving second information, wherein the second information indicates a destination of the vehicle, and wherein detecting whether the idle parking space exists in the traveling environment comprises starting, in the traveling process and after a distance between a location of the vehicle and the destination is less than or equal to a first preset distance, to detect whether the idle parking space exists in the traveling environment.
3 . The method of claim 2 , further comprising receiving third information, wherein the third information indicates the first preset distance.
4 . The method of claim 1 , further comprising receiving fourth information, wherein the fourth information indicates the preset duration.
5 . The method of claim 1 , wherein outputting the effective parking space information in response to the first information comprises:
obtaining a second parking space information set through a network in response to the first information, wherein the second parking space information set records the idle parking space information;
obtaining the effective parking space information from the first parking space information set and the second parking space information set; and
outputting the effective parking space information.
6 . The method of claim 1 , further comprising:
storing the effective parking space information about the one or more effective parking spaces within the preset duration; and
deleting the effective parking space information after the preset duration is exceeded.
7 . An apparatus comprising:
a detection module configured to detect, in a traveling process of a vehicle, whether an idle parking space exists in a traveling environment of the vehicle;
a receiving module configured to receive first information, wherein the first information requests information about one or more effective parking spaces, and wherein the one or more effective parking spaces comprises one or more idle parking spaces that meets a preset condition, wherein the preset condition comprises a time difference between a time at which the idle parking space is detected and a current time being less than or equal to a preset duration; and
a processor coupled to the detection module and the receiving module, wherein the processor is configured to:
add, when the idle parking space exists in the traveling environment, idle parking space information about the idle parking space to a first parking space information set, wherein the first parking space information set records the idle parking space information; and
output effective parking space information about the one or more effective parking spaces in response to the first information, wherein the effective parking space information comprises the idle parking space information in the first parking space information set.
8 . The apparatus of claim 7 , wherein the receiving module is further configured to receive second information, wherein the second information indicates a destination of the vehicle, and wherein the detection module is further configured to start, in the traveling process and after a distance between a location of the vehicle and the destination is less than or equal to a first preset distance, to detect whether the idle parking space exists in the traveling environment.
9 . The apparatus of claim 8 , wherein the receiving module is further configured to receive third information, wherein the third information indicates the first preset distance.
10 . The apparatus of claim 7 , wherein the receiving module is further configured to receive fourth information, wherein the fourth information indicates the preset duration.
11 . The apparatus of claim 7 , wherein the processor is further configured to:
obtain a second parking space information set through a network in response to the first information, wherein the second parking space information set records the idle parking space information;
obtain the effective parking space information from the first parking space information set and the second parking space information set; and
output the effective parking space information.
12 . The apparatus of claim 7 , wherein the processor is further configured to:
store the effective parking space information about the one or more effective parking spaces within the preset duration; and
delete the effective parking space information after the preset duration is exceeded.
13 . A non-transitory computer-readable medium having stored therein computer program product comprising instructions that, when executed by a processor, cause an apparatus to:
detect, in a traveling process of a vehicle, whether an idle parking space exists in a traveling environment of the vehicle;
add, when the idle parking space exists in the traveling environment, idle parking space information about the idle parking space to a first parking space information set, wherein the first parking space information set records the idle parking space information;
receive first information, wherein the first information requests information about one or more effective parking spaces, and wherein the one or more effective parking spaces comprises one or more idle parking spaces that meets a preset condition, wherein the preset condition comprises a time difference between a time at which the idle parking space is detected and a current time being less than or equal to a preset duration; and
output effective parking space information about the one or more effective parking spaces in response to the first information, wherein the effective parking space information comprises the idle parking space information in the first parking space information set.
14 . The non-transitory computer-readable medium of claim 13 , wherein the instructions, when executed by the processor, further cause the apparatus to receive second information, wherein the second information indicates a destination of the vehicle, and wherein detecting whether the idle parking space exists in the traveling environment comprises starting, in the traveling process and after a distance between a location of the vehicle and the destination is less than or equal to a first preset distance, to detect whether the idle parking space exists in the traveling environment.
15 . The non-transitory computer-readable medium of claim 14 , wherein the instructions, when executed by the processor, further cause the apparatus to receive third information, wherein the third information indicates the first preset distance.
16 . The non-transitory computer-readable medium of claim 13 , wherein the instructions, when executed by the processor, further cause the apparatus to receive fourth information indicating the preset duration.
17 . The non-transitory computer-readable medium of claim 13 , wherein the instructions, when executed by the processor, further cause the apparatus to further output the effective parking space information in response to the first information by:
obtaining a second parking space information set through a network in response to the first information, wherein the second parking space information set records the idle parking space information;
obtaining the effective parking space information from the first parking space information set and the second parking space information set; and
outputting the effective parking space information.
18 . The non-transitory computer-readable medium of claim 13 , wherein the instructions, when executed by the processor, further cause the apparatus to:
store the effective parking space information about the one or more effective parking spaces within the preset duration; and
delete the effective parking space information after the preset duration is exceeded.