Disclosure of Invention
In view of the above, the invention provides a method and a server for controlling an intelligent bathtub based on a vehicle, which can automatically control the intelligent bathtub of a user's home to drain water for a preset time before the user drives the vehicle to reach the home, save the waiting time after the user arrives at the home, and improve the user experience.
The invention provides a control method of an intelligent bathtub based on a vehicle, which is applied to a server and comprises the following steps: receiving position information sent by a first vehicle; judging whether the current time is within a preset time period or not after the position information is received; when the current time is within a preset time period, acquiring a home position corresponding to the first vehicle; processing according to the position information and the home position to obtain the expected time required by the first vehicle to reach the home position; when the predicted time is less than or equal to a preset time, generating a control signal; and sending the control signal to an intelligent home platform corresponding to the first vehicle so as to automatically control an intelligent bathtub corresponding to the first vehicle.
Specifically, the obtaining of the estimated time required for the first vehicle to reach the home location by processing according to the location information and the home location includes: obtaining a route plan of the first vehicle according to the position information and the home position; acquiring road condition information and traffic condition information of a road corresponding to the route planning; and processing according to the position information, the route planning, the road condition information and the traffic condition information to obtain the estimated time required by the first vehicle to reach the home position.
Specifically, the generating a control signal when the predicted time is less than or equal to a preset time includes: when the preset time is less than or equal to the preset time, sending prompt information to the first vehicle so that the first vehicle displays the prompt information; receiving a feedback instruction returned by the first vehicle; judging whether the feedback instruction is a preset execution instruction or not; when the feedback instruction is the preset execution instruction, generating the control signal; and returning to the step of receiving the position information sent by the first vehicle when the feedback instruction is not the preset execution instruction.
Specifically, when the feedback instruction is the preset execution instruction, generating the control signal includes: when the feedback instruction is the preset execution instruction, acquiring season information, weather conditions and temperature information corresponding to the location point of the first vehicle; and processing according to the season information, the weather condition and the temperature information to obtain the control signal.
Specifically, when the current time is within a preset time period, the step of obtaining the home location corresponding to the first vehicle further includes: acquiring a starting position corresponding to the starting of the first vehicle; judging whether the initial position is a company position or not according to a historical data list corresponding to the first vehicle; when the starting position is the company position, judging whether a destination corresponding to the first vehicle is a home position or not according to the historical data list and the current time; and when the destination is the home position, executing the step of acquiring the home position corresponding to the first vehicle when the current time is within a preset time period.
The present invention also provides a server comprising: a memory for storing executable program code; and a processor for invoking the executable program code in the memory to implement the steps of vehicle-based control of a smart tub: receiving position information sent by a first vehicle; judging whether the current time is within a preset time period or not after the position information is received; when the current time is within a preset time period, acquiring a home position corresponding to the first vehicle; processing according to the position information and the home position to obtain the expected time required by the first vehicle to reach the home position; when the predicted time is less than or equal to a preset time, generating a control signal; and sending the control signal to an intelligent home platform corresponding to the first vehicle so as to automatically control an intelligent bathtub corresponding to the first vehicle.
Specifically, the processor, executing the processing to obtain the estimated time required for the first vehicle to reach the home location according to the location information and the home location, includes: obtaining a route plan of the first vehicle according to the position information and the home position; acquiring road condition information and traffic condition information of a road corresponding to the route planning; and processing according to the position information, the route planning, the road condition information and the traffic condition information to obtain the estimated time required by the first vehicle to reach the home position.
Specifically, the processor, executing the step of generating a control signal when the predicted time is less than or equal to a preset time, includes: when the preset time is less than or equal to the preset time, sending prompt information to the first vehicle so that the first vehicle displays the prompt information; receiving a feedback instruction returned by the first vehicle; judging whether the feedback instruction is a preset execution instruction or not; when the feedback instruction is the preset execution instruction, generating the control signal; and returning to the step of receiving the position information sent by the first vehicle when the feedback instruction is not the preset execution instruction.
Specifically, the executing, by the processor, the generating the control signal when the feedback instruction is the preset execution instruction includes: when the feedback instruction is the preset execution instruction, acquiring season information, weather conditions and temperature information corresponding to the location point of the first vehicle; and processing according to the season information, the weather condition and the temperature information to obtain the control signal.
Specifically, the processor, before executing the step of obtaining the home location corresponding to the first vehicle when the current time is within a preset time period, further includes: acquiring a starting position corresponding to the starting of the first vehicle; judging whether the initial position is a company position or not according to a historical data list corresponding to the first vehicle; when the starting position is the company position, judging whether a destination corresponding to the first vehicle is a home position or not according to the historical data list and the current time; and when the destination is the home position, executing the step of acquiring the home position corresponding to the first vehicle when the current time is within a preset time period.
Specifically, according to the control method and the server for the intelligent bathtub based on the vehicle provided by the embodiment, when the position information sent by the first vehicle is received in the preset time period, the expected time required by the first vehicle to reach the home position is obtained in real time according to the position information and the home position, and when the expected time is less than or equal to the preset time, the server generates the control signal to control the intelligent bathtub corresponding to the first vehicle to discharge water, so that the intelligent bathtub at home of the user can be automatically controlled to discharge water at the preset time before the user drives the vehicle to reach home, the waiting time after the user reaches home is saved, and the user experience is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical means of the present invention more clearly understood, the present invention may be implemented in accordance with the content of the description, and in order to make the above and other objects, features, and advantages of the present invention more clearly understood, the following preferred embodiments are described in detail with reference to the accompanying drawings.
Detailed Description
To further explain the technical means and effects of the present invention adopted to achieve the predetermined objects, the present invention will be described in detail below with reference to the accompanying drawings and preferred embodiments.
Fig. 1 is a flowchart illustrating a method for controlling a smart bathtub based on a vehicle according to a first embodiment of the present invention. The embodiment is a control method of a smart bathtub based on a vehicle executed by a server. As shown in fig. 1, the method for controlling a smart bathtub based on a vehicle according to the present embodiment may include the following steps:
step S11: and receiving the position information sent by the first vehicle.
Specifically, in an embodiment, after the first vehicle is started, the position of the first vehicle is automatically sent to the server as the position information, and the server updates the position of the first vehicle in real time according to the received position information sent by the first vehicle.
Step S12: and judging whether the current time is within a preset time period or not after the position information is received.
Specifically, in an embodiment, when receiving the position information sent by the first vehicle, the server obtains the current time when the position information is received, and determines whether the current time is within a preset time period. Specifically, in this embodiment, the preset time period may be, but is not limited to, a time period from 21:00 to 6:00 of the next day, for example, in other real-time manners, the preset time period may also be set to 20:00 to 6:00 of the next day, or 22:00 to 6:00 of the next day, or 23:00 to 7:00 of the next day, and so on.
Step S13: and when the current time is within the preset time period, acquiring the home position corresponding to the first vehicle.
Specifically, in an embodiment, when the current time of receiving the location information is within the preset time period, for example, when the server receives the location information sent by the first vehicle at 23:00, the server will obtain the home location corresponding to the first vehicle, and specifically, the home location may be, but is not limited to, the starting place where the first vehicle is started the most times in the morning each day. Specifically, the server may look up and retrieve the corresponding home location from the historical data record of the first vehicle.
Step S14: and processing the position information and the home position to obtain the predicted time required by the first vehicle to reach the home position.
Specifically, in an embodiment, the server determines whether the first vehicle gradually approaches the home position of the user according to the position information sent by the first vehicle in real time, so as to obtain the estimated time required for the first vehicle to reach the home position according to the position information of the first vehicle and the home position processing.
Step S15: and generating a control signal when the predicted time is less than or equal to the preset time.
Specifically, in an embodiment, the preset time period may be set to 15min, for example, in other embodiments, the preset time period may also be set according to a time required for water in an intelligent bathtub in a home of a user to reach a preset water level, so that when the user arrives at home, water in the intelligent bathtub just reaches the preset water level, so that the user can take a bath after arriving at home without waiting for the user, and meanwhile, the influence of the intelligent bathtub on the water temperature in the process of waiting for the user after the intelligent bathtub reaches the preset water level too early after water is discharged is avoided, so as to improve user experience.
Specifically, in one embodiment, the server generates the control signal when the estimated time for the first vehicle to arrive at the home location is less than or equal to a preset time period.
Step S16: and sending the control signal to an intelligent household platform corresponding to the first vehicle so as to automatically control the intelligent bathtub corresponding to the first vehicle.
Specifically, in an embodiment, the server sends the generated control signal to the smart home platform corresponding to the first vehicle, specifically, in an embodiment, the server may but is not limited to search for the corresponding smart home platform from the smart home platform list, for example, the server searches for the smart home platform list corresponding to the first vehicle from the smart home platform list according to the first vehicle.
Specifically, in an embodiment, the smart home platform list may be obtained by, but not limited to, respectively binding and setting the vehicle and the corresponding smart home platform according to each user, and sending the binding to the server, and the server stores the received binding to the smart home platform list.
Specifically, in an embodiment, after the intelligent home platform received control signal, will control intelligent bathtub and adjust the good water temperature and turn on the water to reach and predetermine the water level at intelligent bathtub and turn on the water to the end, thereby when making the user reach home, put well in the intelligent bathtub just, wait for intelligent bathtub time of turning on the water with saving the user, promote user experience, in order to alleviate user's fatigue.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for controlling an intelligent bathtub based on a vehicle according to a second embodiment of the present invention. As shown in fig. 1 and fig. 2, the step of obtaining the estimated time required for the first vehicle to reach the home location according to the location information and the home location processing according to the method for controlling the smart bathtub based on the vehicle provided by the embodiment of the present invention includes the following steps:
step S21: and obtaining the route planning of the first vehicle according to the position information and the home position.
Specifically, in one embodiment, the server finds a route plan corresponding to the first vehicle from a historical route list according to the position information of the first vehicle and the home position of the user. For example, the server records the route of each driving of the first vehicle, stores the obtained route into a historical route list, classifies the obtained route according to the starting position, the ending position, the driving direction and the starting time of each route, and can quickly find the route planning to be driven by the first vehicle according to the position information, the home position and the current time of the first vehicle. Specifically, in an embodiment, the server may also obtain the route planning between the location information of the first vehicle and the home location through the navigation service, but is not limited thereto.
Step S22: and acquiring road condition information and traffic condition information of a road corresponding to the route planning.
Specifically, in an embodiment, the server obtains the road condition information and the traffic condition information of the road corresponding to the route planning according to the current time, so as to better plan the time required for the first vehicle to reach the home location. Specifically, the traffic condition information may include, but is not limited to, traffic signal light information of each traffic intersection through which the route is planned, congestion condition of each road, traffic accident information, and the like. The road condition information may be, but not limited to, road surface information, road grade, road curvature, road width, road maintenance information, speed limit information, and the like.
Step S23: and processing according to the position information, the route planning, the road condition information and the traffic condition information to obtain the estimated time required by the first vehicle to reach the home position.
Specifically, in one embodiment, the server processes the position information, the route planning information, the road condition information and the traffic condition information of the first vehicle to accurately obtain the estimated time required for the first vehicle to reach the home position. Specifically, in an embodiment, the server may further obtain weather conditions and current season information corresponding to a location where the first vehicle is located, for example, weather condition information such as rainy days, snowy days, and haze days, and then accurately obtain road conditions according to the weather conditions and the current season information, for example, whether water is accumulated on the road surface, whether the road surface is frozen, and the like, so as to better pre-judge a corresponding vehicle speed of the first vehicle on each road section, and thus, time required for the first vehicle to reach the home location can be accurately obtained.
Referring to fig. 3, fig. 3 is a flowchart illustrating a method for controlling an intelligent bathtub based on a vehicle according to a third embodiment of the present invention. As shown in fig. 1 and fig. 3, in the method for controlling a smart bathtub based on a vehicle according to the present embodiment, when the predicted time is less than or equal to the preset time, the step of generating the control signal includes the following steps:
step S31: and when the preset time is less than or equal to the preset time, sending prompt information to the first vehicle so that the first vehicle displays the prompt information.
Specifically, in one embodiment, the server sends the prompt message to the first vehicle when a preset time for the first vehicle to reach the home location is less than or equal to a preset time length. Specifically, when the first vehicle receives the prompt message sent by the server, the prompt message may be broadcasted by voice, but not limited to, for example, the first vehicle broadcasts "you are too busy!by voice! I help you control the intelligent bathtub to release hot water, go home and can be washed and sleep immediately, or "whether the intelligent bathtub needs to be drained, the intelligent bathtub needs 15 minutes to be drained and the intelligent bathtub is most suitable to be drained" and the like, for example, in one embodiment, the first vehicle can display the prompt information in a display mode through a display screen.
Step S32: and receiving a feedback instruction returned by the first vehicle.
Specifically, in an embodiment, after the first vehicle displays the prompt message, whether a feedback instruction of the user is received or not is determined, and the received feedback instruction of the user is sent to the server.
Step S33: and judging whether the feedback instruction is a preset execution instruction or not.
Specifically, when the feedback instruction is a preset execution instruction, step S34 is executed: a control signal is generated. When the feedback command is not the preset execution command, the process returns to step S11.
Specifically, in an embodiment, the feedback instruction may include, but is not limited to, a preset execution instruction for the user to feed back a voice response such as "good", "available", "thanks", "YES", and the like after the first vehicle plays the prompt message, and a non-execution instruction for the user to feed back "NO", "bad", "not needed", "NO", or the user does not answer within a preset time. Specifically, when the feedback instruction is the preset execution instruction, the server generates a control signal, so that whether the first fact that the user goes home is bathed or not can be accurately determined, the intelligent bathtub is controlled according to the user's requirements, and the user experience is improved. When the feedback instruction is not the preset execution instruction, the server returns to step S11.
Referring to fig. 4, fig. 4 is a flowchart illustrating a method for controlling an intelligent bathtub based on a vehicle according to a fourth embodiment of the present invention. As shown in fig. 3 and 4, in the method for controlling an intelligent bathtub based on a vehicle according to the present embodiment, when the feedback instruction is a preset execution instruction, the step of generating the control signal includes the following steps:
step S41: and when the feedback instruction is a preset execution instruction, acquiring season information, weather conditions and temperature information corresponding to the location point of the first vehicle.
Specifically, in an embodiment, when the received feedback instruction is a preset execution instruction, the server further obtains season information, weather conditions, and temperature information corresponding to a location point of the first vehicle. Specifically, the server processes the current time and the location of the first vehicle to obtain corresponding season information, and the server processes the weather service and the location of the first vehicle to obtain corresponding weather conditions and temperature information, for example, the server obtains the location of the first vehicle as winter weather, snowing weather and corresponding ambient temperature.
Step S42: and processing according to the season information, the weather condition and the temperature information to obtain a control signal.
Specifically, in an embodiment, the server processes the obtained season information, weather conditions and temperature information to obtain corresponding adjusted temperature and a start signal, processes the adjusted temperature and the start signal to obtain a control signal, and then controls the intelligent bathtub in the intelligent home platform corresponding to the first vehicle to discharge water after being adjusted according to the adjusted temperature until the water level in the intelligent bathtub reaches a preset water level, so that the intelligent bathtub can be discharged when the user arrives at home without user operation, and the waiting time of the user is saved.
Referring to fig. 5, fig. 5 is a flowchart illustrating a control method for a smart bathtub based on a vehicle according to a fifth embodiment of the present invention. As shown in fig. 1 to 5, the method for controlling an intelligent bathtub based on a vehicle according to this embodiment further includes the following steps before the step of obtaining a home location corresponding to a first vehicle when a current time is within a preset time period:
step S51: a starting position corresponding to when the first vehicle is started is obtained.
Specifically, in one embodiment, the server obtains a starting position corresponding to the starting time of the first vehicle, for example, in one embodiment, the starting position of the first vehicle is sent to the server after the starting time.
Step S52: and judging whether the starting position is a company position or not according to the historical data list corresponding to the first vehicle.
Specifically, in one embodiment, the server analyzes and determines whether the current starting position of the first vehicle is the company position corresponding to the user according to the historical data list and the starting position of the first vehicle, for example, whether the starting position is a position where the first vehicle arrives every morning on a weekday and leaves every afternoon or evening, and analyzes and processes the current time and the historical data list corresponding to the first vehicle to determine whether the starting position is the company position of the user.
Step S53: and when the initial position is the company position, judging whether the destination corresponding to the first vehicle is the home position or not according to the historical data list and the current time.
Specifically, in the present embodiment, when the destination is the home location, step S13 is executed.
Specifically, in an embodiment, when the starting position of the first vehicle is obtained as the company position, the server performs analysis processing according to the historical data list corresponding to the first vehicle and the current time to determine whether the destination corresponding to the first vehicle is the home position, for example, when the user drives the first vehicle from the company position when overtime reaches 23:00, the server determines that the user is on the way to go home next to work, and obtains the destination corresponding to the first vehicle as the home position, so as to execute step S13, thereby accurately determining the route to go home of the user according to the historical data list, and obtaining the time of the user to home to control the smart bathtub of the user, so that the user can take a bath immediately after arriving at home, the waiting time of the user for water drainage in the smart bathtub is saved, and the user can be helped to sleep and rest as soon as possible without disturbing the family having a rest, and the user experience is improved.
Referring to fig. 6, fig. 6 is a block diagram of a server 100 according to a sixth embodiment of the present invention. As shown in fig. 6, the server 100 provided in this embodiment is used for executing a method for controlling a smart tub based on a vehicle, and the server 100 provided in this embodiment includes a memory 110 and a processor 120.
Specifically, in the present embodiment, the memory 110 is used to store executable program code; the processor 120 is configured to call up executable program code in the memory to implement the steps of: receiving position information sent by a first vehicle; judging whether the current time is within a preset time period or not after receiving the position information; when the current time is within a preset time period, acquiring a home position corresponding to a first vehicle; processing according to the position information and the home position to obtain the estimated time required by the first vehicle to reach the home position; when the estimated time is less than or equal to the preset time, generating a control signal; and sending the control signal to an intelligent household platform corresponding to the first vehicle so as to automatically control the intelligent bathtub corresponding to the first vehicle.
Specifically, in one embodiment, the processor 120, performing the step of obtaining the estimated time required for the first vehicle to reach the home location based on the location information and the home location processing, includes: obtaining a route plan of the first vehicle according to the position information and the home position; acquiring road condition information and traffic condition information of a road corresponding to the route planning; and processing according to the position information, the route planning, the road condition information and the traffic condition information to obtain the estimated time required by the first vehicle to reach the home position.
Specifically, in one embodiment, the processor 120, when the predicted time is less than or equal to the preset time, generates the control signal including: when the preset time is less than or equal to the preset time, sending prompt information to the first vehicle so that the first vehicle displays the prompt information; receiving a feedback instruction returned by the first vehicle; judging whether the feedback instruction is a preset execution instruction or not; when the feedback instruction is a preset execution instruction, generating a control signal; and returning to the step of receiving the position information sent by the first vehicle when the feedback instruction is not a preset execution instruction.
Specifically, in an embodiment, the step of generating the control signal by the processor 120 when the feedback instruction is a preset execution instruction includes: when the feedback instruction is a preset execution instruction, acquiring season information, weather conditions and temperature information corresponding to the location point of the first vehicle; and processing according to the season information, the weather condition and the temperature information to obtain a control signal.
Specifically, in an embodiment, the step executed by the processor 120 before the step of acquiring the home location corresponding to the first vehicle when the current time is within the preset time period includes: acquiring a starting position corresponding to the starting of a first vehicle; judging whether the initial position is a company position or not according to a historical data list corresponding to the first vehicle; when the initial position is the company position, judging whether the destination corresponding to the first vehicle is a family position according to the historical data list and the current time; and when the destination is the home position, executing the step of acquiring the home position corresponding to the first vehicle when the current time is within the preset time period.
For the specific process of implementing each function of each functional unit of the server 100 in this embodiment, please refer to the specific contents described in the embodiments shown in fig. 1 to fig. 5, which is not described herein again.
Specifically, according to the control method and the server for the intelligent bathtub based on the vehicle provided by the embodiment, when the position information sent by the first vehicle is received in the preset time period, the expected time required by the first vehicle to reach the home position is obtained in real time according to the position information and the home position, and when the expected time is less than or equal to the preset time, the server generates the control signal to control the intelligent bathtub corresponding to the first vehicle to discharge water, so that the intelligent bathtub at home of the user can be automatically controlled to discharge water at the preset time before the user drives the vehicle to reach home, the waiting time after the user reaches home is saved, and the user experience is improved.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, in which computer-executable instructions are stored, where the computer-readable storage medium is, for example, a non-volatile memory such as an optical disc, a hard disc, or a flash memory. The computer-executable instructions are used for causing a computer or similar arithmetic device to complete various operations in the vehicle-based control method for the intelligent bathtub.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the terminal class embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for relevant points, reference may be made to part of the description of the method embodiment.