Summary of the invention
The object of the present invention is to provide a kind of method of acquiring weather forecast by mobile communication terminal, be intended to solve mobile communication terminal obtains weather forecast by USSD problem.
The present invention is achieved in that a kind of method of acquiring weather forecast by mobile communication terminal, and described method comprises:
A, mobile communication terminal send USSD weather report request message to mobile operator server, carry the target area code that the user need inquire about in the described USSD weather report request message;
B, described mobile communication terminal receive the USSD weather forecast response message of described mobile operator server feedback, carry the weather forecast of described target area in the described USSD weather forecast response message.
More specifically, wherein step a specifically comprises:
A1, described mobile communication terminal generate described USSD weather report request message according to the target area that the user selects from the weather forecast query menu, carry the target area code that the user need inquire about in the described USSD weather report request message;
A2, described mobile communication terminal send to described mobile operator server with the USSD that generates.
More specifically, the service code that comprises sign weather forecast business in the described USSD weather report request message.
More specifically, wherein also comprise between step a and the step b:
Described mobile operator server receives described USSD weather report request message, inquires about its database, obtains the weather forecast of target area, and the weather forecast of described target area is fed back to described mobile communication terminal.
More specifically, specifically comprise:
Described mobile operator server receives described USSD weather report request message, inquire about its database, obtain the data of weather forecast of described target area, the pre-datagram of the weather of described target area is arrived described mobile communication terminal by Release Complete message feedback.
More specifically, comprise the character that identifies weather forecast in the described Release Complete message.
More specifically, carry described data of weather forecast by other optional information fields in the described Release Complete message in the described Release Complete message.
More specifically, wherein also comprise after the step b:
C, described mobile communication terminal are resolved the USSD weather forecast response message of described mobile operator server feedback, therefrom parse weather forecast, and described weather forecast is shown to the user.
More specifically, wherein step c is described is shown to the user with described weather forecast and specifically comprises:
The user interface of described weather forecast by described mobile communication terminal is shown to the user with menu mode.
More specifically, described mobile communication terminal is a mobile phone.
The present invention overcomes the deficiencies in the prior art, the technical scheme that provides is: mobile communication terminal sends USSD weather report request message to mobile operator, mobile operator feeds back USSD weather forecast response message, and mobile communication terminal parses weather forecast information from USSD weather forecast response message.Technical scheme provided by the invention is compared the mode of existing acquiring weather forecast by mobile communication terminal, realizes more simple and fast, and the user can inquire about each regional weather forecast in real time, and does not need to expend flow.
Embodiment
Technical scheme provided by the invention is: mobile communication terminal sends USSD weather report request message to mobile operator, mobile operator feeds back USSD weather forecast response message, and mobile communication terminal parses weather forecast information from USSD weather forecast response message.
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.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.
During specific implementation technical scheme provided by the invention, in the USSD weather report request message that mobile communication terminal generates, need represent that this message is weather report request message by service code, this service code can be determined by mobile operator.In addition, because of the weather forecast of user inquiring may relate to different regions, also need coded representation query aim region by other.The form of weather report request message is as " * #SC*n characters # ", wherein the SC correspondence is represented the service code of weather report request, the code of the corresponding expression of ncharacters query aim region, can determine according to certain rule by mobile operator, be principle to make things convenient for the user to remember and to use, as postcode, area code or the like.
The USSD weather report request message that generates as, mobile communication terminal be " * #55*086021 # ", and wherein, " 55 " be the service code of expression weather report request, the target area that " 086021 " expression is inquired about is " Chinese Shanghai ".
Use for the convenience of the user, can in mobile communication terminal, set up " weather forecast query " menu, as shown in Figure 1.When the user need inquire about the weather forecast in somewhere, choose this " weather forecast query " menu, choose the objective area " Shanghai " of choosing inquiry in the drop-down list of the target country " China " of inquiry, " area " option correspondence therein in the drop-down list of " country " option correspondence therein, confirm then.
After the user confirmed, mobile communication terminal generated USSD weather report request message " * #55*086021 # " automatically according to the selection result of user in this menu, and this transmission of messages is arrived mobile operator server.Mobile operator server receives USSD weather report request message " * #55*086021 # " afterwards, it is resolved, judge that by the service code in this message " 55 " this message is weather forecast query message, the target area of judging inquiry by other service codes " 086021 " is " Chinese Shanghai ", mobile operator server is inquired about its database, obtains the weather forecast in Chinese Shanghai area.
Mobile operator server can adopt Release Complete (release is finished) message, as the response to the USSD weather report request when mobile communication terminal feedback weather forecast response message.Handle for making this response message be different from other USSD and being convenient to mobile communication terminal identification, can add the character of some sign weather forecast therein,, specifically can consult to determine by operator and terminal equipment manufacturer as * W*T.The form of Weather information is exemplified as:
Shanghai,25℃,sunny,30%,west?2;
Promptly demarcate city (Shanghai), temperature (25C ℃), weather (sunny), humidity (30%), wind direction and wind-force (west 2) with comma.Certainly, also can add more Weather information, as air pressure, ultraviolet index etc. according to the ability of information that mobile operator server provides.
According to 3GPP (3rd Generation Partnership Project, third generation partner program) agreement, Release Complete message is made up of 4 parts:
1, Protocol discriminator agreement difference;
2, Transaction identifier behavior identifier;
3, Message Type type of message is xx101010 as this part, then is expressed as Release Complete message;
4, other optional information fields.
Other optional information fields wherein comprise Cause and Facility information element, the word string of weather forecast directly can be added as ussd-string among the Facility, be about to " * W*T Shanghai; 25 ℃; sunny, 30%, west 2 " mail to mobile communication terminal as message body.
After mobile communication terminal is received Release Complete message, message body is resolved, be * W*T as beginning among the ussd-string, what then can confirm to return is that weather forecast " Shanghai, 25 ℃, sunny, 30%, west 2 " is latitude and longitude coordinates.
Concerning domestic consumer, this content is very not directly perceived, the weather forecast of returning can be shown to the user by more attractive in appearance and detailed mode, shown in " weather forecast " menu of Fig. 2, and can add the picture that some represent weather, makes the interface friendly more.
The flow chart of the embodiment of the invention specifically comprises following step as shown in Figure 3:
1, the user starts the weather forecast query function of mobile communication terminal, need to select the target area of inquiry;
2, mobile communication terminal generates USSD weather report request message according to user's selection;
3, mobile communication terminal sends to mobile operator server with the USSD weather report request message that generates;
4, mobile operator server receives this USSD weather report request message, inquires about its database, obtains the weather forecast of target area;
5, mobile operator server arrives mobile communication terminal with the weather forecast of obtaining by Release Complete message feedback;
6, mobile communication terminal parses weather forecast from Release Complete message, by the user interface demonstration of mobile communication terminal.
The method advantage of obtaining weather forecast by USSD provided by the invention is quick and easy more, and without any need for the GPRS data traffic, has saved the user's communications expense.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.