Summary of the invention
The object of the embodiment of the present invention is to provide a kind of USSD server, HLR server and the call transfer method based on USSD, and user can be allowed to use present terminal to control temporarily do not open in terminal on hand or close call transfer function.
For achieving the above object, embodiments provide a kind of USSD server, comprising:
First receiver module, for receiving first terminal successively through USSD instruction word string that mobile switching centre, unstructured supplementary data traffic USSD gateway or USSD center send;
Parsing module, for resolving described USSD instruction word string, obtains analysis result;
Directive generation module, for indicate at described analysis result described USSD instruction word string whole legal time, concatenate into call transfer control command according to described USSD command word;
First sending module, for described call transfer control command is sent to a HLR server, make described HLR server according to the call transfer state of described second terminal of described call transfer control command mark, and process according to the call of call transfer state to described second terminal of calling of described second terminal of mark.
Wherein, preferably, described USSD instruction word string at least comprises: the identification field of call transfer mode control word section, the second terminal and the authentication field of the second terminal;
Described call transfer control command comprises described first terminal mark, described second terminal iidentification and call transfer state information.
Wherein, preferably, described parsing module comprises:
First acquisition module, for obtaining described call transfer mode control word section;
First judge module, whether legal for judging described call transfer mode control word section, obtain the first judged result;
Second acquisition module, during for indicating described call transfer control field legal in described first judged result, obtains the identification field of described second terminal;
Second judge module, for judging the legitimacy of the identification field of described second terminal, obtains the second judged result;
3rd acquisition module, for when the identification field of described second terminal of described second judged result instruction is legal, obtains the authentication field of described second terminal;
3rd judge module, for the corresponding relation according to the terminal iidentification prestored and a terminal authentication field, judges the legitimacy of the authentication field of described second terminal, obtains one the 3rd judged result;
When the authentication field of described second terminal of described 3rd judged result instruction is legal, return the first successful result;
Described directive generation module is specifically for when the authentication field of described second terminal of described 3rd judged result instruction is legal, respectively according to the identification field determination call transfer state information of described call transfer mode control word section, described second terminal, described second terminal iidentification, and confirm the first terminal mark sending described USSD instruction word string, described first terminal mark, the second terminal iidentification and call transfer state information are generated described call transfer control command.
Wherein, preferably, described USSD server also comprises:
Second sending module, for described analysis result is formed the first message, be sent to SMS platform by described USSD gateway or USSD center, described mobile switching centre successively, make described SMS platform described first message can be sent to described first terminal and/or described second terminal.
Wherein, preferably, described call transfer state information is: open or close call transfer.
For achieving the above object, the embodiment of the present invention additionally provides a kind of HLR server, comprising:
Second receiver module, for receiving the call transfer control command that USSD server sends; Described call transfer control command comprises first terminal mark, the second terminal iidentification and call transfer state information;
Identification module, for the call transfer state according to described second terminal of described call transfer control command mark;
Processing module, the call of call transfer state to described second terminal of calling for described second terminal according to mark processes.
Wherein, preferably, described identification module is specially and arranges a flag bit, makes flag bit set or reset the call transfer state identifying described second terminal according to described call transfer state control command, wherein:
When described call transfer information is for opening call transfer, flag bit set also points to described first terminal;
When described call transfer information is for closing call transfer, flag bit resets.
Wherein, preferably, described processing module specifically comprises:
4th judge module, for when receiving the call request of calling out described second terminal, judging the flag bit whether set of described second terminal, obtaining one the 4th judged result;
Process submodule, for when the flag bit set of described second terminal of described 4th judged result instruction, carries out call transfer process by the call request of described second terminal of calling according to the sensing of flag bit, otherwise does not carry out call transfer process.
For achieving the above object, the embodiment of the present invention additionally provides a kind of call transfer method based on USSD, for a USSD server, comprising:
Receive first terminal successively through USSD instruction word string that mobile switching centre, unstructured supplementary data traffic USSD gateway or USSD center send;
Described USSD instruction word string is resolved, obtains analysis result;
Described analysis result indicate described USSD instruction word string whole legal time, concatenate into call transfer control command according to described USSD command word;
Described call transfer control command is sent to a HLR server, make described HLR server according to the call transfer state of described second terminal of described call transfer control command mark, and process according to the call of call transfer state to described second terminal of calling of described second terminal of mark.
Wherein, preferably, described USSD instruction word string at least comprises: the identification field of call transfer mode control word section, the second terminal and the authentication field of the second terminal;
Described call transfer control command comprises described first terminal mark, described second terminal iidentification and call transfer state information.
Wherein, preferably, described described USSD instruction word string to be resolved, obtains an analysis result and specifically comprise:
Obtain described call transfer mode control word section;
Judge that whether described call transfer mode control word section is legal, obtain the first judged result;
When described first judged result indicates described call transfer control field legal, obtain the identification field of described second terminal;
Judge the legitimacy of the identification field of described second terminal, obtain the second judged result;
When the identification field of described second terminal of described second judged result instruction is legal, obtain the authentication field of described second terminal;
According to the corresponding relation of the terminal iidentification prestored and a terminal authentication field, judge the legitimacy of the authentication field of described second terminal, obtain one the 3rd judged result;
When the authentication field of described second terminal of described 3rd judged result instruction is legal, return the first successful result;
Described described analysis result indicate described USSD instruction word string whole legal time, concatenating into call transfer control command according to described USSD command word is specially when the authentication field of described second terminal of described 3rd judged result instruction is legal, respectively according to described call transfer mode control word section, the identification field determination call transfer state information of described second terminal, described second terminal iidentification, and confirm the first terminal mark sending described USSD instruction word string, described first terminal is identified, second terminal iidentification and call transfer state information generate described call transfer control command.
Wherein, preferably, said method also comprises:
Described analysis result is formed the first message, be sent to SMS platform by described USSD gateway or USSD center, described mobile switching centre successively, make described SMS platform described first message can be sent to described first terminal and/or described second terminal.
Wherein, preferably, described call transfer state information is: open or close call transfer.
For achieving the above object, the embodiment of the present invention additionally provides a kind of call transfer method based on USSD, for a HLR server, comprising:
Receive the call transfer control command that USSD server sends; Described call transfer control command comprises first terminal mark, the second terminal iidentification and call transfer state information;
According to the call transfer state of described second terminal of described call transfer control command mark;
The call of call transfer state to described second terminal of calling according to described second terminal of mark processes.
Wherein, preferably, the described call transfer state according to described second terminal of described call transfer control command mark is specially and arranges a flag bit, makes flag bit set or reset the call transfer state identifying described second terminal according to described call transfer state control command, wherein:
When described call transfer information is for opening call transfer, flag bit set also points to described first terminal;
When described call transfer information is for closing call transfer, flag bit resets.
Wherein, preferably, the call of call transfer state to described second terminal of calling of described described second terminal according to mark processes and specifically comprises:
When receiving the call request of calling out described second terminal, judging the flag bit whether set of described second terminal, obtaining one the 4th judged result;
When the flag bit set of described second terminal of described 4th judged result instruction, the call request of described second terminal of calling is carried out call transfer process according to the sensing of flag bit, otherwise does not carry out call transfer process.
The embodiment of the present invention has following beneficial effect:
In the embodiment of the present invention, user can use present terminal to control temporarily do not open in terminal on hand or close call transfer function;
In the embodiment of the present invention, do not change original telecom operation framework, only need operator voluntarily framework USSD server or and third party service provider cooperation just can realize this value-added service;
The embodiment of the present invention can prevent illegal user in the unwitting situation of terminal use, open the call transfer of terminal, and eavesdropping terminal call information, ensure that the fail safe when carrying out call transfer and arranging, avoid being utilized by illegal one's share of expenses for a joint undertaking;
In the embodiment of the present invention, one temporarily after terminal does not open call transfer function by other-end on hand, after the described terminal of acquisition, can cancel call transfer function by the respective menu of lane terminal.
Embodiment
For the embodiment of the present invention will be solved technical problem, technical scheme and advantage clearly, be described in detail below in conjunction with the accompanying drawings and the specific embodiments.
At present, USSD(UnstructuredSupplementaryServiceData, unstructured supplementary data traffic) be the data interaction conversational mode developed on GSM short-message system basis, there is the transmission rate higher than Short Message Service and stronger interactivity.USSD technology current application scope is very wide, also comparative maturity, is the main technology adopted in the embodiment of the present invention.
Embodiments provide a kind of USSD server, as shown in Figure 1, comprising:
First receiver module, for receiving first terminal successively through USSD instruction word string that mobile switching centre, unstructured supplementary data traffic USSD gateway or USSD center send;
Parsing module, for resolving described USSD instruction word string, obtains analysis result;
Directive generation module, for indicate at described analysis result described USSD instruction word string whole legal time, concatenate into call transfer control command according to described USSD command word;
First sending module, for described call transfer control command is sent to a HLR server, make described HLR server according to the call transfer state of described second terminal of described call transfer control command mark, and process according to the call of call transfer state to described second terminal of calling of described second terminal of mark.
First terminal sends a USSD instruction word string to a mobile switching centre, and described USSD instruction word string is sent to described USSD server by a USSD gateway or USSD center by described mobile switching centre, is received by described first receiver module;
Then by described parsing module, the described USSD instruction word string received is resolved, obtain the analysis result of described USSD instruction word string legitimacy;
Described directive generation module only described USSD instruction word string whole legal time generate a call transfer control command;
Described call transfer control command is sent to a HLR server by described first sending module, make described HLR server according to the call transfer state of described second terminal of described call transfer control command mark, and process according to the call of call transfer state to described second terminal of calling of described second terminal of mark.
The embodiment of the present invention provides described USSD server, user's remote control call transfer when mobile phone is lost or omit can be facilitated, make terminal use can not with interrupt the contact of good friend, simultaneously do not change original telecom operation framework, only need operator voluntarily framework USSD server or and third party service provider cooperation just can realize this value-added service.
Wherein, described USSD instruction word string at least comprises: the identification field of call transfer mode control word section, the second terminal and the authentication field of the second terminal;
Described call transfer control command comprises described first terminal mark, described second terminal iidentification and call transfer state information.
Corresponding, when resolving described USSD instruction word string legitimacy, should judge the legitimacy of described call transfer mode control word section, the identification field of the second terminal and the authentication field of the second terminal successively, namely described parsing module comprises:
First acquisition module, for obtaining described call transfer mode control word section;
First judge module, whether legal for judging described call transfer mode control word section, obtain the first judged result;
Second acquisition module, during for indicating described call transfer control field legal in described first judged result, obtains the identification field of described second terminal;
Second judge module, for judging the legitimacy of the identification field of described second terminal, obtains the second judged result;
3rd acquisition module, for when the identification field of described second terminal of described second judged result instruction is legal, obtains the authentication field of described second terminal;
3rd judge module, for the corresponding relation according to the terminal iidentification prestored and a terminal authentication field, judges the legitimacy of the authentication field of described second terminal, obtains one the 3rd judged result;
When the authentication field of described second terminal of described 3rd judged result instruction is legal, return the first successful result;
Described directive generation module is specifically for when the authentication field of described second terminal of described 3rd judged result instruction is legal, respectively according to the identification field determination call transfer state information of described call transfer mode control word section, described second terminal, described second terminal iidentification, and confirm the first terminal mark sending described USSD instruction word string, described first terminal mark, the second terminal iidentification and call transfer state information are generated described call transfer control command.
The USSD server that the embodiment of the present invention provides, first judge whether described call transfer mode control word section belongs to the function word string of opening call transfer, namely whether described call transfer mode control word section is legal, if the illegal identification field just no longer obtaining described second terminal, directly returns the first failure result;
When described call transfer mode control word section is legal, obtain the identification field of described second terminal, and judge the legitimacy of identification field, if the illegal authentication field just no longer obtaining described second terminal, directly return the second failure result, here identification field can be the number of described second terminal, or other can the information of the second terminal described in unique identification;
When the identification field of described second terminal is legal, obtain the authentication field of described second terminal, and judge the legitimacy of authentication field, the first successful result is returned time legal, return the 3rd failure result time illegal, described USSD server will realize this service needed has authorization data storehouse to support, what preserve inside database is the corresponding relation of terminal iidentification and terminal authentication field, here authentication field can be the service password of terminal, and the general AUC AUC that relies on judges;
Described directive generation module only when the authentication field of described second terminal of the 3rd judged result instruction is legal, concatenates into a call transfer control command according to described USSD command word.
The failure of above-mentioned any step all can cause this operation failure, described USSD server is by the legitimacy of the authentication field of judgement second terminal, prevent illegal user in the unwitting situation of terminal use, open the call transfer of terminal, eavesdropping terminal call information, ensure that the fail safe when carrying out call transfer and arranging, avoid being utilized by illegal one's share of expenses for a joint undertaking.
Simultaneously, in order to prevent Denial of Service attack, described USSD server can also be arranged on the number of times operated same terminal iidentification in a period of time, namely a same terminal iidentification repeatedly can not be operated within a period of time, and after exceeding stipulated number, described USSD server is refused automatically as it provides service.
Such as: the user of terminal A, for pernicious object, continuously sends USSD instruction, attempt cracks the service password of terminal B or makes USSD server excess load to paralysis, so terminal A sends the automatic denial of service of server after more than 3 times.
After acquisition analysis result, should inform terminal use in time, so that user confirms that whether the USSD instruction word string sent is successful by described USSD server parses, if unsuccessfully should inform user's failure cause, therefore, described USSD server can also comprise:
Second sending module, for described analysis result is formed the first message, be sent to SMS platform by described USSD gateway or USSD center, described mobile switching centre successively, make described SMS platform described first message can be sent to described first terminal and/or described second terminal.
Analysis result is formed the first message by described USSD server, described mobile switching centre is sent to by described USSD gateway or USSD center, a SMS platform is sent to by described mobile switching centre, analysis result is returned described first terminal and/or the second terminal by described SMS platform, wherein, when analysis result indicates described USSD instruction word string illegal, return corresponding failure result to described first terminal, facilitating first terminal user to confirm failure cause, now can not inform the second terminal for saving Internet resources, when returning analysis result and indicating described USSD instruction word string legal, first successful result is sent to described first terminal, inform described second terminal simultaneously, short message content can be: " when described first terminal is opening the call transfer function of described second terminal, please close this service in time ", notice user's communication shifts successfully, also can know that the second terminal is opened call transfer by backstage when the user of the second terminal gets the second terminal again, and can check whether it is the operation of user oneself, this can be known by note, must containing the number of first terminal in the note of the second terminal because send to, can judge whether to input lawful acts by this number user, if the service password of user is stolen, according to this note, user can know that the stolen and mobile phone communication of cellular service password is ravesdropping, can backward tracing disabled user.
Above-mentioned call transfer state information can, for opening or closing call transfer, be determined to open or close call transfer by the call transfer mode control word section in described USSD instruction word string.
USSD server described in the embodiment of the present invention refers to service provider, can by operator's this server of framework voluntarily, in order to resolve USSD command character, also can be provided by third party, third party service provider can be reached an agreement with Virtual network operator, rent its database and network, this database will provide the checking of target mobile phones number and user's service password, just can provide corresponding service after information is correct.
The embodiment of the present invention additionally provides a kind of HLR server, as shown in Figure 2, comprising:
Second receiver module, for receiving the call transfer control command that USSD server sends; Described call transfer control command comprises first terminal mark, the second terminal iidentification and call transfer state information
Identification module, for the call transfer state according to described second terminal of described call transfer control command mark;
Processing module, the call of call transfer state to described second terminal of calling for described second terminal according to mark processes.
The call transfer state of described second terminal of call transfer control command mark that described identification module receives according to described second receiver module, described processing module processes according to the call of the call transfer state of described second terminal of mark to described second terminal of calling.
Wherein, preferably, described identification module is specially and arranges a flag bit, makes flag bit set or reset the call transfer state identifying described second terminal according to described call transfer state control command, wherein:
When described call transfer information is for opening call transfer, flag bit set also points to described first terminal;
When described call transfer information is for closing call transfer, flag bit resets.
Whether by arranging a flag bit in described HLR server, carrying out marking terminal and open or close call transfer, flag bit set markers will second terminal, when flag bit resets, mark the second terminal closes call transfer if having opened call transfer service.
Wherein, preferably, described processing module specifically comprises:
4th judge module, for when receiving the call request of calling out described second terminal, judging the flag bit whether set of described second terminal, obtaining one the 4th judged result;
Process submodule, for when the flag bit set of described second terminal of described 4th judged result instruction, carries out call transfer process by the call request of described second terminal of calling according to the sensing of flag bit, otherwise does not carry out call transfer process.
Described HLR server is when receiving the call of calling out described second terminal, the flag bit whether set of described second terminal can be judged, the call request of described second terminal of calling can be carried out call transfer process according to the sensing of flag bit during set, namely carry out call transfer, transfer to first terminal; When flag bit resets, do not need to carry out call transfer process, now just achieve the call transfer function of to be opened or to close the second terminal by first terminal, namely realize when mobile phone not at one's side time, realize call transfer function by another mobile phone.
General call transfer is divided into all calls of transfer, call forward on busy and ring unanswered time shift, what in the embodiment of the present invention, HLR server wanted backstage to open is all calls of transfer, the call transfer of other situations is such as called forward on busy and normally cannot be realized call transfer, during ring unanswered, contact person is also given in transfer a kind of illusion, the user of upper second terminal that cannot contact in time, so the HLR Server Default in the embodiment of the present invention opens all calls of transfer.
Open call transfer function to be realized by said process, have two kinds of implementations when the call transfer function of closedown second terminal:
The user of < mode one > second terminal gets the second terminal, check that SMS notification recognizes that the second terminal has opened call transfer function, user now can enter and arrange menu, the call entering the inside again arranges menu, there is the menu cancelling call transfer the inside, by this menu, user can cancel the call transfer function of the second terminal, flag bit P now in HLR server resets, the phone of all second terminals can not be transferred, and call recovery is normal;
If < mode two > second terminal use does not have acquisition second terminal, but still thinks the call transfer service of closedown second terminal, now need the first terminal got by user to send USSD order and realize.The similar process of this process and unlatching, after USSD server analysis USSD word string, the flag bit in HLR server can be reset, the phone now calling out the second terminal recovers proper communication.
The embodiment of the present invention additionally provides a kind of call transfer method based on USSD, for a USSD server, as shown in Figure 3, comprising:
Step 31, receives first terminal successively through USSD instruction word string that mobile switching centre, unstructured supplementary data traffic USSD gateway or USSD center send;
Step 32, resolves described USSD instruction word string, obtains analysis result;
Step 33, described analysis result indicate described USSD instruction word string whole legal time, concatenate into call transfer control command according to described USSD command word;
Step 34, described call transfer control command is sent to a HLR server, make described HLR server according to the call transfer state of described second terminal of described call transfer control command mark, and process according to the call of call transfer state to described second terminal of calling of described second terminal of mark.
Wherein, described USSD instruction word string at least comprises: the identification field of call transfer mode control word section, the second terminal and the authentication field of the second terminal;
Described call transfer control command comprises described first terminal mark, described second terminal iidentification and call transfer state information.
Wherein, preferably, step 32 can be specially:
Step 321, obtains described call transfer mode control word section;
Step 322, judges that whether described call transfer mode control word section is legal, obtains one first judged result, enters step 323, otherwise enter step 324 if legal;
Step 323, obtains the identification field of described second terminal;
Step 324, returns one first failure result;
Step 325, judges the legitimacy of the identification field of described second terminal, obtains one second judged result, enters step 326, otherwise enter step 327 if legal;
Step 326, obtains the authentication field of described second terminal;
Step 327, returns one second failure result;
Step 328, according to the corresponding relation of the terminal iidentification prestored and a terminal authentication field, judges the legitimacy of the authentication field of described second terminal, obtains one the 3rd judged result, enters step 329, otherwise enter step 3210 if legal;
Step 329, returns one first successful result;
Step 3210, returns one the 3rd failure result.
Wherein step 33 is specifically when the authentication field of described second terminal of described 3rd judged result instruction is legal, respectively according to the identification field determination call transfer state information of described call transfer mode control word section, described second terminal, described second terminal iidentification, and confirm the first terminal mark sending described USSD instruction word string, described first terminal mark, the second terminal iidentification and call transfer state information are generated described call transfer control command.
Wherein, preferably, said method also comprises:
Step 35, described analysis result is formed the first message, be sent to SMS platform by described USSD gateway or USSD center, described mobile switching centre successively, make described SMS platform described first message can be sent to described first terminal and/or described second terminal.
Wherein, preferably, in said method, described call transfer state information is: open or close call transfer.
The embodiment of the present invention additionally provides a kind of call transfer method based on USSD, for a HLR server, as shown in Figure 4, comprising:
Step 41, receives the call transfer control command that USSD server sends; Described call transfer control command comprises first terminal mark, the second terminal iidentification and call transfer state information;
Step 42, according to the call transfer state of described second terminal of described call transfer control command mark;
Step 43, the call of call transfer state to described second terminal of calling according to described second terminal of mark processes.
Wherein, preferably, step 42 can be specially:
One flag bit is set, makes flag bit set according to described call transfer state control command or reset the call transfer state identifying described second terminal, wherein:
When described call transfer information is for opening call transfer, flag bit set also points to described first terminal;
When described call transfer information is for closing call transfer, flag bit resets.
Wherein, preferably, step 43 specifically comprises:
Step 431, when receiving the call request of calling out described second terminal, judging the flag bit whether set of described second terminal, obtaining one the 4th judged result;
Step 432, when the flag bit set of described second terminal of described 4th judged result instruction, carries out call transfer process by the call request of described second terminal of calling according to the sensing of flag bit, otherwise does not carry out call transfer process.
Said process is illustrated, as shown in Figure 5 below in conjunction with actual.
The mobile phone A that user gets, sends a USSD word string by mobile phone A, and wherein, this word string is: * 123+15751563375+06490#;
USSD word string Analysis server starts corresponding routine analyzer and from left to right analyzes this word string, first first four * 123 are read, judge whether first four belong to the function word string of opening call transfer, if read the failure of kinetic energy word string, send failure command and return to USSD gateway;
As otherwise continue down to read the phone number of 11,15751563375 is numbers of mobile phone B, judges whether it is legal phone number;
If phone number is legal, analyzer will continue down to read cellular service password, and 06490 is user's service password of mobile phone B, and this time the validity judgement of service password will rely on AUC AUC to judge;
If consistent, continue to read word string, otherwise the words analyzer sending SMS notification mobile phone A operation failure password correct can continue down to read character, reads #, this time analyze and just successfully finish, otherwise the failure of any step all can cause this operation failure.
In order to prevent Denial of Service attack, a same number repeatedly can not be operated in a period of time, such as mobile phone A is in pernicious object, continuously send USSD instruction, attempt cracks the service password of mobile phone B or makes USSD server excess load to paralysis, so mobile phone A sends server after more than 3 times automatically refuse Analysis Service, SMS platform can be sent short messages and be told that user sends more than 3 times, please tries after a while again.
In above process, local side receives this USSD word string, and this USSD word string is sent to USSD server;
This word string of USSD server analysis, carries out validity checking, and processes the situation that may occur;
After parsing terminates, analysis result is sent to USSD gateway, result is sent to mobile services switching centre MSC by USSD gateway, by the SMS platform that links with it by the mobile phone A of operating result note announcement and mobile phone B;
If call transfer function is opened in request, then by HLR register a register P set, now the phone of calling handset B will be transferred mobile phone A;
Close this type of call transfer function, have two kinds of modes:
< mode one > as shown in Figure 6, user gets mobile phone B, check that SMS notification recognizes that mobile phone B has opened call transfer function, user now can enter and arrange menu, the call entering the inside again arranges menu, there is the menu cancelling call transfer the inside, by this menu, user can cancel the call transfer function of mobile phone B, flag bit P now in HLR server resets, the phone of all-calls B can not be transferred to mobile phone A, and call recovery is normal;
If < mode two > user does not obtain mobile phone B, but still think the call transfer service of closing hand phone B, now need the mobile phone A got by user to send USSD order and realize.The similar process of this process and unlatching, after USSD server analysis USSD word string, flag bit in HLR server can be reset, now the phone of calling handset B recovers proper communication, the mobile phone A of SMS platform transmit operation result note announcement and mobile phone B, so far call transfer function will be closed, and realizes with this mobile phone A to carry out remote closing mobile phone B call transfer by USSD.
The embodiment of the present invention can realize the demand that user is badly in need of the most with minimum cost, user's communication is contacted and can not be interrupted when mobile phone is lost or forgotten.
The above is the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the prerequisite not departing from principle of the present invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.