Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus, a computer device and a storage medium for acquiring a status of a shared vehicle, so as to improve a situation that when a user moves to a location of the shared vehicle, the shared vehicle is already used by others, so that the user has to check a current status of other available shared vehicles nearby again through a terminal.
In a first aspect, an embodiment of the present invention provides a method for acquiring a state of a shared vehicle, where the state of the shared vehicle includes occupied state and non-occupied state, and the method includes:
responding a vehicle attention request sent by a user terminal, and determining an attention time period corresponding to the vehicle attention request and at least one attention vehicle, wherein the state of the attention vehicle is non-occupied;
associating the user terminal with all the vehicles of interest;
acquiring the current time and the state of each concerned vehicle;
when the state of the concerned vehicle is updated to the occupied state, acquiring the time of state updating;
if the state updating time is before the attention time interval, when the current time reaches the attention time interval, releasing the association between the user terminal and the attention vehicle, and sending vehicle state updating prompt information to the user terminal;
if the current time and the state updating time are both in the attention time period, releasing the association between the user terminal and the attention vehicle, and sending vehicle state updating prompt information to the user terminal;
disassociating the user terminal from each of the vehicles of interest when the current time is after the period of interest.
In the method for acquiring the state of the shared vehicle, the server determines the attention time interval and the attention vehicle corresponding to the vehicle attention request after receiving the vehicle attention request sent by the terminal, namely determines the time interval in which the user wants to obtain the state change information of which vehicles in real time; then, associating the user terminal with all concerned vehicles so as to send corresponding messages to the user terminals associated with the concerned vehicles after the state of the concerned vehicles changes; then, acquiring the current time and the state of each concerned vehicle, and acquiring the state updating time when the state of the concerned vehicle is updated to be occupied; if the state updating time is before the attention time interval, when the current time reaches the attention time interval, sending vehicle state updating prompt information to the user terminal, and releasing the association between the user terminal and the attention vehicle so as to avoid sending corresponding information to the user terminal when the state of the attention vehicle changes again; if the current time and the state updating time are both in the concerned time period, the association between the user terminal and the concerned vehicle is released, and vehicle state updating prompt information is sent to the user terminal; and when the current time is after the attention period, the user terminal is disassociated from each vehicle of interest.
Therefore, the server sends the vehicle state updating prompt information of the concerned vehicle to the user terminal in real time in the concerned time period, and the user can determine whether the concerned vehicle can be used according to the vehicle state updating prompt information, namely the concerned vehicle is in a non-occupied state; in addition, in the practical application occasions of the embodiment of the invention, after the user can determine that the vehicle state changes through the terminal, if the states of all concerned vehicles are changed from non-occupied state to occupied state, the user can clearly know that the previously observed vehicle cannot be used, and further can observe other shared vehicles or select other vehicles for going out.
Optionally, in an implementation manner provided by the embodiment of the present invention, after associating the user terminal with all the vehicles of interest, the method further includes:
responding to vehicle reservation requests in all the concerned vehicles sent by the user terminal, and determining corresponding concerned vehicles in all the concerned vehicles;
and changing the state of the corresponding concerned vehicle into occupied state, binding the corresponding concerned vehicle with the user terminal, and releasing the association between the user terminal and other concerned vehicles.
In this embodiment, the embodiments of the present invention achieve beneficial effects including: the user can send the vehicle reservation request to the server according to the requirement to reserve the concerned vehicle, and the normal vehicle use of the user is ensured. Moreover, the server releases the association between the user terminal and other concerned vehicles after completing vehicle reservation, namely binding the vehicle and the user terminal, so that the situation that the server still sends corresponding information to the user terminal after the state of any one concerned vehicle is sent and changed is avoided, and the disturbance of the server to the user is reduced.
Optionally, in an implementation manner provided by the embodiment of the present invention, the occupancy includes any one of unlocking a vehicle, a vehicle failure, a low battery of the vehicle, and a reservation of the vehicle.
Optionally, in an implementation manner provided by the embodiment of the present invention, the method further includes:
acquiring information of the attention vehicle of a plurality of parking points within a determined range, wherein the information of the attention vehicle comprises the number of attention vehicles and attention time periods of the attention vehicle;
the parking points are subjected to priority ranking according to the number of the vehicles capable of being accommodated, the number of the current parked vehicles, the number of the concerned vehicles and the concerned time period of each parking point;
and sending a scheduling notification instruction to a terminal of a worker so that the worker can schedule the vehicle to a parking spot with high priority preferentially.
In this embodiment, the embodiments of the present invention achieve beneficial effects including: the staff is preferred to dispatch the vehicle to the high parking spot of priority for the vehicle can be placed in the parking spot that the vehicle utilization ratio is high preferentially, thereby has improved the current situation that the vehicle supply is short of the demand in the parking spot.
Further, in an implementation manner provided by the embodiment of the present invention, the prioritizing the parking spots according to the number of vehicles that can be accommodated in each parking spot, the number of currently parked vehicles, the number of vehicles of interest, and the time period of interest includes:
calculating the number value of the parking points corresponding to each parking point according to the number of the vehicles capable of being accommodated, the number of the current parked vehicles, the number of the concerned vehicles and the concerned time period of each parking point based on a preset formula, wherein the preset formula comprises the following steps:
a+b=1,a>b
wherein, P represents the number of the parking points corresponding to the parking points, y represents the number of the current parked vehicles, x represents the number of the containable vehicles,
representing a vacancy ratio of the parking spot, a representing a first weight, z representing a number of vehicles of interest within a time period of interest of the parking spot,
representing a vehicle demand ratio of the parking spot, b representing a second weight;
and carrying out priority sequencing on the plurality of parking points by using the parking point numerical value corresponding to each parking point, wherein the larger the parking point numerical value corresponding to the parking point is, the higher the priority of the parking point is.
Optionally, in an implementation manner provided by the embodiment of the present invention, after the obtaining the time of the status update when the status update of the vehicle of interest is the occupied status, the method further includes:
when the current time is before the attention time period or within the attention time period, if the state of each attention vehicle is updated to the occupied state, determining an initial parking point corresponding to each attention vehicle, wherein the initial parking point comprises a parking point where the attention vehicle corresponding to the attention request of the vehicle is located when the server responds to the attention request of the vehicle;
if the vehicle in the non-occupied state exists in the initial parking spot, generating non-occupied vehicle prompt information, and sending the non-occupied vehicle prompt information to the user terminal.
In this embodiment, the embodiments of the present invention achieve beneficial effects including: therefore, when the vehicles to be used by the user cannot be used, namely, the states of all concerned vehicles are changed from non-occupied states to occupied states, the server can push other available vehicles to the user in a humanized mode, and the vehicle using experience of the user is improved. Moreover, other available vehicles are positioned at the initial parking point, so that the push vehicle can meet the requirements of users.
Further, in an implementation manner provided by the embodiment of the present invention, when the current time is before the attention time period or within the attention time period, if the state of each attention vehicle is updated to the occupancy, after determining an initial parking point corresponding to each attention vehicle, the method further includes:
if the vehicle in the non-occupied state does not exist in the initial parking point, searching each peripheral parking point in a preset range around the initial parking point;
if the peripheral parking spots exist and the vehicles in the state of non-occupation exist in the peripheral parking spots, generating non-occupation vehicle prompt information and sending the non-occupation vehicle prompt information to the user terminal.
In this embodiment, the embodiments of the present invention achieve beneficial effects including: even if the vehicles in the non-occupied states do not exist in the initial parking spots, the server can push the vehicles in the non-occupied states in the peripheral parking spots to the user terminal, so that the user can finish traveling through the vehicles in the peripheral parking spots, and user experience is improved.
In a second aspect, an embodiment of the present invention provides a state obtaining apparatus for a shared vehicle, which is applied to a server, where a state of the shared vehicle includes occupied state and unoccupied state, and the apparatus includes:
the response module is used for responding a vehicle attention request sent by a user terminal, and determining an attention time period corresponding to the vehicle attention request and at least one attention vehicle, wherein the state of the attention vehicle is non-occupied;
the association module is used for associating the user terminal with all the concerned vehicles;
the acquisition module is used for acquiring the current time and the state of each concerned vehicle;
an update time acquisition module, configured to acquire a time for state update when a state of the vehicle of interest is updated to the occupied state;
a first release module, configured to release the association between the user terminal and the vehicle of interest when the current time reaches the time period of interest if the time for updating the state is before the time period of interest, and send a vehicle state update prompt message to the user terminal;
the second removing module is used for removing the association between the user terminal and the concerned vehicle and sending the vehicle state updating prompt message to the user terminal if the current time and the state updating time are both within the concerned time period;
a third release module for releasing the association of the user terminal with each vehicle of interest when the current time is after the period of interest.
In a third aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and the computer program, when running on the processor, executes the method for acquiring the state of the shared vehicle as disclosed in any one of the first aspects.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium, on which a computer program is stored, the computer program, when running on a processor, executing the method for acquiring a state of a shared vehicle as disclosed in any one of the first aspects.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Hereinafter, the terms "including", "having", and their derivatives, which may be used in various embodiments of the present invention, are only intended to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing, and should not be construed as first excluding the existence of, or adding to, one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.
Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the present invention belong. The terms (such as those defined in commonly used dictionaries) should be interpreted as having a meaning that is consistent with their contextual meaning in the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in various embodiments of the present invention.
To better explain the technical solution proposed by the present invention, the prior art is briefly explained first.
It can be understood that, although there is a service for providing a view of surrounding vehicles in the existing shared vehicle service, that is, a user can view shared vehicles in a nearby parking spot through an electronic map displayed on a terminal, a server for updating the electronic map is generally configured to update the shared vehicles on the electronic map every preset time period, for example, every 5 minutes. Therefore, when the user views the shared vehicle in the nearby parking spot through the terminal, there may occur a case where the shared vehicle has been used by other users when the user reaches the parking spot.
Further, the existing shared vehicle service also has a function of providing vehicle reservation, that is, a function of controlling the shared vehicle to be used by only one specific user and not to be used by other users within a preset time period. However, the vehicle reservation function requires that the user unlock the reserved vehicle for use within a short preset reservation time, such as half an hour or ten minutes.
Therefore, when the user views the nearby shared vehicle through the terminal, but needs to reach the parking spot after a long time, if the user views the nearby shared vehicle on the terminal but cannot make a reservation, the user may arrive at the parking spot and find that the previously viewed shared vehicle is used by another person, or there is no shared vehicle in the parking spot, so that the user has to search for another vehicle or even needs to go to another parking spot.
Based on this, an embodiment of the present invention provides a method for acquiring a state of a shared vehicle, and referring to fig. 1, fig. 1 shows a flowchart of a first method for acquiring a state of a shared vehicle provided by an embodiment of the present invention.
It should be noted that, the occupied state in the embodiment of the present invention refers to that the vehicle cannot be used by the user due to some reason, for example, the vehicle is used by other users or the vehicle is in a fault, and the non-occupied state indicates that the vehicle can be normally used by the user.
In an implementation manner provided by the embodiment of the present invention, the occupancy includes any one of unlocking of the vehicle, failure of the vehicle, low battery of the vehicle, and reservation of the vehicle.
Therefore, the method for acquiring the state of the shared vehicle provided by the embodiment of the invention comprises the following steps:
s110, responding to a vehicle attention request sent by a user terminal, and determining an attention time period corresponding to the vehicle attention request and at least one attention vehicle, wherein the attention vehicle is in a non-occupied state.
It should be noted that the server in the embodiment of the present invention is configured to determine, according to the received vehicle attention request, which time period the user wants to obtain the state change information of which vehicles in real time, that is, determine the attention time period corresponding to the vehicle attention request and determine at least one attention vehicle corresponding to the vehicle attention request.
It should be further noted that, the vehicle attention presentation server according to the embodiment of the present invention obtains the state of the vehicle in real time to notify the user when the state of the vehicle changes, so that the user can confirm whether the vehicle is usable.
For example, when the server receives a vehicle reception request corresponding to the vehicle of interest, that is, when the vehicle of interest whose state is unoccupied is about to be changed into occupied, the server may send information that the state of the vehicle of interest is to be changed into unoccupied to the user terminal for the user to confirm.
It should be understood that the attention period in the embodiment of the present invention is also used to indicate a time when the user wants to receive a message related to the attention vehicle, that is, the server only sends the vehicle state update prompt information of the attention vehicle to the server within the attention period, so as to avoid disturbing the user during the attention period.
In addition, it is understood that the specific content included in the vehicle attention request can be set according to actual situations, such as in a feasible manner, the attention period and the unique identifier of each attention vehicle need to be included in the vehicle attention request received by the server. Therefore, the user needs to select the attention period and the attention vehicle through the terminal, so that the terminal packages the attention period and the unique identification of the attention vehicle as a vehicle attention request and sends the vehicle attention request to the server.
In another possible way, the vehicle attention request only includes the unique identifier of each vehicle of interest, that is, after the user selects the vehicle of interest through the terminal, the terminal packages the unique identifier of the vehicle of interest as the vehicle attention request, and the server determines the attention period and the vehicle of interest according to the unique identifier and a preset default attention period, for example, two hours after the current time.
And S120, associating the user terminal with all the concerned vehicles.
It is understood that, after the server associates the vehicle of interest with the user terminal, the server sends a corresponding message to the user terminal associated with the vehicle of interest after the state of the vehicle of interest changes.
And S130, acquiring the current time and the state of each concerned vehicle.
That is, the server acquires the state of each vehicle of interest in real time from the current time after determining the time period of interest and the vehicle of interest.
It is understood that the manner in which the server obtains the state of the vehicle may be set according to actual conditions, for example, in a feasible manner, all vehicles are provided with state information sending devices, the state information sending devices are configured to send state change information to the server when the state of the vehicle changes, and then the server obtains the changed state of the vehicle according to the received state change information.
In yet another possible manner, when the server receives a request for unlocking, reservation, occupation, or the like of the vehicle of interest, it is determined that the state of the vehicle of interest is changed from unoccupied to occupied.
And S140, when the state of the concerned vehicle is updated to the occupied state, acquiring the time of state updating.
That is, when the server determines that the state of the vehicle of interest changes from unoccupied to occupied, the time of change of the state of the vehicle, that is, the time at which the state is updated, is recorded.
S150, if the state updating time is before the attention time interval, when the current time reaches the attention time interval, the association between the user terminal and the attention vehicle is released, and vehicle state updating prompt information is sent to the user terminal.
That is, when the time for updating the state of the vehicle is not within the attention time period, the server does not send the information that the state of the attention vehicle changes to the server, but when the current time reaches the attention time period, the state of the attention vehicle is changed from non-occupied state to occupied state, that is, the vehicle state update prompt information is sent to the user terminal.
For example, it is assumed that the user sends a vehicle attention request to the server through the terminal at 12 points, the attention time period corresponding to the vehicle attention request is 14 points to 16 points, but the state of the attention vehicle corresponding to the vehicle attention request is changed to occupied at 13 points. Since the 13 o 'clock is not in the attention period, the server does not send the vehicle state update prompting message to the user terminal, and when the current time reaches 14 o' clock, that is, the attention period is reached, the server sends the vehicle state update prompting message to the user terminal again.
It should also be understood that the server also disassociates the user terminal from the vehicle of interest while sending the vehicle status update prompt to the user terminal. Further, even if the state of the vehicle of interest changes again after the association is released, the server does not transmit the relevant information to the user terminal any more.
And S160, if the current time and the state updating time are both in the attention time interval, releasing the association between the user terminal and the attention vehicle, and sending the vehicle state updating prompt information to the user terminal.
For example, assume that the attention period is 14 to 16 points, and the status update time is 15 points, that is, when the current time is 15 points, the status of the attention vehicle changes, and the server directly sends the vehicle status update prompt message to the user terminal because the status update time is within the attention period, that is, within the time when the user wants to receive the relevant message of the attention vehicle.
S170, when the current time is after the attention period, releasing the association between the user terminal and each attention vehicle.
It can be understood that the attention period represents the time when the user wants to use the vehicle, and after the current time is the attention period, the attention period represents that the user may have used the vehicle, and then the server disassociates the user terminal from the attention vehicle and does not send the vehicle state update prompt information corresponding to the attention vehicle to the user terminal.
In the method for acquiring the state of the shared vehicle, the server determines the attention time interval and the attention vehicle corresponding to the vehicle attention request after receiving the vehicle attention request sent by the terminal, namely determines the time interval in which the user wants to obtain the state change information of which vehicles in real time; then, associating the user terminal with all concerned vehicles so as to send corresponding messages to the user terminals associated with the concerned vehicles after the state of the concerned vehicles changes; then, acquiring the current time and the state of each concerned vehicle, and acquiring the state updating time when the state of the concerned vehicle is updated to be occupied; if the state updating time is before the attention time interval, when the current time reaches the attention time interval, sending vehicle state updating prompt information to the user terminal, and removing the association between the user terminal and the attention vehicle so as to avoid sending corresponding information to the user terminal when the state of the attention vehicle changes again; if the current time and the state updating time are both in the concerned time period, the association between the user terminal and the concerned vehicle is released, and vehicle state updating prompt information is sent to the user terminal; and when the current time is after the attention period, the user terminal is disassociated from each vehicle of interest.
Therefore, the server sends the vehicle state updating prompt information of the concerned vehicle to the user terminal in real time in the concerned time period, and the user can determine whether the concerned vehicle can be used according to the vehicle state updating prompt information, namely the concerned vehicle is in a non-occupied state; in addition, in practical application occasions of the embodiment of the invention, after the user can determine that the vehicle state changes through the terminal, if the states of all concerned vehicles are changed from non-occupied state to occupied state, the user can clearly know that the previously observed vehicle cannot be used, and further can observe other shared vehicles or select other vehicles for going out.
Optionally, to improve the vehicle using experience of the user, in an implementation manner provided by the embodiment of the present invention, specifically referring to fig. 2, fig. 2 shows a schematic flow diagram of a second method for acquiring a state of a shared vehicle provided by the embodiment of the present invention, that is, after S120, the method further includes:
s180, responding to vehicle reservation requests in all the concerned vehicles sent by the user terminal, and determining corresponding concerned vehicles in all the concerned vehicles;
and S190, changing the state of the vehicle concerned correspondingly into occupied, binding the vehicle concerned correspondingly with the user terminal, and releasing the association between the user terminal and other vehicles concerned.
That is, after the user sends the vehicle attention request to the server through the terminal, and the server acquires the state of the attention vehicle corresponding to the vehicle attention request in real time, if the server receives the vehicle reservation requests sent by the user through the terminal in all the attention vehicles, that is, when the user is determined to reserve one attention vehicle, that is, the user finishes traveling through the vehicle corresponding to the vehicle reservation request, so the server binds the attention vehicle corresponding to the vehicle reservation request with the user terminal, and the state is changed into occupation.
Furthermore, after the vehicle is reserved by the user, the state of the vehicle is changed into occupied and cannot be changed by other users, so that the user can use the concerned vehicle bound with the user terminal without using other concerned vehicles, and the server binds the concerned vehicle with the user terminal, changes the state into occupied and also releases the association between the user terminal and other concerned vehicles.
Therefore, the embodiment of the invention enables the user to send the vehicle reservation request to the server according to the requirement so as to reserve the concerned vehicle, and ensures the normal use of the vehicle of the user. Moreover, the server releases the association between the user terminal and other concerned vehicles after completing vehicle reservation, namely binding the vehicle and the user terminal, so that the situation that the server still sends corresponding information to the user terminal after the state of any one concerned vehicle is sent and changed is avoided, and the disturbance of the server to the user is reduced.
In addition, although in the flowchart shown in fig. 2, S180 and S190 are executed after S120, in practice, the execution of S180 and S190 may be executed at any step after S120, and the embodiment of the present invention does not limit the context of S180 and S190 and any step from S130 to S170.
Optionally, to improve vehicle management efficiency and improve a current situation of vehicle short supply and short demand at a parking spot, in an implementation manner provided by an embodiment of the present invention, specifically refer to fig. 3, where fig. 3 shows a flowchart of a third method for acquiring a state of a shared vehicle provided by the embodiment of the present invention, that is, the method further includes:
s200, acquiring information of the attention vehicle at a plurality of parking points in a determined range, wherein the information of the attention vehicle comprises the number of the attention vehicle and the attention time period of the attention vehicle;
s210, carrying out priority sequencing on the parking points according to the number of the vehicles capable of being accommodated, the number of the current parked vehicles, the number of the concerned vehicles and the concerned time period of each parking point;
and S220, sending a scheduling notification instruction to a terminal of a worker so that the worker can schedule the vehicle to a parking spot with high priority preferentially.
That is, the server determines and prioritizes the vehicle use conditions of the plurality of parking spots according to the number of accommodated vehicles, the number of currently parked vehicles, the number of attention vehicles, and the attention time period of the plurality of parking spots.
The information on the vehicle of interest at the parking spot indicates: and for the vehicles in the parking spots, the number of the attention vehicles in the parking spots in the attention time period corresponding to the vehicle attention request sent by the terminal by most users.
It should be further noted that fig. 4 is only used to better illustrate an execution sequence of each step provided in the embodiment of the present invention, and the embodiment of the present invention does not actually limit the sequence of any step from S200 to S220 to S110 to S170, and S200 to S220 may be executed before any step from S110 to S170.
It will be appreciated that a higher priority indicates a higher vehicle availability at the parking spot, and thus a more likely short-of-supply condition at the parking spot.
Therefore, after determining the priority sequence of each parking spot, the server sends a scheduling notification instruction to the terminal of the staff, so that the terminal of the staff displays the vehicle scheduling task preferentially at the parking spot with high priority when displaying the vehicle scheduling task, and the staff schedules the vehicle to the parking spot with high priority.
Therefore, the embodiment of the invention ensures that the staff preferentially dispatches the vehicle to the parking spot with high priority, so that the vehicle can be preferentially placed in the parking spot with high vehicle utilization rate, and the current situation that the vehicle supply is not sufficient in the parking spot is improved.
It is to be understood that the manner of determining the priority of the parking spots according to the number of receivable vehicles, the number of currently parked vehicles, the number of attention vehicles, and the attention time period may be set according to actual circumstances. As one possibility, the priority of the parking point is calculated as: calculating the product of the number of the containable vehicles and the first preset weight to obtain a first numerical value; calculating the product of the number of the current parked vehicles and a second preset weight to obtain a second numerical value; calculating the product of the number of the concerned vehicles and a third preset weight to obtain a third numerical value; and obtaining the priority of the parking point according to the sum of the first numerical value, the second numerical value and the third numerical value.
In one possible way, the process of determining the priority of the parking spot according to the number of receivable vehicles, the number of currently parked vehicles, the number of attention vehicles and the attention time period, namely, the S230 includes:
calculating the number value of the parking points corresponding to each parking point according to the number of the vehicles capable of being accommodated, the number of the current parked vehicles, the number of the concerned vehicles and the concerned time period of each parking point based on a preset formula, wherein the preset formula comprises the following steps:
a+b=1,a>b
wherein P represents a parking point value corresponding to the parking point, y represents the number of currently parked vehicles, x represents the number of receivable vehicles,
represents an empty ratio of the parking spot, a represents a first weight, z represents a number of vehicles of interest within a time period of interest of the parking spot,
representing a vehicle demand ratio of the parking spot, b representing a second weight;
and carrying out priority sequencing on the plurality of parking points by using the parking point numerical value corresponding to each parking point, wherein the larger the parking point numerical value corresponding to the parking point is, the higher the priority of the parking point is.
Optionally, in order to improve the vehicle using experience of the user, in an implementation manner provided by the embodiment of the present invention, after S140, the method further includes:
when the current time is before the attention time period or within the attention time period, if the state of each attention vehicle is updated to the occupied state, determining an initial parking point corresponding to each attention vehicle, wherein the initial parking point comprises a parking point where the attention vehicle corresponding to the attention request of the vehicle is located when the server responds to the attention request of the vehicle;
if the vehicle in the non-occupied state exists in the initial parking spot, generating non-occupied vehicle prompt information, and sending the non-occupied vehicle prompt information to the user terminal.
That is, when the server determines that all vehicles of interest associated with the user terminal cannot be used by the user corresponding to the user terminal due to other uses or faults, the server determines an initial parking point corresponding to each vehicle of interest. The initial parking points comprise parking points where the concerned vehicles corresponding to the vehicle attention requests are located when the users send the vehicle attention requests to the server.
The server will then search for whether there are other vehicles in the initial parking spot that can be used by the user, i.e. vehicles that are not occupied in their state. And if so, informing the user that other available vehicles exist at the initial parking spot, namely sending a prompt message of the unoccupied vehicle to the user terminal.
Therefore, according to the embodiment of the invention, when the vehicles to be used by the user cannot be used, namely, when all the states of the concerned vehicles are changed from non-occupied state to occupied state, the server can humanizedly push other available vehicles to the user, so that the vehicle using experience of the user is improved. Moreover, other available vehicles are positioned at the initial parking point, so that the push vehicle can meet the requirements of users.
It will be appreciated that if there are no other vehicles available to the user in the initial parking spot, what steps the server will perform may actually be set. As one possible approach, the server will send a no vehicle available prompt to the user terminal to inform the user that there is no vehicle in the non-occupied state at the initial parking spot.
In an implementation manner provided by the embodiment of the present invention, if there is no other vehicle that can be used by the user in the initial parking spot, that is, when the current time is before the attention period or within the attention period, and if the state of each attention vehicle is updated to the occupancy, after determining the initial parking spot corresponding to each attention vehicle, the method further includes:
if the vehicle in the non-occupied state does not exist in the initial parking point, searching each peripheral parking point in a preset range around the initial parking point;
if the peripheral parking spots exist and the vehicles in the non-occupied states exist in the peripheral parking spots, generating non-occupied vehicle prompt information and sending the non-occupied vehicle prompt information to the user terminal.
That is, if there is no other vehicle available to the user in the initial parking spot, the server searches for a surrounding parking spot around the initial parking spot. And if the peripheral parking spots have the vehicles in the non-occupied states, the server informs the user that the vehicles in the peripheral parking spots in the non-occupied states can be used, namely, prompts information to the non-occupied vehicles and sends the information to the user terminal.
It can be understood that, since the peripheral parking spots are within the preset range of the initial parking spot, the vehicles in the peripheral parking spots should also meet the user's requirements.
Therefore, even if no vehicle in a non-occupied state exists in the initial parking spot, the server can push the vehicle in the peripheral parking spot in a non-occupied state to the user terminal, so that the user can finish traveling through the vehicles in the peripheral parking spot, and user experience is improved.
Optionally, if there is no vehicle in the surrounding parking spot, the server may send a no-vehicle available prompt message to the server to enable the user to know that the nearby parking spot does not have a vehicle in the non-occupied state.
Corresponding to the method for acquiring the state of the shared vehicle provided by the embodiment of the present invention, an embodiment of the present invention further provides a device for acquiring the state of the shared vehicle, referring to fig. 4, fig. 4 shows a schematic structural diagram of the device for acquiring the state of the shared vehicle provided by the embodiment of the present invention, the device 300 for acquiring the state of the shared vehicle provided by the embodiment of the present invention is applied to a server, the state of the shared vehicle includes occupied state and non-occupied state, and the device includes:
a response module 310, configured to respond to a vehicle attention request sent by a user terminal, and determine an attention time period and at least one attention vehicle corresponding to the vehicle attention request, where a state of the attention vehicle is unoccupied;
an association module 320 for associating the user terminal with all the vehicles of interest;
an obtaining module 330, configured to obtain a current time and a state of each vehicle of interest;
an update time acquisition module 340, configured to acquire a time for updating the state when the state of the vehicle of interest is updated to the occupied state;
a first removing module 350, configured to remove the association between the user terminal and the vehicle of interest when the current time reaches the time period of interest if the time for updating the state is before the time period of interest, and send a vehicle state update prompt message to the user terminal;
a second removing module 360, configured to remove the association between the user terminal and the vehicle of interest and send the vehicle status update prompt message to the user terminal if the current time and the status update time are both within the time period of interest;
a third disassociation module 370 for disassociating the user terminal from each of the vehicles of interest when the current time is after the period of interest.
Optionally, in an implementation manner provided by the embodiment of the present invention, the apparatus further includes:
the reservation module is used for responding to vehicle reservation requests in all the concerned vehicles sent by the user terminal and determining corresponding concerned vehicles in all the concerned vehicles;
and the binding module is used for changing the state of the vehicle concerned correspondingly into occupied state, binding the vehicle concerned correspondingly with the user terminal and releasing the association between the user terminal and other vehicles concerned.
Optionally, in an implementation manner provided by the embodiment of the present invention, the occupancy includes any one of unlocking a vehicle, a vehicle failure, a low battery of the vehicle, and a reservation of the vehicle.
Optionally, in an implementation manner provided by the embodiment of the present invention, the apparatus further includes:
the system comprises an information acquisition module, a monitoring module and a display module, wherein the information acquisition module is used for acquiring information of the concerned vehicle at a plurality of parking points in a determined range, and the information of the concerned vehicle comprises the number of the concerned vehicles and the concerned time period of the concerned vehicle;
the sequencing module is used for sequencing the priorities of the parking points according to the number of the vehicles capable of being accommodated, the number of the current parking vehicles, the number of the concerned vehicles and the concerned time period of each parking point;
and the instruction sending module is used for sending a scheduling notification instruction to a terminal of a worker so that the worker can schedule the vehicle to a parking spot with high priority preferentially.
Further, in an implementation manner provided by the embodiment of the present invention, the sorting module includes:
the calculation submodule is used for calculating the parking point numerical value corresponding to each parking point according to the number of the vehicles capable of being accommodated, the number of the current parked vehicles, the number of the concerned vehicles and the concerned time period of each parking point based on a preset formula, wherein the preset formula comprises the following steps:
a+b=1,a>b
wherein P represents a parking point value corresponding to the parking point, y represents the number of currently parked vehicles, x represents the number of receivable vehicles,
representing a vacancy ratio of the parking spot, a representing a first weight, z representing a number of vehicles of interest within a time period of interest of the parking spot,
representing a vehicle demand ratio of the parking spot, b representing a second weight;
and the priority ordering submodule is used for carrying out priority ordering on the plurality of parking points by utilizing the parking point numerical value corresponding to each parking point, wherein the larger the parking point numerical value corresponding to the parking point is, the higher the priority of the parking point is.
Further, in an implementation manner provided by the embodiment of the present invention, the apparatus further includes:
an initial parking point determining module, configured to determine, when the current time is before the attention time period or within the attention time period, an initial parking point corresponding to each attention vehicle if a state of each attention vehicle is updated to the occupied state, where the initial parking point includes a parking point where the attention vehicle corresponding to the vehicle attention request is located when the server responds to the vehicle attention request;
and the first information sending module is used for generating non-occupied vehicle prompt information if the vehicle in the non-occupied state exists in the initial parking spot, and sending the non-occupied vehicle prompt information to the user terminal.
Further, in an implementation manner provided by the embodiment of the present invention, the apparatus further includes:
the peripheral parking point searching module is used for searching each peripheral parking point within a preset range around the initial parking point if the vehicle in the non-occupied state does not exist in the initial parking point;
and the second information sending module is used for generating non-occupied vehicle prompt information if the peripheral parking spots exist and the vehicles in the non-occupied states exist in the peripheral parking spots, and sending the non-occupied vehicle prompt information to the user terminal.
The state acquisition device for the shared vehicle provided in the embodiment of the present application can implement each process of the state acquisition method for the shared vehicle in the method embodiment disclosed in fig. 1, and can achieve the same technical effect, and is not described herein again to avoid repetition.
An embodiment of the present invention further provides a computer device, including a memory and a processor, where the memory stores a computer program, and the computer program, when running on the processor, executes the method for acquiring the state of the shared vehicle disclosed in the method embodiment corresponding to fig. 1.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program runs on a processor, the method for acquiring the state of the shared vehicle disclosed in the method embodiment corresponding to fig. 1 is executed.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or a part of the technical solution that contributes to the prior art in essence can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention.