Summary of the invention
The technical problem to be solved in the present invention is, above-mentioned defective at prior art, provide a kind of with the weather prompting function mobile phone and based on the weather based reminding method of mobile phone, it makes mobile phone increase new function: can be according to the variation of weather and correspondingly change the function of handset displays background picture, provide users with the convenient.
The technical scheme that technical solution problem of the present invention is adopted is as follows:
A kind of mobile phone with the weather prompting function wherein, comprising:
The Weather information processing module is used to obtain current Weather information;
Resolve forwarding module, be used for periodically reading described Weather information from described Weather information processing module, and described Weather information resolved, Weather information after resolving is compared the control signal that produces a weather state change when state of weather changes with a preceding Weather information, and the control signal of this weather state change is sent to the background display control module;
The background display control module is used for the control signal according to described weather state change, controls the corresponding background picture of described handset displays.
The mobile phone of described band weather prompting function, wherein, it also comprises display module, is used for showing corresponding background picture according to the control of described background display control module.
The mobile phone of described band weather prompting function, wherein, described parsing forwarding module specifically comprises:
Regularly acquiring unit is used for periodically reading described Weather information from described Weather information processing module;
Resolve filter element, be used to resolve described Weather information, extract current weather conditions and filter out unwanted weather data, and the Weather information that filters is sent to the state of weather comparing unit;
The state of weather comparing unit is used for the Weather information of described filtration is compared with a preceding Weather information, when judging the control signal that produces a weather state change when state of weather changes;
Transmitting element is used for the control signal of described weather state change is sent to the background display control module.
The mobile phone of described band weather prompting function, wherein, described Weather information processing module comprises: the network receiving element is used for obtaining current Weather information by network from the service provider.
The mobile phone of described band weather prompting function, wherein, described Weather information processing module also comprises: sensor unit is used for the current Weather information of induction automatically.
A kind of weather based reminding method based on mobile phone wherein, may further comprise the steps:
A, obtain current Weather information;
B, periodicity read described Weather information, and described Weather information is resolved, and the Weather information after resolving is compared the control signal that produces a weather state change when state of weather changes with a preceding Weather information;
C, according to the control signal of described weather state change, control the corresponding background picture of described handset displays.
The described awake method of weather prompting based on mobile phone, wherein, described step B specifically comprises:
B1, periodicity read described Weather information from described Weather information processing module;
B2, resolve described Weather information, extract current weather conditions and filter out unwanted weather data, and the Weather information that filters is sent to the state of weather comparing unit;
B3, the Weather information of described filtration is compared with a preceding Weather information, when judging the control signal that produces a weather state change when state of weather changes;
B4, the control signal of described weather state change is sent to the background display control module.
The described awake method of weather prompting based on mobile phone, wherein, described steps A specifically comprises:
A1, obtain current Weather information from the service provider by network.
The described awake method of weather prompting based on mobile phone, wherein, described steps A also comprises:
A2, respond to current Weather information automatically.
The mobile phone of band weather prompting function provided by the present invention and based on the weather based reminding method of mobile phone, does owing to adopted the Weather information processing module to obtain Weather information: resolve forwarding module and periodically read and resolve Weather information: state of weather change? if change, then state of weather is sent to the background display control module; The background display control module is controlled the corresponding background picture of described handset displays according to the control signal of described weather state change; It makes mobile phone increase new function: can be according to the variation of weather and correspondingly change the function of handset displays background picture, and the user can in time be subjected to whether vicissitudinous prompting of weather, provides users with the convenient.
Embodiment
Provided by the invention a kind of with the weather prompting function mobile phone and based on the weather based reminding method of mobile phone, clearer, clear and definite for making purpose of the present invention, technical scheme and advantage, below develop simultaneously with reference to accompanying drawing that the present invention is described in more detail for embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
In order to realize to change according to current weather condition the function of the background picture of demonstration, a kind of mobile phone of the present invention with the weather prompting function, as shown in Figure 1, mainly comprise: Weatherinformation processing module 110,parsing forwarding module 120, backgrounddisplay control module 130 anddisplay module 140.
Described Weatherinformation processing module 110 is mainly used in and obtains current Weather information; Concrete acquisition methods can be determined according to physical condition, for example can adopt the Weatherinformation processing module 110 withnetwork receiving element 111, obtains described current Weather information by network from the service provider; Or adopt Weatherinformation processing module 110 to calculate current Weather information as induction chip by embedded in mobile phone by the sensing apparatus that terminal carries withsensor unit 112; One of dual mode gets final product.
Can certainly adopt described Weatherinformation processing module 110 to comprisenetwork receiving element 111 andsensor unit 112 simultaneously, as shown in Figure 2, the invention is not restricted to aforesaid way, can select Weather information obtain manner flexibly as the case may be.
Describedparsing forwarding module 120, be mainly used in periodically and read described Weather information from described Weather information processing module, and described Weather information resolved, Weather information after resolving is compared the control signal that produces a weather state change when state of weather changes with a preceding Weather information, and the control signal of this weather state change is sent to the background display control module;
Describedparsing forwarding module 120 will be periodically obtains current weather data and resolves from Weatherinformation processing module 110, extracts current weather conditions and filters out other unwanted weather datas (as humidity, wind direction etc.); And keep some main weather datas, as fine day or rainy day etc.For example,, obtain data and be generally the XML form if obtain Weather information from the service provider by network, in the following example:
<WeatherInfo〉(Weather information)
<temperature〉43</temperature〉(temperature)
<realfeel〉47</realfeel〉(actual temperature)
<humidity〉58%</humidity〉(humidity)
<weathertext〉Sunny</weathertext〉(state of weather)
<wind〉S</wind〉(wind direction)
<windspeed〉3</windspeed〉(wind speed)
<visibility〉10</visibility〉(visibility)
</WeatherInfo>
Then only need extract wherein<weathertext data, promptly state of weather gets final product.Resolve forwarding module and will write down these data, and compare with previous state of weather, identical as state, then the weather data that continues next time reads; As the state difference, weather state change is described, then can pass through as application programming interfaces (API), the form that weather conditions can be discerned with the background control module passes to it, for example represent a certain weather with certain positive integer, fine as 1 expression, 2 expressions are cloudy etc., and the weather data that continues next time reads then.
Described backgrounddisplay control module 130 is mainly used in the control signal according to described weather state change, and thedisplay module 140 of controlling described mobile phone shows corresponding background picture.Backgrounddisplay control module 130 can be according to the weather data that receives as described, platform interface by mobile phone terminal is changed the background picture that shows, for example, current is the fine scenery picture that then background is made as a fine day, can certainly allow user oneself set the associated picture of different weather.
Display module 140 is used for showing corresponding background picture according to the control of described background display control module.
Embodiment further, as shown in Figure 3, describedparsing forwarding module 120 specifically comprises: acquiringunit 121 regularly, resolvefilter element 122, state ofweather comparing unit 123 and transmittingelement 124.
Describedtiming acquiring unit 121 is used for periodically reading described Weather information from described Weatherinformation processing module 110; For example read described Weather information from described Weather information processing module every 15 seconds.
Describedparsing filter element 122 is used to resolve described Weather information, extracts current weather conditions and filters out unwanted weather data (as humidity, wind direction etc.), and the Weather information that filters is sent to state ofweather comparing unit 123;
Described state ofweather comparing unit 123 is used for the Weather information of described filtration is compared with a preceding Weather information, when judging the control signal that produces a weather state change when state of weather changes;
Transmittingelement 124 is used for the control signal of described weather state change is sent to the background display control module.
Realized a kind of mobile phone that can change the background picture function of demonstration according to current weather condition based on above-mentioned, the embodiment of the invention also provides a kind of weather based reminding method based on mobile phone, as shown in Figure 4, may further comprise the steps:
The first step, Weatherinformation processing module 110 are obtained current Weather information (step S410 as shown in Figure 4), concrete as previously described acquisition methods can be determined according to physical condition, as obtaining from the service provider bynetwork receiving element 111, or the induction etc. automatically of the sensing apparatus that carries by terminal such assensor unit 112.
Second step, parsingforwarding module 120 periodically read described Weather information from described Weatherinformation processing module 110, and described Weather information resolved, Weather information after resolving is compared the control signal that produces a weather state change when state of weather changes with a preceding Weather information, and the control signal of this weather state change sent to the background display control module, it specifically may further comprise the steps, as shown in Figure 4.
S420, parsingforwarding module 120 periodically read and resolve described Weather information, thetiming acquiring unit 121 that is described parsingforwarding module 120 periodically reads described Weather information from described Weather information processing module, extracts current weather conditions and filters out other unwanted weather datas (as humidity, wind direction etc.); And keep some main weather datas, as fine day or rainy day etc., and the Weather information that filters is sent to the state of weather comparing unit.
The state of weather comparing unit of S430, described parsing forwarding module is compared the Weather information of described filtration with a preceding Weather information, when judging the control signal that produces a weather state change when state of weather changes, does Weather information after being about to resolve and a preceding Weather information compare judge that state of weather changes? as not changing, promptly the Weather information of resolving after filtering is identical with a preceding Weather information state, then return step S420, the weather data that continues next time reads; If state of weather changes, then change step S440 over to.
S440, state of weather is sent to the background display control module: promptly compare the control signal that produces a weather state change when state of weather changes with a preceding Weather information when the Weather information of resolving after filtering, and the control signal of this weather state change is sent to the background display control module.
S450, background display control module are controlled the corresponding background picture of described handset displays according to the control signal of described weather state change, for example show corresponding background picture by display module according to the control of described background display control module.
The mobile phone of band weather prompting function provided by the present invention and based on the weather based reminding method of mobile phone, does owing to adopted the Weather information processing module to obtain Weather information: resolve forwarding module and periodically read and resolve Weather information: state of weather change? if change, then state of weather is sent to the background display control module; The background display control module is controlled the corresponding background picture of described handset displays according to the control signal of described weather state change; It makes mobile phone increase new function: can be according to the variation of weather and correspondingly change the function of handset displays background picture, and the user can in time be subjected to whether vicissitudinous prompting of weather, provides users with the convenient.
Should be understood that application of the present invention is not limited to above-mentioned giving an example, for those of ordinary skills, can be improved according to the above description or conversion that all these improvement and conversion all should belong to the protection range of claims of the present invention.